CN116485639A - Image processing method - Google Patents
Image processing method Download PDFInfo
- Publication number
- CN116485639A CN116485639A CN202310580329.9A CN202310580329A CN116485639A CN 116485639 A CN116485639 A CN 116485639A CN 202310580329 A CN202310580329 A CN 202310580329A CN 116485639 A CN116485639 A CN 116485639A
- Authority
- CN
- China
- Prior art keywords
- image
- image processing
- face
- area
- skin
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 16
- 238000000034 method Methods 0.000 claims abstract description 27
- 238000013461 design Methods 0.000 claims abstract description 12
- 238000012545 processing Methods 0.000 claims abstract description 10
- 230000002087 whitening effect Effects 0.000 claims abstract description 6
- 238000011282 treatment Methods 0.000 claims abstract description 5
- 230000000694 effects Effects 0.000 claims description 13
- 238000012549 training Methods 0.000 claims description 7
- 238000001914 filtration Methods 0.000 claims description 4
- 230000006870 function Effects 0.000 claims description 4
- 230000003796 beauty Effects 0.000 claims description 3
- 230000002146 bilateral effect Effects 0.000 claims description 3
- 238000005282 brightening Methods 0.000 claims description 3
- 238000013145 classification model Methods 0.000 claims description 3
- 230000007423 decrease Effects 0.000 claims description 3
- 230000008439 repair process Effects 0.000 abstract description 8
- 208000002874 Acne Vulgaris Diseases 0.000 abstract description 2
- 206010000496 acne Diseases 0.000 abstract description 2
- 238000001514 detection method Methods 0.000 description 8
- 238000005516 engineering process Methods 0.000 description 5
- 230000008569 process Effects 0.000 description 5
- 230000009471 action Effects 0.000 description 3
- 238000003709 image segmentation Methods 0.000 description 3
- 238000013136 deep learning model Methods 0.000 description 2
- 230000002708 enhancing effect Effects 0.000 description 2
- 230000000007 visual effect Effects 0.000 description 2
- 208000003351 Melanosis Diseases 0.000 description 1
- 230000004075 alteration Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 210000000746 body region Anatomy 0.000 description 1
- 230000037237 body shape Effects 0.000 description 1
- 230000006835 compression Effects 0.000 description 1
- 238000007906 compression Methods 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000018109 developmental process Effects 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 230000015654 memory Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformations in the plane of the image
- G06T3/04—Context-preserving transformations, e.g. by using an importance map
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/20—Image enhancement or restoration using local operators
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/764—Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/77—Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
- G06V10/774—Generating sets of training patterns; Bootstrap methods, e.g. bagging or boosting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/10—Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
- G06V40/16—Human faces, e.g. facial parts, sketches or expressions
- G06V40/161—Detection; Localisation; Normalisation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20024—Filtering details
- G06T2207/20028—Bilateral filtering
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20081—Training; Learning
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20084—Artificial neural networks [ANN]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30196—Human being; Person
- G06T2207/30201—Face
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Health & Medical Sciences (AREA)
- Multimedia (AREA)
- General Health & Medical Sciences (AREA)
- Databases & Information Systems (AREA)
- Computing Systems (AREA)
- Evolutionary Computation (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Medical Informatics (AREA)
- Software Systems (AREA)
- Artificial Intelligence (AREA)
- Oral & Maxillofacial Surgery (AREA)
- Human Computer Interaction (AREA)
- Image Analysis (AREA)
Abstract
The invention discloses an image processing method, which comprises the following steps: image processing and beautifying, image classification, and identification of the area where the person is located and layout. The invention belongs to the technical field of image processing, and provides an image processing method which is characterized in that images are archived according to AI (automatic identification) shooting scenes, then face and skin areas of the images are subjected to beautifying treatments such as whitening, acne removing and skin grinding, and finally, layout of corresponding styles is carried out according to unique information of each image. Compared with other image processing methods, the method can realize that the user can carry out AI intelligent picture repair on photos accumulated in life, and AI intelligent classification is carried out, and then the photos are added to different design style layouts to form a batch of images with more recall.
Description
Technical Field
The invention belongs to the technical field of image processing, and particularly relates to an image processing method.
Background
Image processing refers to the use of computer technology to digitize an image to alter or enhance various features of the image. Common image processing includes image enhancement, image filtering, image segmentation, image compression, and the like.
With the rapid development of modern digital technology, image processing technology is widely used in various fields. However, the image processing methods currently existing in the market still face some challenges, for example, as the photographing functions of cameras and mobile phones are more and more improved, the pictures stacked in hands by users at ordinary times are more and more difficult to classify and design, both in terms of effort and time.
Therefore, the present patent application aims to propose a novel image processing method to solve the problems existing in the prior art.
Disclosure of Invention
Aiming at the situation, in order to overcome the defects of the prior art, the invention provides an image processing method which can realize that a user can carry out AI intelligent picture repair on photos accumulated in life, and AI intelligent classification is carried out, and then the photos are added to different design style layouts to form a batch of more recall pictures.
The technical scheme adopted by the invention is as follows: the invention provides an image processing method, which comprises the following steps:
step S1: image processing and beautifying
1) Performing primary brightening treatment on the excessively dark image; the operation can enhance the visibility of the image, so that the image can show good effects in different devices and environments.
2) Performing face recognition, obtaining face feature points, cutting a face image, and respectively detecting brightness values of the whole image and the face; this step helps to more precisely locate the face region for use in subsequent beautifying steps.
3) Acquiring a center point of a human face, and constructing an image x with a gradual 0 to 1 according to the distance between the center point of the human face and a mask area of skin; the closer the image is to 1 with the value close to the skin, and the closer to 0 the value further from the skin; this helps to achieve a more natural transitional effect and avoids abrupt appearance of the processed image.
4) Performing beauty effect operations including whitening, skin grinding and the like, and adopting an image in an HSV format and bilateral filtering operation; the method can improve the attractiveness of the image, retain the detail information of the image and improve the user experience.
5) Operations including functions of large eyes, face thinning, and the like are performed. This allows for easy local adjustment of the image to better fit the aesthetic needs of the user.
Step S2: image classification
1) Dividing the images into four categories, each category comprising about 2000 images; this step of operation helps the training model to better understand the characteristics of different categories, thereby improving classification accuracy.
2) Training an image classification model, setting a learning rate to be 0.001, setting a batch_size to be 128, initializing parameters by using a method of xavierinet, using L2 regularization and dropout, setting an optimizer to be SGD, and setting the iteration times to be 100 epochs; the selection of the parameters and the technology is helpful for improving the training effect of the model, reducing the over-fitting phenomenon and improving the generalization capability of the model.
Step S3: character region identification
Identifying the area where the person is located; items have high accuracy and speed in image segmentation, however, in some cases there may be some problems in identifying a person, such as false positives or false negatives.
The specific method for identifying the area where the person is located comprises the following steps:
1) Using the confidence decay concept, the confidence decreases from 0.4 to 0.1; this means that, when a person is recognized, the largest intersection area of the respective recognition areas is taken as a target area; and when the person cannot be identified, other methods may be tried.
2) If the person cannot be identified, taking a proper position as a target area according to the image type; the method can compensate the problem of missed detection to a certain extent, and improves the detection accuracy of the target area.
3) If the number of the identified characters is greater than three, the target area is still acquired by using the 2 nd method. Because in the case of multiple people there is often missed detection of the person. This helps to reduce the impact of false detection, ensuring that the selected target area is consistent with the actual demand.
Step S4: layout design
1) According to the target area obtained in the step S3, performing layout on the original image by using the Python and the PSD image; the creative image display method can enable a designer to easily apply the creative image to the original image, and achieves personalized display effects.
2) Reading a PSD file to obtain layer information; this allows the designer the flexibility to manipulate and combine layers, adding various effects and elements to the original image.
3) Applying the layer information to the original image, and adjusting the position and the size to adapt to the target area; this helps to maintain harmony and unity of design elements and original images, enhancing the overall visual effect.
4) And storing the synthesized image.
As a further improvement of the present solution, the number of the acquired face feature points in step S1 is 68.
Further, if no person is recognized, a proper position is taken as a target area according to the image type, the proper position is taken as a center by taking the upper area in the vertical drawing, and the horizontal drawing is taken as a center area.
By adopting the scheme, the beneficial effects obtained by the invention are as follows:
according to the image processing method, the images are archived according to the automatic identification shooting scene of the AI, then the face and skin areas of the images are subjected to beautifying treatments such as whitening, acne removing and skin grinding, and finally the layout of the corresponding style is carried out according to the unique information of each image. Therefore, the method and the device realize that the user carries out AI intelligent picture repair on photos accumulated in life, carries out AI intelligent classification, and then adds the photos to different design style layouts to form a batch of images with more recall.
Drawings
FIG. 1 is a block diagram illustrating steps of an image processing method according to the present invention;
the accompanying drawings are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate the invention and together with the embodiments of the invention, serve to explain the invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all embodiments of the invention; all other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
An embodiment of the present invention provides an image processing method, including the steps of:
step S1: image processing and beautifying
1) Performing primary brightening treatment on the excessively dark image; the operation can enhance the visibility of the image, so that the image can show good effects in different devices and environments.
2) Performing face recognition, obtaining face feature points, cutting a face image, and respectively detecting brightness values of the whole image and the face; this step helps to more precisely locate the face region for use in subsequent beautifying steps.
3) Acquiring a center point of a human face, and constructing an image x with a gradual 0 to 1 according to the distance between the center point of the human face and a mask area of skin; the closer the image is to 1 with the value close to the skin, and the closer to 0 the value further from the skin; this helps to achieve a more natural transitional effect and avoids abrupt appearance of the processed image.
4) Performing beauty effect operation, including whitening and skin grinding, adopting HSV format image and bilateral filtering operation; the method can improve the attractiveness of the image, retain the detail information of the image and improve the user experience.
5) Operations including functions of large eyes, face thinning, and the like are performed. This allows for easy local adjustment of the image to better fit the aesthetic needs of the user.
Step S2: image classification
1) Dividing the images into four categories, each category comprising about 2000 images; this step of operation helps the training model to better understand the characteristics of different categories, thereby improving classification accuracy.
3) Training an image classification model, setting a learning rate to be 0.001, setting a batch_size to be 128, initializing parameters by using a method of xavierinet, using L2 regularization and dropout, setting an optimizer to be SGD, and setting the iteration times to be 100 epochs; the selection of the parameters and the technology is helpful for improving the training effect of the model, reducing the over-fitting phenomenon and improving the generalization capability of the model.
Step S3: character region identification
Identifying the area where the person is located; items have high accuracy and speed in image segmentation, however, in some cases there may be some problems in identifying a person, such as false positives or false negatives.
The specific method for identifying the area where the person is located comprises the following steps:
1) Using the confidence decay concept, the confidence decreases from 0.4 to 0.1; this means that, when a person is recognized, the largest intersection area of the respective recognition areas is taken as a target area; and when the person cannot be identified, other methods may be tried.
2) If the person cannot be identified, taking a proper position as a target area according to the image type; the method can compensate the problem of missed detection to a certain extent, and improves the detection accuracy of the target area.
3) If the number of the identified characters is greater than three, the target area is still acquired by using the 2 nd method. Because in the case of multiple people there is often missed detection of the person. This helps to reduce the impact of false detection, ensuring that the selected target area is consistent with the actual demand.
Step S4: layout design
5) According to the target area obtained in the step S3, performing layout on the original image by using the Python and the PSD image; the creative image display method can enable a designer to easily apply the creative image to the original image, and achieves personalized display effects.
6) Reading a PSD file to obtain layer information; this allows the designer the flexibility to manipulate and combine layers, adding various effects and elements to the original image.
7) Applying the layer information to the original image, and adjusting the position and the size to adapt to the target area; this helps to maintain harmony and unity of design elements and original images, enhancing the overall visual effect.
8) And storing the synthesized image.
In the second embodiment, first, a user takes a batch of image data, such as photos, and classifies and files them automatically according to the style of the old, modern, korean, european, etc., for use in the subsequent design drawings.
Then check whether the photo has been subjected to a repair process. This may be accomplished by identifying common repair icons in the photograph using a machine learning algorithm.
If the pictures are not subjected to picture repair, the technical scheme provided by the invention can automatically repair the pictures by using a pre-trained deep learning model. The model can identify the areas of the face and the skin in the photo, and whiten, thin the face, remove the spots and the like. In the processing procedures of whitening, face thinning, freckle removing and the like, a very small number of photo details can be blurred. For these blurred portions, our system will use a sharpening algorithm to improve the overall sharpness of the photograph.
After the automatic mapping is completed, our system uses another deep learning model to identify the human body region. The model can recognize the human body shapes in the photo, and then nest the shapes into a Photoshop template designed in advance. Thus, the user can generate a photo with a clean feeling and a strong design feeling.
In the process, the technical scheme provided by the invention can process photos with various formats, including JPEG, PNG and RAW formats, and can also process photos with various resolutions, including low-resolution photos taken by a mobile phone camera to high-resolution photos taken by a professional camera.
According to the embodiment, the user can intelligently repair photos accumulated in life, intelligently classify the photos and then add the photos to different design style layouts to form a batch of images with more memories.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus.
Although embodiments of the present invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made therein without departing from the principles and spirit of the invention, the scope of which is defined in the appended claims and their equivalents.
The invention and its embodiments have been described above with no limitation, and the actual construction is not limited to the embodiments of the invention as shown in the drawings. In summary, if one of ordinary skill in the art is informed by this disclosure, a structural manner and an embodiment similar to the technical solution should not be creatively devised without departing from the gist of the present invention.
Claims (3)
1. An image processing method, characterized by comprising the steps of:
step S1: image processing and beautifying
1) Performing primary brightening treatment on the excessively dark image;
2) Performing face recognition, obtaining face feature points, cutting a face image, and respectively detecting brightness values of the whole image and the face;
3) Acquiring a center point of a human face, and constructing an image x with a gradual 0 to 1 according to the distance between the center point of the human face and a mask area of skin; the closer the image is to 1 with the value close to the skin, and the closer to 0 the value further from the skin;
4) Performing beauty effect operation, including whitening and skin grinding, adopting HSV format image and bilateral filtering operation;
5) Performing operations including large-eye and face-thinning functions;
step S2: image classification
1) Dividing the images into four classes, wherein each class comprises 2000 images;
2) Training an image classification model, setting a learning rate to be 0.001, setting a batch_size to be 128, initializing parameters by using a method of xavierinet, using L2 regularization and dropout, setting an optimizer to be SGD, and setting the iteration times to be 100 epochs;
step S3: character region identification
Identifying the area where the person is located;
the specific method for identifying the area where the person is located comprises the following steps:
1) Using the confidence decay concept, the confidence decreases from 0.4 to 0.1;
2) If the person cannot be identified, taking a proper position as a target area according to the image type;
3) If the number of the identified characters is greater than three, the target area is still acquired by using the method 2);
step S4: layout design
1) According to the target area obtained in the step S3, performing layout on the original image by using the Python and the PSD image;
2) Reading a PSD file to obtain layer information;
3) Applying the layer information to the original image, and adjusting the position and the size to adapt to the target area;
4) And storing the synthesized image.
2. An image processing method according to claim 1, wherein: the number of the obtained face feature points in the step S1 is 68.
3. An image processing method according to claim 1, wherein: the proper position is the center of the upper middle area of the vertical drawing, and the center area of the horizontal drawing.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310580329.9A CN116485639A (en) | 2023-05-23 | 2023-05-23 | Image processing method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310580329.9A CN116485639A (en) | 2023-05-23 | 2023-05-23 | Image processing method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116485639A true CN116485639A (en) | 2023-07-25 |
Family
ID=87213988
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310580329.9A Pending CN116485639A (en) | 2023-05-23 | 2023-05-23 | Image processing method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116485639A (en) |
-
2023
- 2023-05-23 CN CN202310580329.9A patent/CN116485639A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108764091B (en) | Living body detection method and apparatus, electronic device, and storage medium | |
US10872420B2 (en) | Electronic device and method for automatic human segmentation in image | |
CN106471521B (en) | Adaptive eye artifact identification and correction system | |
US10049477B1 (en) | Computer-assisted text and visual styling for images | |
CN109697690A (en) | Image Style Transfer method and system | |
CN107771336A (en) | Feature detection and mask in image based on distribution of color | |
US9691136B2 (en) | Eye beautification under inaccurate localization | |
CN107818305A (en) | Image processing method, device, electronic equipment and computer-readable recording medium | |
US20220230323A1 (en) | Automatically Segmenting and Adjusting Images | |
US20090252435A1 (en) | Cartoon personalization | |
CN110287771B (en) | Image palm region extraction method and device | |
CN105303161A (en) | Method and device for shooting multiple people | |
CN109274891B (en) | Image processing method, device and storage medium thereof | |
CN107766831A (en) | Image processing method, device, mobile terminal and computer-readable recording medium | |
CN103902958A (en) | Method for face recognition | |
CN113888437A (en) | Image processing method, image processing device, electronic equipment and computer readable storage medium | |
CN108810406A (en) | Portrait light efficiency processing method, device, terminal and computer readable storage medium | |
CN116048244B (en) | Gaze point estimation method and related equipment | |
US20240144623A1 (en) | Modifying poses of two-dimensional humans in two-dimensional images by reposing three-dimensional human models representing the two-dimensional humans | |
Bugeau et al. | Influence of color spaces for deep learning image colorization | |
CN113379623A (en) | Image processing method, image processing device, electronic equipment and storage medium | |
US20240144520A1 (en) | Generating three-dimensional human models representing two-dimensional humans in two-dimensional images | |
AU2023233192A1 (en) | Removing distracting objects from digital images | |
US12045963B2 (en) | Detecting object relationships and editing digital images based on the object relationships | |
US20240169501A1 (en) | Dilating object masks to reduce artifacts during inpainting |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |