WO2024001363A1 - Image processing method and apparatus, and electronic device - Google Patents

Image processing method and apparatus, and electronic device Download PDF

Info

Publication number
WO2024001363A1
WO2024001363A1 PCT/CN2023/085096 CN2023085096W WO2024001363A1 WO 2024001363 A1 WO2024001363 A1 WO 2024001363A1 CN 2023085096 W CN2023085096 W CN 2023085096W WO 2024001363 A1 WO2024001363 A1 WO 2024001363A1
Authority
WO
WIPO (PCT)
Prior art keywords
model
image
face
sample image
image processing
Prior art date
Application number
PCT/CN2023/085096
Other languages
French (fr)
Chinese (zh)
Inventor
黄硕
Original Assignee
魔门塔(苏州)科技有限公司
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 魔门塔(苏州)科技有限公司 filed Critical 魔门塔(苏州)科技有限公司
Publication of WO2024001363A1 publication Critical patent/WO2024001363A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/0475Generative networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/094Adversarial learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/04Context-preserving transformations, e.g. by using an importance map
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/172Classification, e.g. identification
    • YGENERAL 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/10Internal combustion engine [ICE] based vehicles
    • Y02T10/40Engine management systems

Definitions

  • the present application relates to the field of image processing technology, and in particular to an image processing method, device and electronic equipment.
  • Face recognition is based on human facial features.
  • the identity features contained in each face are further extracted through a neural network and compared with known faces to identify the identity of each face.
  • the human face images when collecting human face images (when shooting with human faces as the subject), the human face images can be divided into two states according to the different states of light illuminating the face.
  • the illumination of the face is uneven, and there are obvious areas with different illumination intensities on the face in the face image.
  • the illumination intensity of the left side of the face that is illuminated by the light will be significantly stronger than that of the right side of the face that is not illuminated by the light, resulting in the left half of the face being brighter than the right half of the face.
  • a circular beam of light shines on the face, a circular spot will appear on the face illuminated by the beam.
  • the illumination intensity of the spot on the face will be significantly stronger than that of the other parts of the face, resulting in an obvious brightness difference in the collected images. face images.
  • the other state is that the face is evenly illuminated, and there are no obvious areas with different illumination intensities on the face in the face image. For example, when light shines from the front of the head to the face, there is no obvious shadow on the face under the light, so that a face image with even face illumination can be collected.
  • Facial image samples with uneven facial illumination can play a role in image amplification for training face recognition models, thereby improving the recognition accuracy of such samples.
  • this application provides an image processing method, device and electronic equipment. This application also provides a computer-readable storage medium.
  • this application provides an image processing method, which method includes:
  • first face image where the first face image is a face image with uniform facial illumination
  • the image processing model includes a first generative model for attaching Add uneven light and shadow effects on the face to generate the second face image.
  • light and shadow migration is performed on face image samples with uniform facial illumination in face recognition based on the image processing model, which can greatly reduce the difficulty and acquisition difficulty of facial image samples with uneven facial illumination. cost. While expanding the number of face recognition samples, it also solves the sample imbalance problem caused by the relatively small number of face image samples with uneven facial illumination, and can improve the training accuracy of the face recognition model.
  • the source is a face image sample with uniform facial illumination (real sample)
  • light and shadow migration is used to generate a face image sample with uneven facial illumination.
  • the face image sample with uneven facial illumination is close to Real samples are beneficial to improving the training accuracy of face recognition models.
  • the image processing model is a generative adversarial network model.
  • the image processing model further includes:
  • a discriminant model which is used to determine sample images based on light and shadow in the process of training the image processing model, and analyze the additional light and shadow effects of the first generative model according to the output of the first generative model, so as to determine the light and shadow additional effects of the first generative model according to the discriminant model.
  • the analysis result adjusts the first generation model, wherein the face sample image input to the first generation model is a face image with uniform facial illumination, and the light and shadow determination sample image is a person with uneven facial illumination. face image.
  • Using a generative adversarial network model to implement the image processing model of the embodiment of the present application can reduce the difficulty of obtaining the image processing model of the embodiment of the present application. Furthermore, using a generative adversarial network model and conducting model training through the mutual game between the generative model and the discriminative model can reduce the difficulty of obtaining training samples required in the model training process.
  • the image processing model further includes:
  • a second generative model is an inverse mapping of the first generative model.
  • the second generative model is used to convert the first generative model into a second generative model during the training of the image processing model.
  • the output is used as input to adjust the first generative model based on a comparison of the output of the second generative model and the input of the first generative model.
  • the image processing model in the embodiment of the present application adopts the structure of a recurrent generative adversarial network, which improves the training efficiency of model training and improves the processing precision and accuracy of the image processing model.
  • the present application provides a model training method.
  • the method is used to train an image processing model.
  • the image processing model is used to add a light and shadow effect of uneven facial illumination to a face image with uniform facial illumination, so as to Generate a face image with uneven facial illumination.
  • the image processing model is a generative adversarial network model.
  • the image processing model includes a first generation model and a discriminant model. The method includes:
  • first face sample image is a face image with uniform facial illumination
  • the third face sample image is a face image with uneven facial illumination
  • the first generation model is adjusted according to the analysis results of the discriminant model.
  • Using a generative adversarial network model to implement the image processing model of the embodiment of the present application can reduce the difficulty of obtaining the image processing model of the embodiment of the present application.
  • the third face sample image and the first face sample image are not Pairs of sample images.
  • the method further includes:
  • the fourth face sample image is a face image with uniform facial illumination
  • the discriminant model based on the third face sample image, the light and shadow additional effects of the first generation model are analyzed based on the fifth face sample image.
  • the method further includes:
  • the discriminant model based on the sixth face sample image, the light and shadow additional effects of the first generation model are analyzed based on the second face sample image.
  • the image processing model further includes a second generative model, and the second generative model is an inverse mapping of the first generative model;
  • the method also includes:
  • the image processing model in the embodiment of the present application adopts the structure of a recurrent generative adversarial network, which improves the training efficiency of model training and improves the processing precision and accuracy of the image processing model.
  • this application provides an image processing device, which includes:
  • An image processing model which is used to obtain a first face image and output a second face image, where:
  • the first face image is a face image with uniform facial illumination
  • the image processing model includes a first generation model, and the first generation model is used to add a light and shadow effect of uneven facial illumination to the first face image to generate the second face image.
  • the image processing model is a generative adversarial network model.
  • the image processing model further includes:
  • a discriminant model which is used to determine sample images based on light and shadow in the process of training the image processing model, and analyze the additional light and shadow effects of the first generative model according to the output of the first generative model, so as to determine the light and shadow additional effects of the first generative model according to the discriminant model.
  • the analysis result adjusts the first generation model, wherein the face sample image input to the first generation model is a face image with uniform facial illumination, and the light and shadow determination sample image is a person with uneven facial illumination. face image.
  • the image processing model further includes:
  • a second generative model is an inverse mapping of the first generative model.
  • the second generative model is used to convert the first generative model into a second generative model during the training of the image processing model.
  • the output is used as input to adjust the first generative model based on a comparison of the output of the second generative model and the input of the first generative model.
  • the present application provides a model training device, which is used to train an image processing model.
  • the image processing model is used to add the light and shadow effect of uneven facial illumination to the face image with uniform facial illumination to generate the face image with uneven facial illumination.
  • the image processing model is a generative adversarial network model.
  • the image processing model includes a first generation model and a discriminant model, and the device includes:
  • a first sample acquisition module configured to acquire a first face sample image and input the first face sample image to the first generation model, wherein the first face sample image is facial illumination Uniform face images;
  • a second sample acquisition module configured to acquire a second face sample image generated by the first generation model based on the first face sample image
  • a third sample acquisition module configured to acquire a third face sample image and input the third face sample image into the discrimination model, wherein the third face sample image is one with uneven facial illumination. face images;
  • An analysis result acquisition module which is used to obtain the analysis results of the discrimination model, wherein the analysis results include: the discrimination model is based on the third face sample image, and the analysis result is based on the second face sample image.
  • a first adjustment module configured to adjust the first generation model according to the analysis results.
  • the third face sample image and the first face sample image are not paired sample images.
  • the first sample acquisition module is also used to: acquire a fourth face sample image, wherein the fourth face sample image is a face image with uniform facial illumination; input the fourth face sample image to the first generative model;
  • the second sample acquisition module is also used to acquire a fifth face sample image generated by the first generation model based on the fourth face sample image;
  • the analysis result obtained by the analysis result acquisition module also includes that the discrimination model is based on the third face sample image and analyzes the light and shadow additional effects of the first generation model based on the fifth face sample image. result.
  • the third sample acquisition module is also used to acquire a sixth face sample image and input the sixth face sample image to the discrimination model, wherein the sixth face sample image is a face with uneven illumination. face images;
  • the analysis result obtained by the analysis result acquisition module also includes that the discrimination model is based on the sixth face sample image and analyzes the light and shadow additional effects of the first generation model based on the second face sample image. result.
  • the image processing model further includes a second generative model, and the second generative model is an inverse mapping of the first generative model;
  • the second sample acquisition module is also used to input the second face sample image to the second generation model
  • the device also includes a second adjustment module, the second adjustment module being configured to: obtain a seventh face sample image generated by the second generation model based on the second face sample image; compare the seventh face sample image with the second face sample image; Face sample image and the first face sample image, and the first generation model is adjusted according to the comparison result.
  • the second adjustment module being configured to: obtain a seventh face sample image generated by the second generation model based on the second face sample image; compare the seventh face sample image with the second face sample image; Face sample image and the first face sample image, and the first generation model is adjusted according to the comparison result.
  • the present application provides an electronic device, the electronic device comprising a processor for executing computer program instructions, wherein when the computer program instructions stored in the memory are executed by the processor, the electronic device is triggered The method as described in the first aspect is performed.
  • the present application provides an electronic device, the electronic device comprising a processor for executing computer program instructions, wherein when the computer program instructions stored in the memory are executed by the processor, the electronic device is triggered Perform the method as described in the second aspect.
  • the present application provides a computer-readable storage medium that stores a computer program that, when run on a computer, causes the computer to execute the method described in the first aspect or the second aspect. .
  • Figure 1 shows a method flow chart according to an embodiment of the present application
  • Figure 2 shows a schematic structural diagram of an image processing model according to an embodiment of the present application
  • Figure 3 shows a model training flow chart according to an embodiment of the present application
  • Figure 4 shows a structural block diagram of an image processing device according to an embodiment of the present application
  • Figure 5 shows a structural block diagram of a model training device according to an embodiment of the present application
  • Figure 6 shows a schematic diagram of an electronic device according to an embodiment of the present application.
  • a feasible implementation solution is to perform a dimming operation when taking pictures, take an image of a person's face with uneven illumination, and cut the image to obtain an image with uneven illumination. Face images.
  • the above implementation solution requires special image shooting, which is costly and requires a lot of work.
  • an embodiment of the present application proposes an image processing method. Based on the image processing model, a face image with uneven facial illumination is generated from a facial image with uniform facial illumination.
  • the face image can be any type of image, for example, a color image, a black and white image, a grayscale image, etc.
  • the face image is an infrared face image. Infrared face images are face images captured by infrared cameras, usually single-channel images.
  • Figure 1 shows a flow chart of a method according to an embodiment of the present application.
  • the electronic device executes the process shown in Figure 1 to generate a face image with uneven facial illumination.
  • the first face image is a face image with uniform facial illumination.
  • the image processing model is used to perform light and shadow migration operations.
  • Light and shadow migration refers to converting the facial light and shadow effects of face images with uneven facial illumination (including yin and yang faces) to faces in face images with uniform facial illumination. .
  • the second face image is an image generated by the image processing model based on the first face image, and the second face image is a face image with uneven facial illumination.
  • the difference between the second face image and the first face image lies in the uniformity of illumination on the face.
  • the second face image is consistent with the first face image.
  • light and shadow migration is performed on face image samples with uniform facial illumination in face recognition based on the image processing model, which can greatly reduce the difficulty of obtaining facial image samples with uneven facial illumination. and acquisition costs. While expanding the number of face recognition samples, it also solves the sample imbalance problem caused by the relatively small number of face image samples with uneven facial illumination, and can improve the training accuracy of the face recognition model.
  • the source is a face image sample with uniform facial illumination (real sample)
  • light and shadow migration is used to generate a face image sample with uneven facial illumination.
  • the face image sample with uneven facial illumination is close to Real samples are beneficial to improving the training accuracy of face recognition models.
  • the image processing model is a deep learning model, and the image processing model is obtained through model training.
  • training samples need to be provided.
  • pairs of training samples need to be provided. That is, it is necessary to provide the input sample of the image processing model (face image with uniform facial illumination) and the output sample of the image processing model (face image with uneven facial illumination) paired with the input sample.
  • the difference between the two face images lies in the uniformity of illumination on the face. In other features, the two face images are consistent.
  • an image processing model is constructed based on the Generative Adversarial Networks (GAN) model.
  • GAN Generative Adversarial Networks
  • the GAN model is a deep learning model that contains at least two modules: a generative model and a discriminative model. It produces good output through mutual game learning between the generative model and the discriminative model.
  • Using a generative adversarial network model to implement the image processing model of the embodiment of the present application can reduce the difficulty of obtaining the image processing model of the embodiment of the present application. Furthermore, using a generative adversarial network model and conducting model training through the mutual game between the generative model and the discriminative model can reduce the difficulty of obtaining training samples required in the model training process.
  • FIG. 2 shows a schematic structural diagram of an image processing model according to an embodiment of the present application.
  • the image processing model includes a first generation model 210 .
  • the image 201 roughly represents a facial image. There is no area with different brightness on the face of the image 201.
  • the image 201 refers to a face image (first face image) with uniform facial illumination.
  • Image 202 roughly represents the facial image. Compared with image 201, the difference between image 202 is that the brightness of the left and right half of the face is different (yin and yang face). Image 202 refers to the same facial image corresponding to image 201 ( Only the illumination status of the face is different), the face image with uneven facial illumination (the second face image).
  • the face image (image 201, first face image) with uniform facial illumination is input to the first generation model 210.
  • the first generation model 210 is used to provide input to the first generation model 210.
  • a light and shadow effect with uneven facial illumination is added to the human face image to generate a human face image with uneven facial illumination (image 202, second face image).
  • Image 203 roughly represents the face image. Compared with image 201, the brightness of the left and right half of the face in image 203 is different (yin and yang face), and, except for the brightness state, the expression of image 203 is different from that of image 201 and image 203.
  • the image 202 is also different.
  • the image 203 refers to the face image corresponding to the images 201 and 202, and the face illumination is uneven. Face image (light and shadow determination sample image).
  • the image processing model also includes a discriminative model 220.
  • the first generation model 210 is input with a face sample image with uniform facial illumination, and the discriminant model 220 determines the sample image (image 203, with uneven facial illumination) based on the light and shadow input to the discriminant model 220. face image), analyze the light and shadow additional effects of the first generative model 210 according to the output of the first generative model 210, and adjust the first generative model according to the analysis results of the discriminant model 220, thereby continuously optimizing the additional facial lighting of the first generative model 210. Implementation of uneven light and shadow effects.
  • the image processing model uses Unsupervised Generative Attentional Networks with Adaptive Layer-Instance Normalization for Image-to-Image Translation, U-GAT -IT) model.
  • U-GAT-IT Unsupervised Generative Attentional Networks with Adaptive Layer-Instance Normalization for Image-to-Image Translation
  • the U-GAT-IT model is an unsupervised generative network model, and model training does not require paired data. That is, during the model training process, the light and shadow determination sample image (face image with uneven facial illumination) input to the discriminant model 220 and the face sample image with uniform facial illumination input to the first generation model 210 may not be the same. Right image.
  • the discriminant model 220 uses an attention mechanism (mainly reflected in weighted feature maps). Based on the attention map obtained by the auxiliary classifier, the discriminant model 220 helps the first generation model 210 determine where in the human image to perform concentrated conversion of light and shadow effects by distinguishing the source domain and the target domain.
  • an attention mechanism mainly reflected in weighted feature maps
  • the image processing model uses an adaptive hybrid normalization layer (Adaptive Layer-Instance Normalization, AdaLIN), which can automatically adjust the proportion of instance normalization (Instance Normalization, IN) and layer normalization (Layer Normalization, LN), helping The attention-guided model flexibly controls the changes in shape and texture without modifying the model architecture or hyperparameters, and achieves style conversion of light and shadow effects (uneven illumination on the face).
  • AdaLIN Adaptive Layer-Instance Normalization
  • IN instance normalization
  • Layer Normalization Layer Normalization
  • LN Layer Normalization
  • the image processing model also adopts the structure of cycle-generative adversarial network (cycle-gan). Based on the structure of the recurrent generative adversarial network, the training efficiency of model training is improved, and the processing precision and accuracy of the image processing model are improved.
  • cycle-gan cycle-generative adversarial network
  • the image processing model also includes a second generation model 230.
  • Image 204 roughly represents the facial image. Compared with images 201 and 202, the difference between image 204 is that the brightness status of the face is different. The brightness of the left and right half of the face in image 204 is different, but the degree of difference is lower than that of the image. 202. That is, compared to the uneven illumination of the face of image 202 (yin and yang face), image 204 is more inclined to uniform facial illumination, but image 204 does not achieve complete uniform illumination of the face (the illumination state of image 204 does not reach the same level as Image 201 consistent degree).
  • Image 202 refers to the face image corresponding to the same facial image as images 201 and 202 (only the lighting state of the face is different). The lighting state of the face is uniform compared with that of image 202, but the uniformity of lighting is not consistent with that of image 201. .
  • the second generative model 230 is the inverse mapping of the first generative model 210 . That is, after the training of the image processing model is completed, the first generation model 210 can convert the face image with uniform facial illumination into the face image with uneven facial illumination (image 204), and the second generation model 230 can convert the face image into a face image with uneven facial illumination (image 204). A face image with uneven illumination is converted into a face image with even face illumination.
  • face image A with uniform facial illumination is input to the first generation model 210, and the first generation model 210 generates face image B; then face image B is input to the second generation model 230, and the second generation model 230 generates face image B.
  • Model 230 will convert face image B into face image A.
  • the first generation model 210 is the input person.
  • the execution effect of adding light and shadow effects to face images cannot reach the ideal state. Therefore, the face image A with uniform facial illumination is input to the first generation model 210, and the first generation model 210 generates the face image B; then the face image B is input to the second generation model 230, and the second generation model 230 Convert face image B into face image C. There is a difference between face image C and face image A.
  • the output of the first generation model 210 is used as the input of the second generation model 230, and the first generation model is adjusted according to the comparison result between the output of the second generation model 230 and the input of the first generation model 210. 210, thereby continuously optimizing the execution effect of adding light and shadow effects with uneven facial illumination to the first generation model 210.
  • the comparison between the output of the second generative model 230 and the input of the first generative model 210 is implemented based on L2 norm loss (L2Loss).
  • embodiments of this application propose a model training method.
  • Figure 3 shows a model training flow chart according to an embodiment of the present application.
  • the electronic device executes the process shown in Figure 3 to train the image processing model with the structure shown in Figure 2.
  • S301 identify and separate human face images from sample images.
  • S302 Preprocess the separated human face image to obtain a human face sample image.
  • the human face image is scaled to a preset size; the human face image is cut to retain the preset facial features; and the facial features in the face image are aligned to the preset image position.
  • S310 classify the face sample image and divide it into two categories: a face image with uniform facial illumination (for example, the first face sample image) and a face image with uneven facial illumination (for example, the third face sample image).
  • a face image with uniform facial illumination for example, the first face sample image
  • a face image with uneven facial illumination for example, the third face sample image
  • S320 Use face images with uniform facial illumination and face images with uneven facial illumination to train the image processing model with the structure shown in Figure 2.
  • the face image with uniform facial illumination is input to the first generation model 210
  • the facial image with uneven facial illumination is input to the discriminant model 220.
  • the discriminant model 220 is based on the face image with uneven facial illumination, and analyzes the light and shadow additional effects of the first generation model 210 according to the image output by the first generation model 210 (the first generation model 210 is a face with uniform facial illumination). The execution effect of adding light and shadow effects with uneven lighting on the face to the face image).
  • the first generation model 210 is adjusted according to the analysis results of the discriminant model 220 .
  • a first face sample image (a face image with uniform facial illumination) is input to the first generation model 210, and the first generation model 210 generates a second face sample image based on the first face sample image.
  • the second face sample image is an image obtained by successfully adding the light and shadow effect of uneven facial illumination to the first face sample image.
  • the third face sample image (face image with uneven facial illumination) is input to the discriminant model 220 .
  • the discriminant model 220 is based on the third face sample image and analyzes the light and shadow additional effects of the first generation model 210 based on the second face sample image.
  • the face image with uniform facial illumination input to the first generation model 210 and the facial image with uneven facial illumination input to the discriminant model 220 may not be paired images. That is, the difference between the first face sample image and the third face sample image may not only be the uniformity of facial illumination, but also may be different in other facial features.
  • the first face sample image may be an image of person A
  • the third face sample image may be an image of person B
  • the first face sample image may be an image of person A in the shooting view.
  • the image under angle a, the third face sample image may be the image of person A under shooting angle b.
  • the face image with uniform facial illumination input to the first generation model 210 and the facial image with uneven facial illumination input to the discriminant model 220 can be combined arbitrarily. For example, when the facial image with uniform facial illumination input to the first generation model 210 remains unchanged, replace the facial image with uneven facial illumination input to the discriminant model 220; or, after inputting to the discriminant model 220 While the facial image with uneven facial illumination remains unchanged, the facial image with uniform facial illumination input to the first generation model 210 is replaced.
  • a first face sample image (a face image with uniform facial illumination) is input to the first generation model 210, and the first generation model 210 generates a second face sample image based on the first face sample image.
  • the second face sample image is an image obtained by successfully adding the light and shadow effect of uneven facial illumination to the first face sample image.
  • the third face sample image (face image with uneven facial illumination) is input to the discriminant model 220 .
  • the discriminant model 220 is based on the third face sample image and analyzes the light and shadow additional effects of the first generation model 210 based on the second face sample image.
  • the first generation model 210 is adjusted according to the analysis results of the discriminant model 220 .
  • the fourth face sample image (a face image with even facial illumination, an image different from the first face sample image) is input to the first generation model 210, and the first generation model 210 generates the image according to the fourth face sample image. Generate a fifth face sample image.
  • the discriminant model 220 analyzes the light and shadow additional effects of the first generation model 210 based on the fifth face sample image based on the third face sample image.
  • the first generation model 210 continues to be adjusted according to the analysis results of the discriminant model 220 .
  • the first face sample image (face image with uniform facial illumination) is input to the first generation model 210, and the first generation model 210 generates the second face sample image based on the first face sample image.
  • the second face sample image is an image obtained by successfully adding the light and shadow effect of uneven facial illumination to the first face sample image.
  • the third face sample image (face image with uneven facial illumination) is input to the discriminant model 220 .
  • the discriminant model 220 is based on the third face sample image and analyzes the light and shadow additional effects of the first generation model 210 based on the second face sample image.
  • the first generation model 210 is adjusted according to the analysis results of the discriminant model 220 .
  • the sixth face sample image (a face image with uneven facial illumination, an image different from the third face image) is input to the discriminant model 220.
  • the discriminant model 220 analyzes the light and shadow additional effects of the first generation model 210 based on the second face sample image based on the sixth face sample image.
  • the first generation model 210 is adjusted according to the analysis results of the discriminant model 220 .
  • the face image with uniform facial illumination is input to the first generation model 210.
  • the first generation model 210 After the first generation model 210 generates a new image according to the facial image with uniform facial illumination, the first generation model 210 outputs The image is also input to a second generative model 230.
  • the second generation model 230 generates a new image according to the image output by the first generation model 210, and adjusts the first generation model 210 by comparing the image output by the second generation model 230 with the image input to the first generation model 210 (and adjusts it simultaneously. Second generative model 230).
  • a first face sample image (a face image with uniform facial illumination) is input to the first generation model 210, and the first generation model 210 generates a second face sample image based on the first face sample image.
  • Figure 4 shows a structural block diagram of an image processing device according to an embodiment of the present application.
  • the image processing device 400 includes:
  • Image processing model 410 (for example, the image processing model shown in Figure 2), which is used to obtain a first face image and output a second face image, where:
  • the first face image is a face image with uniform facial illumination
  • the image processing model includes a first generation model 411 (for example, the first generation model 411 can refer to the first generation model 210 shown in Figure 2).
  • the first generation model is used to add uneven facial illumination to the first face image. Light and shadow effects to generate a second face image.
  • the embodiment of the present application also proposes a model training device, which is used to train an image processing model (for example, the image processing model as shown in Figure 2).
  • the image processing model is used to add uneven facial illumination light and shadow effects to facial images with uniform facial illumination to generate facial images with uneven facial illumination.
  • the image processing model is a generative adversarial network model.
  • the image processing model includes the first Generative models and discriminative models.
  • Figure 5 shows a structural block diagram of a model training device according to an embodiment of the present application.
  • the model training device 500 includes:
  • the first sample acquisition module 501 is used to acquire the first face sample image and input the first face sample image to the first generation model (for the first generation model, refer to the first generation model 210 shown in Figure 2) , wherein the first face sample image is a face image with uniform facial illumination (refer to image 201);
  • the second sample acquisition module 502 is used to acquire the second face sample image generated by the first generation model based on the first face sample image and input the second face sample image into the discriminant model (refer to Figure 2 for the discriminant model) The discriminant model shown 220);
  • the third sample acquisition module 503 is used to acquire a third face sample image and input the third face sample image into the discriminant model, where the third face sample image is a face image with uneven facial illumination (refer to image203);
  • the analysis result acquisition module 504 is used to obtain the analysis results of the discriminant model, where the analysis results include the result of the discriminant model analyzing the light and shadow additional effects of the first generation model based on the second face sample image based on the third face sample image. ;
  • the first adjustment module 505 is used to adjust the first generation model according to the analysis results.
  • the second sample acquisition module 502 is also used to input the second face sample image to the second generation model 5 (for the second generation model, refer to the second generation model 230 shown in Figure 2).
  • the model training device 500 also includes a second adjustment module 506, which is used to obtain a fourth face sample image generated by the second generation model based on the second face sample image. According to the fourth face sample image and the first face sample The comparison results of the images adjust the first generative model.
  • each module is only a division of logical functions.
  • each module can be divided into The functionality of a module is implemented in the same or more software and/or hardware.
  • the device proposed in the embodiment of the present application may be fully or partially integrated into a physical entity, or may be physically separated.
  • these modules can all be implemented in the form of software calling through processing elements; they can also all be implemented in the form of hardware; some modules can also be implemented in the form of software calling through processing elements, and some modules can be implemented in the form of hardware.
  • the determination module can be a separately established processing element, or it can be a collection of It is implemented in a chip of an electronic device.
  • the implementation of other modules is similar.
  • all or part of these modules can be integrated together or implemented independently.
  • each step of the above method or each of the above modules can be completed by instructions in the form of hardware integrated logic circuits or software in the processor element.
  • the above modules may be one or more integrated circuits configured to implement the above methods, such as: one or more specific integrated circuits (Application Specific Integrated Circuit, ASIC), or one or more digital signal processors ( Digital Singnal Processor, DSP), or one or more Field Programmable Gate Array (Field Programmable Gate Array, FPGA), etc.
  • ASIC Application Specific Integrated Circuit
  • DSP Digital Singnal Processor
  • FPGA Field Programmable Gate Array
  • these modules can be integrated together and implemented in the form of a System-On-a-Chip (SOC).
  • SOC System-On-a-Chip
  • an embodiment of this application also proposes an electronic device.
  • the electronic device includes a memory for storing computer program instructions and a processor for executing the program instructions.
  • the processor controls the electronic device to perform actions in the image processing method shown in the embodiments of the present application.
  • an embodiment of this application also proposes an electronic device.
  • the electronic device includes a memory for storing computer program instructions and a processor for executing the program instructions.
  • the processor controls the electronic device to perform actions in the model training method shown in the embodiments of this application.
  • Figure 6 shows a schematic diagram of an electronic device according to an embodiment of the present application.
  • the electronic device 600 includes a memory 610 and a processor 620 .
  • the processor 620 controls the electronic device 600 to perform actions in the image processing method or model training method shown in the embodiments of this application.
  • an embodiment of this application also proposes an electronic chip.
  • the electronic chip includes a memory for storing computer program instructions and a processor for executing computer program instructions. When the computer program instructions When executed by the processor, the electronic chip is triggered to perform actions in the image processing method shown in the above embodiments of the present application.
  • an embodiment of this application also proposes an electronic chip.
  • the electronic chip includes a memory for storing computer program instructions and a processor for executing computer program instructions. When the computer program When the instructions are executed by the processor, the electronic chip is triggered to execute the actions in the model training method shown in the above embodiments of the present application.
  • equipment, devices, and modules described in the embodiments of this application may be implemented by computer chips or entities, or by products with certain functions.
  • embodiments of the present application may be provided as methods, devices, or computer program products.
  • the invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects.
  • the invention may take the form of a computer program product embodied on one or more computer-usable storage media embodying computer-usable program code therein.
  • any function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium.
  • the technical solution of the present application is essentially or the part that contributes to the existing technology or the part of the technical solution can be embodied in the form of a software product.
  • the computer software product is stored in a storage medium, including several The instructions are used to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of this application.
  • an embodiment of the present application also provides a computer-readable storage medium.
  • the computer-readable storage medium stores a computer program that, when run on a computer, causes the computer to execute the method provided by the embodiment of the present application.
  • An embodiment of the present application also provides a computer program product.
  • the computer program product includes a computer program that, when run on a computer, causes the computer to execute the method provided by the embodiment of the present application.
  • These computer program instructions may also be stored in a computer-readable memory that causes a computer or other programmable data processing apparatus to operate in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction means, the instructions
  • the device implements the functions specified in a process or processes of the flowchart and/or a block or blocks of the block diagram.
  • These computer program instructions may also be loaded onto a computer or other programmable data processing device, causing a series of operating steps to be performed on the computer or other programmable device to produce computer-implemented processing, thereby executing on the computer or other programmable device.
  • Instructions provide steps for implementing the functions specified in a process or processes of a flowchart diagram and/or a block or blocks of a block diagram.
  • At least one refers to one or more, and “multiple” refers to two or more.
  • “And/or” describes the association of associated objects, indicating that there can be three relationships.
  • a and/or B can represent the existence of A alone, the existence of A and B at the same time, or the existence of B alone. Where A and B can be singular or plural.
  • the character “/” generally indicates that the related objects are in an "or” relationship. “At least one of the following” and similar expressions refers to any combination of these items, including any combination of single or plural items.
  • At least one of a, b and c can mean: a, b, c, a and b, a and c, b and c or a and b and c, where a, b, c can be single, also Can be multiple.
  • the terms “comprising”, “comprises” or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, commodity or device that includes a series of elements not only includes those elements, but also includes Other elements are not expressly listed or are inherent to the process, method, article or equipment. Without further limitation, an element defined by the statement “comprises a" does not exclude the presence of additional identical elements in a process, method, article, or device that includes the stated element.
  • the application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer.
  • program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types.
  • the present application may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communications network.
  • program modules may be located in both local and remote computer storage media including storage devices.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Molecular Biology (AREA)
  • Software Systems (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Mathematical Physics (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • Computing Systems (AREA)
  • Multimedia (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Human Computer Interaction (AREA)
  • Image Processing (AREA)

Abstract

Provided in the present application are an image processing method and apparatus, and an electronic device. The image processing method comprises: acquiring a first facial image, wherein the first facial image is a facial image where the face is uniformly illuminated; inputting the first facial image into an image processing model; and acquiring a second facial image, which is output by means of the image processing model, wherein the image processing model comprises a first generation model, and the first generation model is used for adding, to the first facial image, a light and shadow effect so that the face is unevenly illuminated, so as to generate the second facial image. According to the image processing method in the embodiments of the present application, during facial recognition, light and shadow migration of a facial image sample where the face is uniformly illuminated is performed on the basis of an image processing model, such that the difficulty in and the cost of acquiring the facial image sample where the face is unevenly illuminated can be greatly reduced.

Description

一种图像处理方法、装置和电子设备An image processing method, device and electronic equipment 技术领域Technical field
本申请涉及图像处理技术领域,特别涉及一种图像处理方法、装置和电子设备。The present application relates to the field of image processing technology, and in particular to an image processing method, device and electronic equipment.
背景技术Background technique
人脸识别是基于人的脸部特征,通过神经网络进一步提取每个人脸中所包含的身份特征,并将其与已知的人脸进行对比,从而识别出每个人脸的身份。Face recognition is based on human facial features. The identity features contained in each face are further extracted through a neural network and compared with known faces to identify the identity of each face.
在实际应用场景中,在对人脸图像进行采集(以人类面部为拍摄对象进行拍摄时),根据光线在面部照射状态的不同,人脸图像可以分为两种状态。In actual application scenarios, when collecting human face images (when shooting with human faces as the subject), the human face images can be divided into two states according to the different states of light illuminating the face.
一种状态是脸部光照不均匀,人脸图像中的脸部存在明显的光照强度不同的区域。例如,当光线从头部侧面照射到左侧的面部时,被照射到光线的左侧面部的光照强度就会明显强于未被光线照射到右侧面部,从而导致采集到左半面亮右半面暗(阴阳脸)的人脸图像。又例如,当圆形光束照射到面部时,被光束照射到的面部就会出现一个圆形光斑,面部上光斑部分的光照强度就会明显强于光斑以外部分,从而导致采集到存在明显亮度差异的人脸图像。One state is that the illumination of the face is uneven, and there are obvious areas with different illumination intensities on the face in the face image. For example, when light illuminates the left side of the face from the side of the head, the illumination intensity of the left side of the face that is illuminated by the light will be significantly stronger than that of the right side of the face that is not illuminated by the light, resulting in the left half of the face being brighter than the right half of the face. Dark (yin and yang) face images. For another example, when a circular beam of light shines on the face, a circular spot will appear on the face illuminated by the beam. The illumination intensity of the spot on the face will be significantly stronger than that of the other parts of the face, resulting in an obvious brightness difference in the collected images. face images.
另一种状态是脸部光照均匀,人脸图像中的脸部不存在明显的光照强度不同的区域。例如,当光线从头部正面照射到面部时,面部在光线照射下不存在明显的阴影,从而可以采集到脸部光照均匀的人脸图像。The other state is that the face is evenly illuminated, and there are no obvious areas with different illumination intensities on the face in the face image. For example, when light shines from the front of the head to the face, there is no obvious shadow on the face under the light, so that a face image with even face illumination can be collected.
在训练人脸识别模型的应用场景中,脸部光照不均匀的人脸图像是一类重要的训练样本图像。脸部光照不均匀的人脸图像样本,对训练人脸识别模型的训练可以起到图像扩增的作用,从而提高对此类样本的识别精度。In the application scenario of training face recognition models, face images with uneven facial illumination are an important type of training sample images. Facial image samples with uneven facial illumination can play a role in image amplification for training face recognition models, thereby improving the recognition accuracy of such samples.
然而,在针对人物进行拍照的应用场景中,为提高人物照片质量,拍摄者会尽量避免照片中的人像脸部出现光照不均匀的情况。这就导致,相较于光照均匀的人脸图像,光照不均匀的人脸图像较为稀少。However, in the application scenario of taking photos of people, in order to improve the quality of the photos of people, the photographer will try to avoid uneven lighting on the faces of the people in the photos. This results in that face images with uneven illumination are rarer than face images with uniform illumination.
因此,为了获取足够的训练样本图像,需要一种获取光照不均匀的人脸图像的方法。Therefore, in order to obtain enough training sample images, a method of obtaining face images with uneven illumination is needed.
发明内容Contents of the invention
针对现有技术下如何获取光照不均匀的人脸图像的问题,本申请提供了一种图像处理方法、装置和电子设备,本申请还提供一种计算机可读存储介质。In order to solve the problem of how to obtain a face image with uneven illumination under the existing technology, this application provides an image processing method, device and electronic equipment. This application also provides a computer-readable storage medium.
本申请实施例采用下述技术方案:The embodiments of this application adopt the following technical solutions:
第一方面,本申请提供一种图像处理方法,所述方法包括:In a first aspect, this application provides an image processing method, which method includes:
获取第一人脸图像,所述第一人脸图像为脸部光照均匀的人脸图像;Obtaining a first face image, where the first face image is a face image with uniform facial illumination;
将所述第一人脸图像输入到图像处理模型,获取所述图像处理模型输出的第二人脸图像,其中:Input the first face image to the image processing model and obtain the second face image output by the image processing model, where:
所述图像处理模型包括第一生成模型,所述第一生成模型用于为所述第一人脸图像附 加脸部光照不均匀的光影效果,以生成所述第二人脸图像。The image processing model includes a first generative model for attaching Add uneven light and shadow effects on the face to generate the second face image.
根据本申请实施例的图像处理方法,基于图像处理模型对人脸识别中脸部光照均匀的人脸图像样本进行光影迁移,可以大大降低脸部光照不均匀的人脸图像样本的获取难度以及获取成本。在扩大人脸识别的样本数量的同时,解决了脸部光照不均匀的人脸图像样本相对较少所带来的样本不均衡问题,能够提升人脸识别模型的训练精度。According to the image processing method of the embodiment of the present application, light and shadow migration is performed on face image samples with uniform facial illumination in face recognition based on the image processing model, which can greatly reduce the difficulty and acquisition difficulty of facial image samples with uneven facial illumination. cost. While expanding the number of face recognition samples, it also solves the sample imbalance problem caused by the relatively small number of face image samples with uneven facial illumination, and can improve the training accuracy of the face recognition model.
进一步的,由于源头为脸部光照均匀的人脸图像样本(真实样本),因此,采用光影迁移的方式生成脸部光照不均匀的人脸图像样本,脸部光照不均匀的人脸图像样本接近真实样本,有利于人脸识别模型的训练精度的提升。Furthermore, since the source is a face image sample with uniform facial illumination (real sample), light and shadow migration is used to generate a face image sample with uneven facial illumination. The face image sample with uneven facial illumination is close to Real samples are beneficial to improving the training accuracy of face recognition models.
在第一方面的一种实现方式中,所述图像处理模型为生成式对抗网络模型。In an implementation manner of the first aspect, the image processing model is a generative adversarial network model.
在第一方面的一种实现方式中,所述图像处理模型还包括:In an implementation of the first aspect, the image processing model further includes:
判别模型,其用于在训练所述图像处理模型的过程中,基于光影判定样本图像,根据所述第一生成模型的输出解析所述第一生成模型的光影附加效果,以根据所述判别模型的解析结果调整所述第一生成模型,其中,输入到所述第一生成模型的人脸样本图像为脸部光照均匀的人脸图像,所述光影判定样本图像为脸部光照不均匀的人脸图像。A discriminant model, which is used to determine sample images based on light and shadow in the process of training the image processing model, and analyze the additional light and shadow effects of the first generative model according to the output of the first generative model, so as to determine the light and shadow additional effects of the first generative model according to the discriminant model. The analysis result adjusts the first generation model, wherein the face sample image input to the first generation model is a face image with uniform facial illumination, and the light and shadow determination sample image is a person with uneven facial illumination. face image.
降低模型训练过程中所需的训练样本的获取难度。Reduce the difficulty of obtaining training samples required during model training.
采用生成式对抗网络模型实现本申请实施例的图像处理模型,可以降低本申请实施例的图像处理模型的获取难度。进一步的,采用生成式对抗网络模型,通过生成模型和判别模型的互相博弈进行模型训练,可以降低模型训练过程中所需的训练样本的获取难度。Using a generative adversarial network model to implement the image processing model of the embodiment of the present application can reduce the difficulty of obtaining the image processing model of the embodiment of the present application. Furthermore, using a generative adversarial network model and conducting model training through the mutual game between the generative model and the discriminative model can reduce the difficulty of obtaining training samples required in the model training process.
在第一方面的一种实现方式中,所述图像处理模型还包括:In an implementation of the first aspect, the image processing model further includes:
第二生成模型,所述第二生成模型为所述第一生成模型的逆映射,所述第二生成模型用于,在训练所述图像处理模型的过程中,将所述第一生成模型的输出作为输入,以根据所述第二生成模型的输出以及所述第一生成模型的输入的对比结果调整所述第一生成模型。A second generative model. The second generative model is an inverse mapping of the first generative model. The second generative model is used to convert the first generative model into a second generative model during the training of the image processing model. The output is used as input to adjust the first generative model based on a comparison of the output of the second generative model and the input of the first generative model.
基于第二生成模型,本申请实施例的图像处理模型采用循环生成对抗网络的结构,提高了模型训练的训练效率,提高了图像处理模型的处理精度以及准确度。Based on the second generative model, the image processing model in the embodiment of the present application adopts the structure of a recurrent generative adversarial network, which improves the training efficiency of model training and improves the processing precision and accuracy of the image processing model.
第二方面,本申请提供一种模型训练方法,所述方法用于训练图像处理模型,所述图像处理模型用于为脸部光照均匀的人脸图像附加脸部光照不均匀的光影效果,以生成脸部光照不均匀的人脸图像,所述图像处理模型为生成式对抗网络模型,所述图像处理模型包括第一生成模型以及判别模型,所述方法包括:In a second aspect, the present application provides a model training method. The method is used to train an image processing model. The image processing model is used to add a light and shadow effect of uneven facial illumination to a face image with uniform facial illumination, so as to Generate a face image with uneven facial illumination. The image processing model is a generative adversarial network model. The image processing model includes a first generation model and a discriminant model. The method includes:
获取第一人脸样本图像,其中,所述第一人脸样本图像为脸部光照均匀的人脸图像;Obtaining a first face sample image, wherein the first face sample image is a face image with uniform facial illumination;
将所述第一人脸样本图像输入到所述第一生成模型,所述第一生成模型根据所述第一人脸样本图像生成第二人脸样本图像;Input the first face sample image to the first generation model, and the first generation model generates a second face sample image according to the first face sample image;
获取第三人脸样本图像,其中,所述第三人脸样本图像为脸部光照不均匀的人脸图像;Obtain a third face sample image, wherein the third face sample image is a face image with uneven facial illumination;
使用所述判别模型,基于所述第三人脸样本图像,根据所述第二人脸样本图像解析所述第一生成模型的光影附加效果;Using the discriminant model, based on the third face sample image, analyze the light and shadow additional effects of the first generation model based on the second face sample image;
根据所述判别模型的解析结果调整所述第一生成模型。The first generation model is adjusted according to the analysis results of the discriminant model.
采用生成式对抗网络模型实现本申请实施例的图像处理模型,可以降低本申请实施例的图像处理模型的获取难度。Using a generative adversarial network model to implement the image processing model of the embodiment of the present application can reduce the difficulty of obtaining the image processing model of the embodiment of the present application.
在第二方面的一种实现方式中,所述第三人脸样本图像与所述第一人脸样本图像不为 成对的样本图像。In an implementation manner of the second aspect, the third face sample image and the first face sample image are not Pairs of sample images.
由于不需要成对的样本图像,模型训练过程中所需的训练样本的获取难度被有效降低。Since paired sample images are not required, the difficulty of obtaining training samples required during model training is effectively reduced.
在第二方面的一种实现方式中,所述方法还包括:In an implementation of the second aspect, the method further includes:
获取第四人脸样本图像,其中,所述第四人脸样本图像为脸部光照均匀的人脸图像;Obtain a fourth face sample image, wherein the fourth face sample image is a face image with uniform facial illumination;
将所述第四人脸样本图像输入到所述第一生成模型,所述第一生成模型根据所述第四人脸样本图像生成第五人脸样本图像;Input the fourth face sample image to the first generation model, and the first generation model generates a fifth face sample image based on the fourth face sample image;
使用所述判别模型,基于所述第三人脸样本图像,根据所述第五人脸样本图像解析所述第一生成模型的光影附加效果。Using the discriminant model, based on the third face sample image, the light and shadow additional effects of the first generation model are analyzed based on the fifth face sample image.
在第二方面的一种实现方式中,所述方法还包括:In an implementation of the second aspect, the method further includes:
获取第六人脸样本图像,其中,所述第六人脸样本图像为脸部光照不均匀的人脸图像;Obtaining a sixth face sample image, wherein the sixth face sample image is a face image with uneven facial illumination;
使用所述判别模型,基于所述第六人脸样本图像,根据所述第二人脸样本图像解析所述第一生成模型的光影附加效果。Using the discriminant model, based on the sixth face sample image, the light and shadow additional effects of the first generation model are analyzed based on the second face sample image.
在第二方面的一种实现方式中,所述图像处理模型还包括第二生成模型,所述第二生成模型为所述第一生成模型的逆映射;In an implementation manner of the second aspect, the image processing model further includes a second generative model, and the second generative model is an inverse mapping of the first generative model;
所述方法还包括:The method also includes:
将所述第二人脸样本图像输入到所述第二生成模型,所述第二生成模型根据所述第二人脸样本图像生成第七人脸样本图像;Input the second face sample image to the second generation model, and the second generation model generates a seventh face sample image based on the second face sample image;
对比所述第七人脸样本图像以及所述第一人脸样本图像,根据对比结果调整所述第一生成模型。Compare the seventh face sample image and the first face sample image, and adjust the first generation model according to the comparison result.
基于第二生成模型,本申请实施例的图像处理模型采用循环生成对抗网络的结构,提高了模型训练的训练效率,提高了图像处理模型的处理精度以及准确度。Based on the second generative model, the image processing model in the embodiment of the present application adopts the structure of a recurrent generative adversarial network, which improves the training efficiency of model training and improves the processing precision and accuracy of the image processing model.
第三方面,本申请提供一种图像处理装置,所述装置包括:In a third aspect, this application provides an image processing device, which includes:
图像处理模型,其用于获取第一人脸图像,输出第二人脸图像,其中:An image processing model, which is used to obtain a first face image and output a second face image, where:
所述第一人脸图像为脸部光照均匀的人脸图像;The first face image is a face image with uniform facial illumination;
所述图像处理模型包括第一生成模型,所述第一生成模型用于为所述第一人脸图像附加脸部光照不均匀的光影效果,以生成所述第二人脸图像。The image processing model includes a first generation model, and the first generation model is used to add a light and shadow effect of uneven facial illumination to the first face image to generate the second face image.
在第三方面的一种实现方式中,所述图像处理模型为生成式对抗网络模型。In an implementation manner of the third aspect, the image processing model is a generative adversarial network model.
在第三方面的一种实现方式中,所述图像处理模型还包括:In an implementation of the third aspect, the image processing model further includes:
判别模型,其用于在训练所述图像处理模型的过程中,基于光影判定样本图像,根据所述第一生成模型的输出解析所述第一生成模型的光影附加效果,以根据所述判别模型的解析结果调整所述第一生成模型,其中,输入到所述第一生成模型的人脸样本图像为脸部光照均匀的人脸图像,所述光影判定样本图像为脸部光照不均匀的人脸图像。A discriminant model, which is used to determine sample images based on light and shadow in the process of training the image processing model, and analyze the additional light and shadow effects of the first generative model according to the output of the first generative model, so as to determine the light and shadow additional effects of the first generative model according to the discriminant model. The analysis result adjusts the first generation model, wherein the face sample image input to the first generation model is a face image with uniform facial illumination, and the light and shadow determination sample image is a person with uneven facial illumination. face image.
在第三方面的一种实现方式中,所述图像处理模型还包括:In an implementation of the third aspect, the image processing model further includes:
第二生成模型,所述第二生成模型为所述第一生成模型的逆映射,所述第二生成模型用于,在训练所述图像处理模型的过程中,将所述第一生成模型的输出作为输入,以根据所述第二生成模型的输出以及所述第一生成模型的输入的对比结果调整所述第一生成模型。A second generative model. The second generative model is an inverse mapping of the first generative model. The second generative model is used to convert the first generative model into a second generative model during the training of the image processing model. The output is used as input to adjust the first generative model based on a comparison of the output of the second generative model and the input of the first generative model.
第四方面,本申请提供一种模型训练装置,所述装置用于训练图像处理模型,所述图 像处理模型用于为脸部光照均匀的人脸图像附加脸部光照不均匀的光影效果,以生成脸部光照不均匀的人脸图像,所述图像处理模型为生成式对抗网络模型,所述图像处理模型包括第一生成模型以及判别模型,所述装置包括:In a fourth aspect, the present application provides a model training device, which is used to train an image processing model. The image processing model is used to add the light and shadow effect of uneven facial illumination to the face image with uniform facial illumination to generate the face image with uneven facial illumination. The image processing model is a generative adversarial network model. The image processing model includes a first generation model and a discriminant model, and the device includes:
第一样本获取模块,其用于获取第一人脸样本图像并将所述第一人脸样本图像输入到所述第一生成模型,其中,所述第一人脸样本图像为脸部光照均匀的人脸图像;A first sample acquisition module configured to acquire a first face sample image and input the first face sample image to the first generation model, wherein the first face sample image is facial illumination Uniform face images;
第二样本获取模块,其用于获取所述第一生成模型根据所述第一人脸样本图像所生成的第二人脸样本图像;a second sample acquisition module configured to acquire a second face sample image generated by the first generation model based on the first face sample image;
第三样本获取模块,其用于获取第三人脸样本图像并将所述第三人脸样本图像输入到所述判别模型,其中,所述第三人脸样本图像为脸部光照不均匀的人脸图像;A third sample acquisition module configured to acquire a third face sample image and input the third face sample image into the discrimination model, wherein the third face sample image is one with uneven facial illumination. face images;
解析结果获取模块,其用于获取所述判别模型的解析结果,其中,所述解析结果包括,所述判别模型基于所述第三人脸样本图像,根据所述第二人脸样本图像解析所述第一生成模型的光影附加效果的结果;An analysis result acquisition module, which is used to obtain the analysis results of the discrimination model, wherein the analysis results include: the discrimination model is based on the third face sample image, and the analysis result is based on the second face sample image. The results of the light and shadow additional effects of the first generated model;
第一调节模块,其用于根据所述解析结果调整所述第一生成模型。A first adjustment module configured to adjust the first generation model according to the analysis results.
在第四方面的一种实现方式中,所述第三人脸样本图像与所述第一人脸样本图像不为成对的样本图像。In an implementation manner of the fourth aspect, the third face sample image and the first face sample image are not paired sample images.
在第四方面的一种实现方式中:In an implementation of the fourth aspect:
所述第一样本获取模块还用于:获取第四人脸样本图像,其中,所述第四人脸样本图像为脸部光照均匀的人脸图像;将所述第四人脸样本图像输入到所述第一生成模型;The first sample acquisition module is also used to: acquire a fourth face sample image, wherein the fourth face sample image is a face image with uniform facial illumination; input the fourth face sample image to the first generative model;
所述第二样本获取模块还用于获取所述第一生成模型根据所述第四人脸样本图像所生成的第五人脸样本图像;The second sample acquisition module is also used to acquire a fifth face sample image generated by the first generation model based on the fourth face sample image;
所述解析结果获取模块获取的所述解析结果还包括,所述判别模型基于所述第三人脸样本图像,根据所述第五人脸样本图像解析所述第一生成模型的光影附加效果的结果。The analysis result obtained by the analysis result acquisition module also includes that the discrimination model is based on the third face sample image and analyzes the light and shadow additional effects of the first generation model based on the fifth face sample image. result.
在第四方面的一种实现方式中:In an implementation of the fourth aspect:
所述第三样本获取模块还用于获取第六人脸样本图像并将所述第六人脸样本图像输入到所述判别模型,其中,所述第六人脸样本图像为脸部光照不均匀的人脸图像;The third sample acquisition module is also used to acquire a sixth face sample image and input the sixth face sample image to the discrimination model, wherein the sixth face sample image is a face with uneven illumination. face images;
所述解析结果获取模块获取的所述解析结果还包括,所述判别模型基于所述第六人脸样本图像,根据所述第二人脸样本图像解析所述第一生成模型的光影附加效果的结果。The analysis result obtained by the analysis result acquisition module also includes that the discrimination model is based on the sixth face sample image and analyzes the light and shadow additional effects of the first generation model based on the second face sample image. result.
在第四方面的一种实现方式中,所述图像处理模型还包括第二生成模型,所述第二生成模型为所述第一生成模型的逆映射;In an implementation manner of the fourth aspect, the image processing model further includes a second generative model, and the second generative model is an inverse mapping of the first generative model;
所述第二样本获取模块还用于将所述第二人脸样本图像输入到所述第二生成模型;The second sample acquisition module is also used to input the second face sample image to the second generation model;
所述装置还包括第二调节模块,所述第二调节模块用于:获取所述第二生成模型根据所述第二人脸样本图像生成的第七人脸样本图像;对比所述第七人脸样本图像以及所述第一人脸样本图像,根据对比结果调整所述第一生成模型。The device also includes a second adjustment module, the second adjustment module being configured to: obtain a seventh face sample image generated by the second generation model based on the second face sample image; compare the seventh face sample image with the second face sample image; Face sample image and the first face sample image, and the first generation model is adjusted according to the comparison result.
第五方面,本申请提供一种电子设备,所述电子设备包括用于执行计算机程序指令的处理器,其中,当存储器中存储的计算机程序指令被所述处理器执行时,触发所述电子设备执行如第一方面所述的方法。In a fifth aspect, the present application provides an electronic device, the electronic device comprising a processor for executing computer program instructions, wherein when the computer program instructions stored in the memory are executed by the processor, the electronic device is triggered The method as described in the first aspect is performed.
第六方面,本申请提供一种电子设备,所述电子设备包括用于执行计算机程序指令的处理器,其中,当存储器中存储的计算机程序指令被所述处理器执行时,触发所述电子设备执行如第二方面所述的方法。 In a sixth aspect, the present application provides an electronic device, the electronic device comprising a processor for executing computer program instructions, wherein when the computer program instructions stored in the memory are executed by the processor, the electronic device is triggered Perform the method as described in the second aspect.
第七方面,本申请提供一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机程序,当其在计算机上运行时,使得计算机执行第一方面或第二方面所述的方法。In a seventh aspect, the present application provides a computer-readable storage medium that stores a computer program that, when run on a computer, causes the computer to execute the method described in the first aspect or the second aspect. .
附图说明Description of drawings
图1所示为根据本申请一实施例的方法流程图;Figure 1 shows a method flow chart according to an embodiment of the present application;
图2所示为根据本申请一实施例的图像处理模型结构简图;Figure 2 shows a schematic structural diagram of an image processing model according to an embodiment of the present application;
图3所示为根据本申请一实施例的模型训练流程图;Figure 3 shows a model training flow chart according to an embodiment of the present application;
图4所示为根据本申请一实施例的图像处理装置结构框图;Figure 4 shows a structural block diagram of an image processing device according to an embodiment of the present application;
图5所示为根据本申请一实施例的模型训练装置结构框图;Figure 5 shows a structural block diagram of a model training device according to an embodiment of the present application;
图6所示为根据本申请一实施例的电子设备示意图。Figure 6 shows a schematic diagram of an electronic device according to an embodiment of the present application.
具体实施方式Detailed ways
为使本申请的目的、技术方案和优点更加清楚,下面将结合本申请具体实施例及相应的附图对本申请技术方案进行清楚、完整地描述。显然,所描述的实施例仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。In order to make the purpose, technical solutions and advantages of the present application clearer, the technical solutions of the present application will be clearly and completely described below in conjunction with specific embodiments of the present application and corresponding drawings. Obviously, the described embodiments are only some of the embodiments of the present application, but not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of this application.
本申请的实施方式部分使用的术语仅用于对本申请的具体实施例进行解释,而非旨在限定本申请。The terms used in the embodiments of the present application are only used to explain specific embodiments of the present application and are not intended to limit the present application.
针对如何获取光照不均匀的人脸图像的问题,一种可行的实现方案是在拍照时进行调光操作,拍摄人物脸部光照不均匀的图像,对该图像进行切割,以获取光照不均匀的人脸图像。上述实现方案需要进行专门的图像拍摄,成本高,工作量大。Aiming at the problem of how to obtain face images with uneven illumination, a feasible implementation solution is to perform a dimming operation when taking pictures, take an image of a person's face with uneven illumination, and cut the image to obtain an image with uneven illumination. Face images. The above implementation solution requires special image shooting, which is costly and requires a lot of work.
为降低样本获取难度以及样本获取成本,本申请实施例提出了一种图像处理方法,基于图像处理模型,根据脸部光照均匀的人脸图像生成脸部光照不均匀的人脸图像。在本申请实施例中,人脸图像可以是任意类型的图像,例如,彩色图像、黑白图像、灰度图像d等。在一应用场景中,人脸图像为红外人脸图像。红外人脸图像是采用红外摄像头拍摄的人脸图像,通常为单通道图像。In order to reduce the difficulty and cost of obtaining samples, an embodiment of the present application proposes an image processing method. Based on the image processing model, a face image with uneven facial illumination is generated from a facial image with uniform facial illumination. In the embodiment of this application, the face image can be any type of image, for example, a color image, a black and white image, a grayscale image, etc. In an application scenario, the face image is an infrared face image. Infrared face images are face images captured by infrared cameras, usually single-channel images.
图1所示为根据本申请一实施例的方法流程图。电子设备执行如图1所示的流程生成脸部光照不均匀的人脸图像。Figure 1 shows a flow chart of a method according to an embodiment of the present application. The electronic device executes the process shown in Figure 1 to generate a face image with uneven facial illumination.
S100,获取第一人脸图像,第一人脸图像为脸部光照均匀的人脸图像。S100: Obtain a first face image. The first face image is a face image with uniform facial illumination.
S110,将第一人脸图像输入到图像处理模型。S110. Input the first face image to the image processing model.
图像处理模型用于执行光影迁移操作,光影迁移是指将脸部光照不均匀的人脸图像(包含阴阳脸)的脸部光影效果转换到到脸部光照均匀的人脸图像中的人脸上。The image processing model is used to perform light and shadow migration operations. Light and shadow migration refers to converting the facial light and shadow effects of face images with uneven facial illumination (including yin and yang faces) to faces in face images with uniform facial illumination. .
S120,获取图像处理模型输出的第二人脸图像。S120. Obtain the second face image output by the image processing model.
第二人脸图像为图像处理模型根据第一人脸图像生成的图像,第二人脸图像为脸部光照不均匀的人脸图像。第二人脸图像与第一人脸图像的区别在于人脸部的光照均匀程度,在其他特征上,第二人脸图像与第一人脸图像一致。The second face image is an image generated by the image processing model based on the first face image, and the second face image is a face image with uneven facial illumination. The difference between the second face image and the first face image lies in the uniformity of illumination on the face. In other features, the second face image is consistent with the first face image.
根据本申请实施例的图像处理方法,基于图像处理模型对人脸识别中脸部光照均匀的人脸图像样本进行光影迁移,可以大大降低脸部光照不均匀的人脸图像样本的获取难度以 及获取成本。在扩大人脸识别的样本数量的同时,解决了脸部光照不均匀的人脸图像样本相对较少所带来的样本不均衡问题,能够提升人脸识别模型的训练精度。According to the image processing method of the embodiment of the present application, light and shadow migration is performed on face image samples with uniform facial illumination in face recognition based on the image processing model, which can greatly reduce the difficulty of obtaining facial image samples with uneven facial illumination. and acquisition costs. While expanding the number of face recognition samples, it also solves the sample imbalance problem caused by the relatively small number of face image samples with uneven facial illumination, and can improve the training accuracy of the face recognition model.
进一步的,由于源头为脸部光照均匀的人脸图像样本(真实样本),因此,采用光影迁移的方式生成脸部光照不均匀的人脸图像样本,脸部光照不均匀的人脸图像样本接近真实样本,有利于人脸识别模型的训练精度的提升。Furthermore, since the source is a face image sample with uniform facial illumination (real sample), light and shadow migration is used to generate a face image sample with uneven facial illumination. The face image sample with uneven facial illumination is close to Real samples are beneficial to improving the training accuracy of face recognition models.
本申请实施例的实施关键之一在于图像处理模型,为降低图像处理模型的获取难度,在本申请一实施例中,图像处理模型为深度学习模型,采用模型训练的方式来获取图像处理模型。One of the keys to the implementation of the embodiments of the present application lies in the image processing model. In order to reduce the difficulty of obtaining the image processing model, in one embodiment of the present application, the image processing model is a deep learning model, and the image processing model is obtained through model training.
在模型训练过程中,需要提供训练样本。在一种可行的模型训练方式中,需要提供成对的训练样本。即需要提供图像处理模型的输入样本(脸部光照均匀的人脸图像)以及与输入样本成对的,图像处理模型的输出样本(脸部光照不均匀的人脸图像)。在一对输入样本/输出样本中,两张人脸图像的区别在于人脸部的光照均匀程度,在其他特征上,两张人脸图像一致。During the model training process, training samples need to be provided. In a feasible model training method, pairs of training samples need to be provided. That is, it is necessary to provide the input sample of the image processing model (face image with uniform facial illumination) and the output sample of the image processing model (face image with uneven facial illumination) paired with the input sample. In a pair of input samples/output samples, the difference between the two face images lies in the uniformity of illumination on the face. In other features, the two face images are consistent.
由于脸部光照不均匀的人脸图像相对稀少,成对的脸部光照不均匀的人脸图像以及脸部光照均匀的人脸图像的获取难度很高,因此,图像处理模型的训练难度较大。Since face images with uneven facial illumination are relatively rare, it is very difficult to obtain pairs of face images with uneven facial illumination and face images with uniform facial illumination. Therefore, it is difficult to train the image processing model. .
针对上述问题,在本申请一实施例中,基于生成式对抗网络(Generative Adversarial Networks,GAN)模型构造图像处理模型。In response to the above problems, in one embodiment of the present application, an image processing model is constructed based on the Generative Adversarial Networks (GAN) model.
GAN模型是一种深度学习模型,至少包含两个模块:生成模型(Generative Model)和判别模型(Discriminative Model),通过生成模型和判别模型的互相博弈学习产生好的输出。The GAN model is a deep learning model that contains at least two modules: a generative model and a discriminative model. It produces good output through mutual game learning between the generative model and the discriminative model.
采用生成式对抗网络模型实现本申请实施例的图像处理模型,可以降低本申请实施例的图像处理模型的获取难度。进一步的,采用生成式对抗网络模型,通过生成模型和判别模型的互相博弈进行模型训练,可以降低模型训练过程中所需的训练样本的获取难度。Using a generative adversarial network model to implement the image processing model of the embodiment of the present application can reduce the difficulty of obtaining the image processing model of the embodiment of the present application. Furthermore, using a generative adversarial network model and conducting model training through the mutual game between the generative model and the discriminative model can reduce the difficulty of obtaining training samples required in the model training process.
具体的,图2所示为根据本申请一实施例的图像处理模型结构简图。Specifically, FIG. 2 shows a schematic structural diagram of an image processing model according to an embodiment of the present application.
如图2所示,图像处理模型包含第一生成模型210。As shown in FIG. 2 , the image processing model includes a first generation model 210 .
以图像201粗略的代表脸部图像,图像201的脸部上不存在亮度不同的区域,以图像201指代脸部光照均匀的人脸图像(第一人脸图像)。The image 201 roughly represents a facial image. There is no area with different brightness on the face of the image 201. The image 201 refers to a face image (first face image) with uniform facial illumination.
以图像202粗略的代表脸部图像,相较于图像201,图像202的区别在于脸部的左半面和右半面的亮度不同(阴阳脸),以图像202指代与图像201对应同一面部图像(仅面部光照状态不同),脸部光照不均匀的人脸图像(第二人脸图像)。Image 202 roughly represents the facial image. Compared with image 201, the difference between image 202 is that the brightness of the left and right half of the face is different (yin and yang face). Image 202 refers to the same facial image corresponding to image 201 ( Only the illumination status of the face is different), the face image with uneven facial illumination (the second face image).
在图像处理模型训练完成后,将脸部光照均匀的人脸图像(图像201,第一人脸图像)输入到第一生成模型210,第一生成模型210用于为输入到第一生成模型210的人脸图像附加脸部光照不均匀的光影效果,以生成脸部光照不均匀的人脸图像(图像202,第二人脸图像)。After the training of the image processing model is completed, the face image (image 201, first face image) with uniform facial illumination is input to the first generation model 210. The first generation model 210 is used to provide input to the first generation model 210. A light and shadow effect with uneven facial illumination is added to the human face image to generate a human face image with uneven facial illumination (image 202, second face image).
以图像203粗略的代表脸部图像,相较于图像201,图像203的脸部的左半面和右半面的亮度不同(阴阳脸),并且,在亮度状态以外,图像203的表情与图像201以及图像202也不同,以图像203指代与图像201、202对应不同面部图像的,脸部光照不均匀的 人脸图像(光影判定样本图像)。图像处理模型还包含判别模型220。在训练图像处理模型的过程中,第一生成模型210被输入脸部光照均匀的人脸样本图像,判别模型220基于输入到判别模型220的光影判定样本图像(图像203,脸部光照不均匀的人脸图像),根据第一生成模型210的输出解析第一生成模型210的光影附加效果,以根据判别模型220的解析结果调整第一生成模型,从而不断优化第一生成模型210附加脸部光照不均匀的光影效果的执行效果。Image 203 roughly represents the face image. Compared with image 201, the brightness of the left and right half of the face in image 203 is different (yin and yang face), and, except for the brightness state, the expression of image 203 is different from that of image 201 and image 203. The image 202 is also different. The image 203 refers to the face image corresponding to the images 201 and 202, and the face illumination is uneven. Face image (light and shadow determination sample image). The image processing model also includes a discriminative model 220. In the process of training the image processing model, the first generation model 210 is input with a face sample image with uniform facial illumination, and the discriminant model 220 determines the sample image (image 203, with uneven facial illumination) based on the light and shadow input to the discriminant model 220. face image), analyze the light and shadow additional effects of the first generative model 210 according to the output of the first generative model 210, and adjust the first generative model according to the analysis results of the discriminant model 220, thereby continuously optimizing the additional facial lighting of the first generative model 210. Implementation of uneven light and shadow effects.
具体的,在一种实现方式中,图像处理模型使用具有自适应层实例归一化的无监督生成注意网络(Unsupervised Generative Attentional Networks with Adaptive Layer-Instance Normalization for Image-to-Image Translation,U-GAT-IT)模型。U-GAT-IT模型是一种无监督的生成网络模型,模型训练不需要成对的数据。即,在模型训练过程中,输入到判别模型220的光影判定样本图像(脸部光照不均匀的人脸图像)与输入到第一生成模型210的脸部光照均匀的人脸样本图像可以不是成对的图像。Specifically, in one implementation, the image processing model uses Unsupervised Generative Attentional Networks with Adaptive Layer-Instance Normalization for Image-to-Image Translation, U-GAT -IT) model. The U-GAT-IT model is an unsupervised generative network model, and model training does not require paired data. That is, during the model training process, the light and shadow determination sample image (face image with uneven facial illumination) input to the discriminant model 220 and the face sample image with uniform facial illumination input to the first generation model 210 may not be the same. Right image.
进一步的,判别模型220使用注意力机制(主要体现在有权重的特征图)。判别模型220根据辅助分类器得到的注意力图,通过区分源域和目标域,帮助第一生成模型210确定在人力图像的哪些位置进行光影效果的集中转换。Further, the discriminant model 220 uses an attention mechanism (mainly reflected in weighted feature maps). Based on the attention map obtained by the auxiliary classifier, the discriminant model 220 helps the first generation model 210 determine where in the human image to perform concentrated conversion of light and shadow effects by distinguishing the source domain and the target domain.
图像处理模型使用自适应的混合归一化层(Adaptive Layer-Instance Normalization,AdaLIN),能够自动调节实例归一化(Instance Normalization,IN)和层归一化(Layer Normalization,LN)的比重,帮助注意力引导模型在不修改模型架构或超参数的情况下灵活控制形状和纹理的变化量,实现光影效果(脸部光照不均匀)的风格转换。The image processing model uses an adaptive hybrid normalization layer (Adaptive Layer-Instance Normalization, AdaLIN), which can automatically adjust the proportion of instance normalization (Instance Normalization, IN) and layer normalization (Layer Normalization, LN), helping The attention-guided model flexibly controls the changes in shape and texture without modifying the model architecture or hyperparameters, and achieves style conversion of light and shadow effects (uneven illumination on the face).
进一步的,图像处理模型还采用了循环生成对抗网络(cycle-gan)的结构。基于循环生成对抗网络的结构,提高了模型训练的训练效率,提高了图像处理模型的处理精度以及准确度。Furthermore, the image processing model also adopts the structure of cycle-generative adversarial network (cycle-gan). Based on the structure of the recurrent generative adversarial network, the training efficiency of model training is improved, and the processing precision and accuracy of the image processing model are improved.
具体的,图像处理模型还包含第二生成模型230。Specifically, the image processing model also includes a second generation model 230.
以图像204粗略的代表脸部图像,相较于图像201、202,图像204的区别在于脸部的亮度状态不同,图像204脸部的左半面和右半面的亮度不同,但差异程度低于图像202。即,相较于图像202的脸部光照不均匀(阴阳脸),图像204更倾向于脸部光照均匀,但图像204并未达到完全的脸部光照均匀(图像204的光照状态并未达到与图像201一致的程度)。以图像202指代与图像201、202对应同一面部图像(仅面部光照状态不同),脸部光照状态相较于图像202为光照均匀,但光照均匀程度并未达到与图像201一致的人脸图像。Image 204 roughly represents the facial image. Compared with images 201 and 202, the difference between image 204 is that the brightness status of the face is different. The brightness of the left and right half of the face in image 204 is different, but the degree of difference is lower than that of the image. 202. That is, compared to the uneven illumination of the face of image 202 (yin and yang face), image 204 is more inclined to uniform facial illumination, but image 204 does not achieve complete uniform illumination of the face (the illumination state of image 204 does not reach the same level as Image 201 consistent degree). Image 202 refers to the face image corresponding to the same facial image as images 201 and 202 (only the lighting state of the face is different). The lighting state of the face is uniform compared with that of image 202, but the uniformity of lighting is not consistent with that of image 201. .
第二生成模型230为第一生成模型210的逆映射。即,在图像处理模型训练完成后,第一生成模型210可以将脸部光照均匀的人脸图像转换为脸部光照不均匀的人脸图像(图像204),第二生成模型230可以将脸部光照不均匀的人脸图像转换为脸部光照均匀的人脸图像。The second generative model 230 is the inverse mapping of the first generative model 210 . That is, after the training of the image processing model is completed, the first generation model 210 can convert the face image with uniform facial illumination into the face image with uneven facial illumination (image 204), and the second generation model 230 can convert the face image into a face image with uneven facial illumination (image 204). A face image with uneven illumination is converted into a face image with even face illumination.
理想状态下,将脸部光照均匀的人脸图像A输入到第一生成模型210,第一生成模型210生成人脸图像B;再将人脸图像B输入到第二生成模型230,第二生成模型230则会将人脸图像B转换成人脸图像A。In an ideal state, face image A with uniform facial illumination is input to the first generation model 210, and the first generation model 210 generates face image B; then face image B is input to the second generation model 230, and the second generation model 230 generates face image B. Model 230 will convert face image B into face image A.
然而,在实际应用场景中(尤其是模型训练过程中),第一生成模型210为输入的人 脸图像附加guang光影效果的执行效果并不能达到理想状态。因此,将脸部光照均匀的人脸图像A输入到第一生成模型210,第一生成模型210生成人脸图像B;再将人脸图像B输入到第二生成模型230,第二生成模型230将人脸图像B转换成人脸图像C。人脸图像C与人脸图像A之间存在差异。However, in actual application scenarios (especially in the model training process), the first generation model 210 is the input person. The execution effect of adding light and shadow effects to face images cannot reach the ideal state. Therefore, the face image A with uniform facial illumination is input to the first generation model 210, and the first generation model 210 generates the face image B; then the face image B is input to the second generation model 230, and the second generation model 230 Convert face image B into face image C. There is a difference between face image C and face image A.
在训练图像处理模型的过程中,将第一生成模型210的输出作为第二生成模型230的输入,根据第二生成模型230的输出以及第一生成模型210的输入的对比结果调整第一生成模型210,从而不断优化第一生成模型210附加脸部光照不均匀的光影效果的执行效果。In the process of training the image processing model, the output of the first generation model 210 is used as the input of the second generation model 230, and the first generation model is adjusted according to the comparison result between the output of the second generation model 230 and the input of the first generation model 210. 210, thereby continuously optimizing the execution effect of adding light and shadow effects with uneven facial illumination to the first generation model 210.
具体的,第二生成模型230的输出以及第一生成模型210的输入的对比基于L2范数损失(L2Loss)实现。Specifically, the comparison between the output of the second generative model 230 and the input of the first generative model 210 is implemented based on L2 norm loss (L2Loss).
进一步的,基于上述图像处理模型的结构,本申请实施例提出了一种模型训练方法。Furthermore, based on the structure of the above image processing model, embodiments of this application propose a model training method.
图3所示为根据本申请一实施例的模型训练流程图。电子设备执行如图3所示的流程训练图2所示结构的图像处理模型。Figure 3 shows a model training flow chart according to an embodiment of the present application. The electronic device executes the process shown in Figure 3 to train the image processing model with the structure shown in Figure 2.
S300,获取样本图像,样本图像中包含人类脸部图像。S300: Obtain a sample image, which contains a human face image.
S301,从样本图像中识别并分离人类脸部图像。S301, identify and separate human face images from sample images.
S302,对分离出的人类脸部图像进行预处理,获取人脸样本图像。S302: Preprocess the separated human face image to obtain a human face sample image.
例如,将人类脸部图像缩放到预设大小;对人类脸部图像进行切割以保留预设的面部特征;将脸部图像中的五官对齐到预设图像位置。For example, the human face image is scaled to a preset size; the human face image is cut to retain the preset facial features; and the facial features in the face image are aligned to the preset image position.
S310,分类人脸样本图像,将其分为两类:脸部光照均匀的人脸图像(例如,第一人脸样本图像)以及脸部光照不均匀的人脸图像(例如,第三人脸样本图像)。S310, classify the face sample image and divide it into two categories: a face image with uniform facial illumination (for example, the first face sample image) and a face image with uneven facial illumination (for example, the third face sample image).
S320,使用脸部光照均匀的人脸图像以及脸部光照不均匀的人脸图像训练图2所示结构的图像处理模型。S320: Use face images with uniform facial illumination and face images with uneven facial illumination to train the image processing model with the structure shown in Figure 2.
在S320中,将脸部光照均匀的人脸图像输入到第一生成模型210,将脸部光照不均匀的人脸图像输入到判别模型220。判别模型220基于脸部光照不均匀的人脸图像,根据第一生成模型210输出的图像解析第一生成模型210第一生成模型210的光影附加效果(第一生成模型210为脸部光照均匀的人脸图像附加脸部光照不均匀的光影效果的执行效果)。最终根据判别模型220的解析结果调整第一生成模型210。In S320, the face image with uniform facial illumination is input to the first generation model 210, and the facial image with uneven facial illumination is input to the discriminant model 220. The discriminant model 220 is based on the face image with uneven facial illumination, and analyzes the light and shadow additional effects of the first generation model 210 according to the image output by the first generation model 210 (the first generation model 210 is a face with uniform facial illumination). The execution effect of adding light and shadow effects with uneven lighting on the face to the face image). Finally, the first generation model 210 is adjusted according to the analysis results of the discriminant model 220 .
例如,将第一人脸样本图像(脸部光照均匀的人脸图像)输入到第一生成模型210,第一生成模型210根据第一人脸样本图像生成第二人脸样本图像。理想状态下,第二人脸样本图像为第一人脸样本图像成功附加脸部光照不均匀的光影效果后的图像。For example, a first face sample image (a face image with uniform facial illumination) is input to the first generation model 210, and the first generation model 210 generates a second face sample image based on the first face sample image. Ideally, the second face sample image is an image obtained by successfully adding the light and shadow effect of uneven facial illumination to the first face sample image.
将第三人脸样本图像(脸部光照不均匀的人脸图像)输入到判别模型220。判别模型220基于第三人脸样本图像,根据第二人脸样本图像解析第一生成模型210的光影附加效果。The third face sample image (face image with uneven facial illumination) is input to the discriminant model 220 . The discriminant model 220 is based on the third face sample image and analyzes the light and shadow additional effects of the first generation model 210 based on the second face sample image.
进一步的,输入到第一生成模型210的脸部光照均匀的人脸图像,与输入到判别模型220的脸部光照不均匀的人脸图像可以不是成对的图像。即,第一人脸样本图像与第三人脸样本图像的区别可以并不仅仅是脸部光照均匀程度,在其他面部特征上,第一人脸样本图像与第三人脸样本图像也可以不同。例如,第一人脸样本图像可以是人物A的图像,第三人脸样本图像可以是人物B的图像;或者,第一人脸样本图像可以是人物A在拍摄视 角a下的图像,第三人脸样本图像可以是人物A在拍摄视角b下的图像。Furthermore, the face image with uniform facial illumination input to the first generation model 210 and the facial image with uneven facial illumination input to the discriminant model 220 may not be paired images. That is, the difference between the first face sample image and the third face sample image may not only be the uniformity of facial illumination, but also may be different in other facial features. . For example, the first face sample image may be an image of person A, and the third face sample image may be an image of person B; or, the first face sample image may be an image of person A in the shooting view. The image under angle a, the third face sample image may be the image of person A under shooting angle b.
进一步的,输入到第一生成模型210的脸部光照均匀的人脸图像,与输入到判别模型220的脸部光照不均匀的人脸图像可以进行任意组合。例如,在输入到第一生成模型210的脸部光照均匀的人脸图像不变的情况下,更换输入到判别模型220的脸部光照不均匀的人脸图像;或者,在输入到判别模型220的脸部光照不均匀的人脸图像不变的情况下,更换输入到第一生成模型210的脸部光照均匀的人脸图像。Furthermore, the face image with uniform facial illumination input to the first generation model 210 and the facial image with uneven facial illumination input to the discriminant model 220 can be combined arbitrarily. For example, when the facial image with uniform facial illumination input to the first generation model 210 remains unchanged, replace the facial image with uneven facial illumination input to the discriminant model 220; or, after inputting to the discriminant model 220 While the facial image with uneven facial illumination remains unchanged, the facial image with uniform facial illumination input to the first generation model 210 is replaced.
例如,将第一人脸样本图像(脸部光照均匀的人脸图像)输入到第一生成模型210,第一生成模型210根据第一人脸样本图像生成第二人脸样本图像。理想状态下,第二人脸样本图像为第一人脸样本图像成功附加脸部光照不均匀的光影效果后的图像。For example, a first face sample image (a face image with uniform facial illumination) is input to the first generation model 210, and the first generation model 210 generates a second face sample image based on the first face sample image. Ideally, the second face sample image is an image obtained by successfully adding the light and shadow effect of uneven facial illumination to the first face sample image.
将第三人脸样本图像(脸部光照不均匀的人脸图像)输入到判别模型220。判别模型220基于第三人脸样本图像,根据第二人脸样本图像解析第一生成模型210的光影附加效果。根据判别模型220的解析结果调整第一生成模型210。The third face sample image (face image with uneven facial illumination) is input to the discriminant model 220 . The discriminant model 220 is based on the third face sample image and analyzes the light and shadow additional effects of the first generation model 210 based on the second face sample image. The first generation model 210 is adjusted according to the analysis results of the discriminant model 220 .
之后,将第四人脸样本图像(脸部光照均匀的人脸图像,与第一人脸样本图像不同的图像)输入到第一生成模型210,第一生成模型210根据第四人脸样本图像生成第五人脸样本图像。Afterwards, the fourth face sample image (a face image with even facial illumination, an image different from the first face sample image) is input to the first generation model 210, and the first generation model 210 generates the image according to the fourth face sample image. Generate a fifth face sample image.
判别模型220基于第三人脸样本图像,根据第五人脸样本图像解析第一生成模型210的光影附加效果。根据判别模型220的解析结果继续调整第一生成模型210。The discriminant model 220 analyzes the light and shadow additional effects of the first generation model 210 based on the fifth face sample image based on the third face sample image. The first generation model 210 continues to be adjusted according to the analysis results of the discriminant model 220 .
又例如,将第一人脸样本图像(脸部光照均匀的人脸图像)输入到第一生成模型210,第一生成模型210根据第一人脸样本图像生成第二人脸样本图像。理想状态下,第二人脸样本图像为第一人脸样本图像成功附加脸部光照不均匀的光影效果后的图像。For another example, the first face sample image (face image with uniform facial illumination) is input to the first generation model 210, and the first generation model 210 generates the second face sample image based on the first face sample image. Ideally, the second face sample image is an image obtained by successfully adding the light and shadow effect of uneven facial illumination to the first face sample image.
将第三人脸样本图像(脸部光照不均匀的人脸图像)输入到判别模型220。判别模型220基于第三人脸样本图像,根据第二人脸样本图像解析第一生成模型210的光影附加效果。根据判别模型220的解析结果调整第一生成模型210。The third face sample image (face image with uneven facial illumination) is input to the discriminant model 220 . The discriminant model 220 is based on the third face sample image and analyzes the light and shadow additional effects of the first generation model 210 based on the second face sample image. The first generation model 210 is adjusted according to the analysis results of the discriminant model 220 .
之后,将第六人脸样本图像(脸部光照不均匀的人脸图像,与第三人脸图像不同的图像)输入到判别模型220。判别模型220基于第六人脸样本图像,根据第二人脸样本图像解析第一生成模型210的光影附加效果。根据判别模型220的解析结果调整第一生成模型210。After that, the sixth face sample image (a face image with uneven facial illumination, an image different from the third face image) is input to the discriminant model 220. The discriminant model 220 analyzes the light and shadow additional effects of the first generation model 210 based on the second face sample image based on the sixth face sample image. The first generation model 210 is adjusted according to the analysis results of the discriminant model 220 .
进一步的,在S320中,将脸部光照均匀的人脸图像输入到第一生成模型210,第一生成模型210根据脸部光照均匀的人脸图像生成新图像后,第一生成模型210输出的图像还被输入到第二生成模型230。第二生成模型230根据第一生成模型210输出的图像生成新的图像,通过对比第二生成模型230输出的图像以及输入到第一生成模型210的图像来调整第一生成模型210(并同步调整第二生成模型230)。Further, in S320, the face image with uniform facial illumination is input to the first generation model 210. After the first generation model 210 generates a new image according to the facial image with uniform facial illumination, the first generation model 210 outputs The image is also input to a second generative model 230. The second generation model 230 generates a new image according to the image output by the first generation model 210, and adjusts the first generation model 210 by comparing the image output by the second generation model 230 with the image input to the first generation model 210 (and adjusts it simultaneously. Second generative model 230).
例如,将第一人脸样本图像(脸部光照均匀的人脸图像)输入到第一生成模型210,第一生成模型210根据第一人脸样本图像生成第二人脸样本图像。将第二人脸样本图像输入到第二生成模型230,第二生成模型230根据第二人脸样本图像生成第七人脸样本图像;For example, a first face sample image (a face image with uniform facial illumination) is input to the first generation model 210, and the first generation model 210 generates a second face sample image based on the first face sample image. Input the second face sample image to the second generation model 230, and the second generation model 230 generates a seventh face sample image based on the second face sample image;
对比第七人脸样本图像以及第一人脸样本图像,根据对比结果调整第一生成模型210。Compare the seventh face sample image with the first face sample image, and adjust the first generation model 210 according to the comparison result.
进一步的,基于本申请实施例的图像处理方法,本申请实施例还提出了一种图像处理 装置。图4所示为根据本申请一实施例的图像处理装置结构框图。如图4所示,图像处理装置400包括:Furthermore, based on the image processing method in the embodiment of the present application, the embodiment of the present application also proposes an image processing method. device. Figure 4 shows a structural block diagram of an image processing device according to an embodiment of the present application. As shown in Figure 4, the image processing device 400 includes:
图像处理模型410(例如,如图2所示的图像处理模型),其用于获取第一人脸图像,输出第二人脸图像,其中:Image processing model 410 (for example, the image processing model shown in Figure 2), which is used to obtain a first face image and output a second face image, where:
第一人脸图像为脸部光照均匀的人脸图像;The first face image is a face image with uniform facial illumination;
图像处理模型包括第一生成模型411(例如,第一生成模型411可以参照如图2所示的第一生成模型210),第一生成模型用于为第一人脸图像附加脸部光照不均匀的光影效果,以生成第二人脸图像。The image processing model includes a first generation model 411 (for example, the first generation model 411 can refer to the first generation model 210 shown in Figure 2). The first generation model is used to add uneven facial illumination to the first face image. Light and shadow effects to generate a second face image.
进一步的,基于本申请实施例的模型训练方法,本申请实施例还提出了一种模型训练装置,该装置用于训练图像处理模型(例如,如图2所示的图像处理模型),图像处理模型用于为脸部光照均匀的人脸图像附加脸部光照不均匀的光影效果,以生成脸部光照不均匀的人脸图像,图像处理模型为生成式对抗网络模型,图像处理模型包括第一生成模型以及判别模型。Further, based on the model training method of the embodiment of the present application, the embodiment of the present application also proposes a model training device, which is used to train an image processing model (for example, the image processing model as shown in Figure 2). The image processing model The model is used to add uneven facial illumination light and shadow effects to facial images with uniform facial illumination to generate facial images with uneven facial illumination. The image processing model is a generative adversarial network model. The image processing model includes the first Generative models and discriminative models.
图5所示为根据本申请一实施例的模型训练装置结构框图。如图5所示,模型训练装置500包括:Figure 5 shows a structural block diagram of a model training device according to an embodiment of the present application. As shown in Figure 5, the model training device 500 includes:
第一样本获取模块501,其用于获取第一人脸样本图像并将第一人脸样本图像输入到第一生成模型(第一生成模型参照如图2所示的第一生成模型210),其中,第一人脸样本图像为脸部光照均匀的人脸图像(参照图像201);The first sample acquisition module 501 is used to acquire the first face sample image and input the first face sample image to the first generation model (for the first generation model, refer to the first generation model 210 shown in Figure 2) , wherein the first face sample image is a face image with uniform facial illumination (refer to image 201);
第二样本获取模块502,其用于获取第一生成模型根据第一人脸样本图像所生成的第二人脸样本图像并将第二人脸样本图像输入到判别模型(判别模型参照如图2所示的判别模型220);The second sample acquisition module 502 is used to acquire the second face sample image generated by the first generation model based on the first face sample image and input the second face sample image into the discriminant model (refer to Figure 2 for the discriminant model) The discriminant model shown 220);
第三样本获取模块503,其用于获取第三人脸样本图像并将第三人脸样本图像输入到判别模型,其中,第三人脸样本图像为脸部光照不均匀的人脸图像(参照图像203);The third sample acquisition module 503 is used to acquire a third face sample image and input the third face sample image into the discriminant model, where the third face sample image is a face image with uneven facial illumination (refer to image203);
解析结果获取模块504,其用于获取判别模型的解析结果,其中,解析结果包括,判别模型基于第三人脸样本图像,根据第二人脸样本图像解析第一生成模型的光影附加效果的结果;The analysis result acquisition module 504 is used to obtain the analysis results of the discriminant model, where the analysis results include the result of the discriminant model analyzing the light and shadow additional effects of the first generation model based on the second face sample image based on the third face sample image. ;
第一调节模块505,其用于根据解析结果调整第一生成模型。The first adjustment module 505 is used to adjust the first generation model according to the analysis results.
进一步的,第二样本获取模块502还用于将第二人脸样本图像输入到第二生成模型5(第二生成模型参照如图2所示的第二生成模型230)。Further, the second sample acquisition module 502 is also used to input the second face sample image to the second generation model 5 (for the second generation model, refer to the second generation model 230 shown in Figure 2).
模型训练装置500还包括第二调节模块506,其用于获取第二生成模型根据第二人脸样本图像所生成的第四人脸样本图像,根据第四人脸样本图像以及第一人脸样本图像的对比结果调整第一生成模型。The model training device 500 also includes a second adjustment module 506, which is used to obtain a fourth face sample image generated by the second generation model based on the second face sample image. According to the fourth face sample image and the first face sample The comparison results of the images adjust the first generative model.
在本申请实施例的描述中,为了描述的方便,描述装置时以功能分为各种模块分别描述,各个模块的划分仅仅是一种逻辑功能的划分,在实施本申请实施例时可以把各模块的功能在同一个或多个软件和/或硬件中实现。In the description of the embodiments of the present application, for the convenience of description, the device is described by dividing its functions into various modules. The division of each module is only a division of logical functions. When implementing the embodiments of the present application, each module can be divided into The functionality of a module is implemented in the same or more software and/or hardware.
具体的,本申请实施例所提出的装置在实际实现时可以全部或部分集成到一个物理实体上,也可以物理上分开。且这些模块可以全部以软件通过处理元件调用的形式实现;也可以全部以硬件的形式实现;还可以部分模块以软件通过处理元件调用的形式实现,部分模块通过硬件的形式实现。例如,确定模块可以为单独设立的处理元件,也可以集 成在电子设备的某一个芯片中实现。其它模块的实现与之类似。此外这些模块全部或部分可以集成在一起,也可以独立实现。在实现过程中,上述方法的各步骤或以上各个模块可以通过处理器元件中的硬件的集成逻辑电路或者软件形式的指令完成。Specifically, during actual implementation, the device proposed in the embodiment of the present application may be fully or partially integrated into a physical entity, or may be physically separated. And these modules can all be implemented in the form of software calling through processing elements; they can also all be implemented in the form of hardware; some modules can also be implemented in the form of software calling through processing elements, and some modules can be implemented in the form of hardware. For example, the determination module can be a separately established processing element, or it can be a collection of It is implemented in a chip of an electronic device. The implementation of other modules is similar. In addition, all or part of these modules can be integrated together or implemented independently. During the implementation process, each step of the above method or each of the above modules can be completed by instructions in the form of hardware integrated logic circuits or software in the processor element.
例如,以上这些模块可以是被配置成实施以上方法的一个或多个集成电路,例如:一个或多个特定集成电路(Application Specific Integrated Circuit,ASIC),或,一个或多个数字信号处理器(Digital Singnal Processor,DSP),或,一个或者多个现场可编程门阵列(Field Programmable Gate Array,FPGA)等。再如,这些模块可以集成在一起,以片上装置(System-On-a-Chip,SOC)的形式实现。For example, the above modules may be one or more integrated circuits configured to implement the above methods, such as: one or more specific integrated circuits (Application Specific Integrated Circuit, ASIC), or one or more digital signal processors ( Digital Singnal Processor, DSP), or one or more Field Programmable Gate Array (Field Programmable Gate Array, FPGA), etc. For another example, these modules can be integrated together and implemented in the form of a System-On-a-Chip (SOC).
进一步的,基于本申请提出的图像处理方法,本申请一实施例还提出了一种电子设备,电子设备包括用于存储计算机程序指令的存储器、用于执行程序指令的处理器,其中,当计算机程序指令被该处理器执行时,处理器控制电子设备执行本申请实施例中所示的图像处理方法中的动作。Furthermore, based on the image processing method proposed in this application, an embodiment of this application also proposes an electronic device. The electronic device includes a memory for storing computer program instructions and a processor for executing the program instructions. When the computer When the program instructions are executed by the processor, the processor controls the electronic device to perform actions in the image processing method shown in the embodiments of the present application.
进一步的,基于本申请提出的模型训练方法,本申请一实施例还提出了一种电子设备,电子设备包括用于存储计算机程序指令的存储器、用于执行程序指令的处理器,其中,当计算机程序指令被该处理器执行时,处理器控制电子设备执行本申请实施例中所示的模型训练方法中的动作。Furthermore, based on the model training method proposed in this application, an embodiment of this application also proposes an electronic device. The electronic device includes a memory for storing computer program instructions and a processor for executing the program instructions. When the computer When the program instructions are executed by the processor, the processor controls the electronic device to perform actions in the model training method shown in the embodiments of this application.
图6所示为根据本申请一实施例的电子设备示意图。如图6所示,电子设备600包含存储器610以及处理器620。当存储器610上存储的特定的计算机程序指令被处理器620执行时,处理器620控制电子设备600执行本申请实施例中所示的图像处理方法或模型训练方法中的动作。Figure 6 shows a schematic diagram of an electronic device according to an embodiment of the present application. As shown in FIG. 6 , the electronic device 600 includes a memory 610 and a processor 620 . When specific computer program instructions stored on the memory 610 are executed by the processor 620, the processor 620 controls the electronic device 600 to perform actions in the image processing method or model training method shown in the embodiments of this application.
进一步的,在实际应用场景中,本说明书所示实施例的方法流程可以由安装在电子设备上的电子芯片所实现。因此,基于本申请提出的方法,本申请一实施例还提出了一种电子芯片,电子芯片包括用于存储计算机程序指令的存储器和用于执行计算机程序指令的处理器,其中,当计算机程序指令被该处理器执行时,触发电子芯片执行本申请上述实施例所示的图像处理方法中的动作。Further, in actual application scenarios, the method processes of the embodiments shown in this specification can be implemented by electronic chips installed on electronic devices. Therefore, based on the method proposed in this application, an embodiment of this application also proposes an electronic chip. The electronic chip includes a memory for storing computer program instructions and a processor for executing computer program instructions. When the computer program instructions When executed by the processor, the electronic chip is triggered to perform actions in the image processing method shown in the above embodiments of the present application.
进一步的,基于本申请提供的方法,本申请一实施例还提出了一种电子芯片,电子芯片包括用于存储计算机程序指令的存储器和用于执行计算机程序指令的处理器,其中,当计算机程序指令被该处理器执行时,触发电子芯片执行本申请上述实施例所示的模型训练方法中的动作。Furthermore, based on the method provided by this application, an embodiment of this application also proposes an electronic chip. The electronic chip includes a memory for storing computer program instructions and a processor for executing computer program instructions. When the computer program When the instructions are executed by the processor, the electronic chip is triggered to execute the actions in the model training method shown in the above embodiments of the present application.
进一步的,本申请实施例阐明的设备、装置、模块,具体可以由计算机芯片或实体实现,或者由具有某种功能的产品来实现。Furthermore, the equipment, devices, and modules described in the embodiments of this application may be implemented by computer chips or entities, or by products with certain functions.
本领域内的技术人员应明白,本申请实施例可提供为方法、装置、或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质上实施的计算机程序产品的形式。Those skilled in the art should understand that embodiments of the present application may be provided as methods, devices, or computer program products. Thus, the invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the invention may take the form of a computer program product embodied on one or more computer-usable storage media embodying computer-usable program code therein.
在本申请所提供的几个实施例中,任一功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干 指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。In the several embodiments provided in this application, if any function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the existing technology or the part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several The instructions are used to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of this application.
具体的,本申请一实施例中还提供一种计算机可读存储介质,该计算机可读存储介质中存储有计算机程序,当其在计算机上运行时,使得计算机执行本申请实施例提供的方法。Specifically, an embodiment of the present application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program that, when run on a computer, causes the computer to execute the method provided by the embodiment of the present application.
本申请一实施例还提供一种计算机程序产品,该计算机程序产品包括计算机程序,当其在计算机上运行时,使得计算机执行本申请实施例提供的方法。An embodiment of the present application also provides a computer program product. The computer program product includes a computer program that, when run on a computer, causes the computer to execute the method provided by the embodiment of the present application.
本申请中的实施例描述是参照根据本申请实施例的方法、设备(装置)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The embodiments in this application are described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (devices), and computer program products according to embodiments of the application. It will be understood that each process and/or block in the flowchart illustrations and/or block diagrams, and combinations of processes and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing device to produce a machine, such that the instructions executed by the processor of the computer or other programmable data processing device produce a use A device for realizing the functions specified in one process or multiple processes of the flowchart and/or one block or multiple blocks of the block diagram.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory that causes a computer or other programmable data processing apparatus to operate in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction means, the instructions The device implements the functions specified in a process or processes of the flowchart and/or a block or blocks of the block diagram.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions may also be loaded onto a computer or other programmable data processing device, causing a series of operating steps to be performed on the computer or other programmable device to produce computer-implemented processing, thereby executing on the computer or other programmable device. Instructions provide steps for implementing the functions specified in a process or processes of a flowchart diagram and/or a block or blocks of a block diagram.
还需要说明的是,本申请实施例中,“至少一个”是指一个或者多个,“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示单独存在A、同时存在A和B、单独存在B的情况。其中A,B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一项”及其类似表达,是指的这些项中的任意组合,包括单项或复数项的任意组合。例如,a,b和c中的至少一项可以表示:a,b,c,a和b,a和c,b和c或a和b和c,其中a,b,c可以是单个,也可以是多个。It should also be noted that in the embodiments of this application, "at least one" refers to one or more, and "multiple" refers to two or more. "And/or" describes the association of associated objects, indicating that there can be three relationships. For example, A and/or B can represent the existence of A alone, the existence of A and B at the same time, or the existence of B alone. Where A and B can be singular or plural. The character "/" generally indicates that the related objects are in an "or" relationship. “At least one of the following” and similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b and c can mean: a, b, c, a and b, a and c, b and c or a and b and c, where a, b, c can be single, also Can be multiple.
本申请实施例中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、商品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、商品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、商品或者设备中还存在另外的相同要素。In the embodiments of this application, the terms "comprising", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, commodity or device that includes a series of elements not only includes those elements, but also includes Other elements are not expressly listed or are inherent to the process, method, article or equipment. Without further limitation, an element defined by the statement "comprises a..." does not exclude the presence of additional identical elements in a process, method, article, or device that includes the stated element.
本申请可以在由计算机执行的计算机可执行指令的一般上下文中描述,例如程序模块。一般地,程序模块包括执行特定任务或实现特定抽象数据类型的例程、程序、对象、组件、数据结构等等。也可以在分布式计算环境中实践本申请,在这些分布式计算环境中,由通过通信网络而被连接的远程处理设备来执行任务。在分布式计算环境中,程序模块可以位于包括存储设备在内的本地和远程计算机存储介质中。 The application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including storage devices.
本申请中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于装置实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。Each embodiment in this application is described in a progressive manner. The same and similar parts between the various embodiments can be referred to each other. Each embodiment focuses on its differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple. For relevant details, please refer to the partial description of the method embodiment.
本领域普通技术人员可以意识到,本申请实施例中描述的各单元及算法步骤,能够以电子硬件、计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those of ordinary skill in the art can realize that each unit and algorithm step described in the embodiments of this application can be implemented by a combination of electronic hardware, computer software, and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Skilled artisans may implement the described functionality using different methods for each specific application, but such implementations should not be considered beyond the scope of this application.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的装置、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the devices, devices and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be described again here.
以上所述,仅为本申请的具体实施方式,任何熟悉本技术领域的技术人员在本申请公开的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。本申请的保护范围应以所述权利要求的保护范围为准。 The above are only specific embodiments of the present application. Any person familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, and they should be covered by the protection scope of the present application. The protection scope of this application shall be subject to the protection scope of the claims.

Claims (14)

  1. 一种图像处理方法,其特征在于,包括:An image processing method, characterized by including:
    获取第一人脸图像,所述第一人脸图像为脸部光照均匀的人脸图像;Obtaining a first face image, where the first face image is a face image with uniform facial illumination;
    将所述第一人脸图像输入到图像处理模型,获取所述图像处理模型输出的第二人脸图像,其中:Input the first face image to the image processing model and obtain the second face image output by the image processing model, where:
    所述图像处理模型包括第一生成模型,所述第一生成模型用于为所述第一人脸图像附加脸部光照不均匀的光影效果,以生成所述第二人脸图像。The image processing model includes a first generation model, and the first generation model is used to add a light and shadow effect of uneven facial illumination to the first face image to generate the second face image.
  2. 根据权利要求1所述的方法,其特征在于,所述图像处理模型为生成式对抗网络模型。The method of claim 1, wherein the image processing model is a generative adversarial network model.
  3. 根据权利要求2所述的方法,其特征在于,所述图像处理模型还包括:The method according to claim 2, characterized in that the image processing model further includes:
    判别模型,其用于在训练所述图像处理模型的过程中,基于光影判定样本图像,根据所述第一生成模型的输出解析所述第一生成模型的光影附加效果,以根据所述判别模型的解析结果调整所述第一生成模型,其中,输入到所述第一生成模型的人脸样本图像为脸部光照均匀的人脸图像,所述光影判定样本图像为脸部光照不均匀的人脸图像。A discriminant model, which is used to determine sample images based on light and shadow in the process of training the image processing model, and analyze the additional light and shadow effects of the first generative model according to the output of the first generative model, so as to determine the light and shadow additional effects of the first generative model according to the discriminant model. The analysis result adjusts the first generation model, wherein the face sample image input to the first generation model is a face image with uniform facial illumination, and the light and shadow determination sample image is a person with uneven facial illumination. face image.
  4. 根据权利要求3所述的方法,其特征在于,所述图像处理模型还包括:The method according to claim 3, characterized in that the image processing model further includes:
    第二生成模型,所述第二生成模型为所述第一生成模型的逆映射,所述第二生成模型用于,在训练所述图像处理模型的过程中,将所述第一生成模型的输出作为输入,以根据所述第二生成模型的输出以及所述第一生成模型的输入的对比结果调整所述第一生成模型。A second generative model. The second generative model is an inverse mapping of the first generative model. The second generative model is used to convert the first generative model into a second generative model during the training of the image processing model. The output is used as input to adjust the first generative model based on a comparison of the output of the second generative model and the input of the first generative model.
  5. 一种模型训练方法,其特征在于,所述方法用于训练图像处理模型,所述图像处理模型用于为脸部光照均匀的人脸图像附加脸部光照不均匀的光影效果,以生成脸部光照不均匀的人脸图像,所述图像处理模型为生成式对抗网络模型,所述图像处理模型包括第一生成模型以及判别模型,所述方法包括:A model training method, characterized in that the method is used to train an image processing model, and the image processing model is used to add a light and shadow effect of uneven facial illumination to a face image with uniform facial illumination to generate a face For face images with uneven illumination, the image processing model is a generative adversarial network model. The image processing model includes a first generative model and a discriminant model. The method includes:
    获取第一人脸样本图像,其中,所述第一人脸样本图像为脸部光照均匀的人脸图像;Obtaining a first face sample image, wherein the first face sample image is a face image with uniform facial illumination;
    将所述第一人脸样本图像输入到所述第一生成模型,所述第一生成模型根据所述第一人脸样本图像生成第二人脸样本图像;Input the first face sample image to the first generation model, and the first generation model generates a second face sample image according to the first face sample image;
    获取第三人脸样本图像,其中,所述第三人脸样本图像为脸部光照不均匀的人脸图像;Obtain a third face sample image, wherein the third face sample image is a face image with uneven facial illumination;
    使用所述判别模型,基于所述第三人脸样本图像,根据所述第二人脸样本图像解析所述第一生成模型的光影附加效果;Using the discriminant model, based on the third face sample image, analyze the light and shadow additional effects of the first generation model based on the second face sample image;
    根据所述判别模型的解析结果调整所述第一生成模型。The first generation model is adjusted according to the analysis results of the discriminant model.
  6. 根据权利要求5所述的方法,其特征在于,所述第三人脸样本图像与所述第一人脸样本图像不为成对的样本图像。The method according to claim 5, characterized in that the third face sample image and the first face sample image are not paired sample images.
  7. 根据权利要求5所述的方法,其特征在于,所述方法还包括:The method of claim 5, further comprising:
    获取第四人脸样本图像,其中,所述第四人脸样本图像为脸部光照均匀的人脸图像;Obtain a fourth face sample image, wherein the fourth face sample image is a face image with uniform facial illumination;
    将所述第四人脸样本图像输入到所述第一生成模型,所述第一生成模型根据所述第四人脸样本图像生成第五人脸样本图像;Input the fourth face sample image to the first generation model, and the first generation model generates a fifth face sample image based on the fourth face sample image;
    使用所述判别模型,基于所述第三人脸样本图像,根据所述第五人脸样本图像解析所述第一生成模型的光影附加效果。 Using the discriminant model, based on the third face sample image, the light and shadow additional effects of the first generation model are analyzed based on the fifth face sample image.
  8. 根据权利要求5所述的方法,其特征在于,所述方法还包括:The method of claim 5, further comprising:
    获取第六人脸样本图像,其中,所述第六人脸样本图像为脸部光照不均匀的人脸图像;Obtaining a sixth face sample image, wherein the sixth face sample image is a face image with uneven facial illumination;
    使用所述判别模型,基于所述第六人脸样本图像,根据所述第二人脸样本图像解析所述第一生成模型的光影附加效果。Using the discriminant model, based on the sixth face sample image, the light and shadow additional effects of the first generation model are analyzed based on the second face sample image.
  9. 根据权利要求5-8中任一项所述的方法,其特征在于,所述图像处理模型还包括第二生成模型,所述第二生成模型为所述第一生成模型的逆映射;The method according to any one of claims 5-8, characterized in that the image processing model further includes a second generative model, and the second generative model is an inverse mapping of the first generative model;
    所述方法还包括:The method also includes:
    将所述第二人脸样本图像输入到所述第二生成模型,所述第二生成模型根据所述第二人脸样本图像生成第七人脸样本图像;Input the second face sample image to the second generation model, and the second generation model generates a seventh face sample image based on the second face sample image;
    对比所述第七人脸样本图像以及所述第一人脸样本图像,根据对比结果调整所述第一生成模型。Compare the seventh face sample image and the first face sample image, and adjust the first generation model according to the comparison result.
  10. 一种图像处理装置,其特征在于,所述装置包括:An image processing device, characterized in that the device includes:
    图像处理模型,其用于获取第一人脸图像,输出第二人脸图像,其中:An image processing model, which is used to obtain a first face image and output a second face image, where:
    所述第一人脸图像为脸部光照均匀的人脸图像;The first face image is a face image with uniform facial illumination;
    所述图像处理模型包括第一生成模型,所述第一生成模型用于为所述第一人脸图像附加脸部光照不均匀的光影效果,以生成所述第二人脸图像。The image processing model includes a first generation model, and the first generation model is used to add a light and shadow effect of uneven facial illumination to the first face image to generate the second face image.
  11. 一种模型训练装置,其特征在于,所述装置用于训练图像处理模型,所述图像处理模型用于为脸部光照均匀的人脸图像附加脸部光照不均匀的光影效果,以生成脸部光照不均匀的人脸图像,所述图像处理模型为生成式对抗网络模型,所述图像处理模型包括第一生成模型以及判别模型,所述装置包括:A model training device, characterized in that the device is used to train an image processing model, and the image processing model is used to add a light and shadow effect of uneven facial illumination to a face image with uniform facial illumination to generate a facial expression. Face images with uneven illumination, the image processing model is a generative adversarial network model, the image processing model includes a first generation model and a discriminant model, the device includes:
    第一样本获取模块,其用于获取第一人脸样本图像并将所述第一人脸样本图像输入到所述第一生成模型,其中,所述第一人脸样本图像为脸部光照均匀的人脸图像;A first sample acquisition module configured to acquire a first face sample image and input the first face sample image to the first generation model, wherein the first face sample image is facial illumination Uniform face images;
    第二样本获取模块,其用于获取所述第一生成模型根据所述第一人脸样本图像所生成的第二人脸样本图像;a second sample acquisition module configured to acquire a second face sample image generated by the first generation model based on the first face sample image;
    第三样本获取模块,其用于获取第三人脸样本图像并将所述第三人脸样本图像输入到所述判别模型,其中,所述第三人脸样本图像为脸部光照不均匀的人脸图像;A third sample acquisition module configured to acquire a third face sample image and input the third face sample image into the discrimination model, wherein the third face sample image is one with uneven facial illumination. face images;
    解析结果获取模块,其用于获取所述判别模型的解析结果,其中,所述解析结果包括,所述判别模型基于所述第三人脸样本图像,根据所述第二人脸样本图像解析所述第一生成模型的光影附加效果的结果;An analysis result acquisition module, which is used to obtain the analysis results of the discrimination model, wherein the analysis results include: the discrimination model is based on the third face sample image, and the analysis result is based on the second face sample image. The results of the light and shadow additional effects of the first generated model;
    第一调节模块,其用于根据所述解析结果调整所述第一生成模型。A first adjustment module configured to adjust the first generation model according to the analysis results.
  12. 一种电子设备,其特征在于,所述电子设备包括用于执行计算机程序指令的处理器,其中,当存储器中存储的计算机程序指令被所述处理器执行时,触发所述电子设备执行如权利要求1-4中任一项所述的方法。An electronic device, characterized in that the electronic device includes a processor for executing computer program instructions, wherein when the computer program instructions stored in the memory are executed by the processor, the electronic device is triggered to execute the The method described in any one of claims 1-4.
  13. 一种电子设备,其特征在于,所述电子设备包括用于执行计算机程序指令的处理器,其中,当存储器中存储的计算机程序指令被所述处理器执行时,触发所述电子设备执行如权利要求5-9中任一项所述的方法。An electronic device, characterized in that the electronic device includes a processor for executing computer program instructions, wherein when the computer program instructions stored in the memory are executed by the processor, the electronic device is triggered to execute the The method described in any one of claims 5-9.
  14. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有计算机程序,当其在计算机上运行时,使得计算机执行如权利要求1-9中任一项所述的方法。 A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, and when it is run on a computer, it causes the computer to execute the method according to any one of claims 1-9. .
PCT/CN2023/085096 2022-06-30 2023-03-30 Image processing method and apparatus, and electronic device WO2024001363A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210767021.0 2022-06-30
CN202210767021.0A CN117391924A (en) 2022-06-30 2022-06-30 Image processing method and device and electronic equipment

Publications (1)

Publication Number Publication Date
WO2024001363A1 true WO2024001363A1 (en) 2024-01-04

Family

ID=89382675

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/085096 WO2024001363A1 (en) 2022-06-30 2023-03-30 Image processing method and apparatus, and electronic device

Country Status (2)

Country Link
CN (1) CN117391924A (en)
WO (1) WO2024001363A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110706152A (en) * 2019-09-25 2020-01-17 中山大学 Face illumination migration method based on generation of confrontation network
CN112464924A (en) * 2019-09-06 2021-03-09 华为技术有限公司 Method and device for constructing training set
CN114266933A (en) * 2021-12-10 2022-04-01 河南垂天科技有限公司 GAN image defogging algorithm based on deep learning improvement
CN114663570A (en) * 2022-03-25 2022-06-24 北京奇艺世纪科技有限公司 Map generation method and device, electronic device and readable storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112464924A (en) * 2019-09-06 2021-03-09 华为技术有限公司 Method and device for constructing training set
CN110706152A (en) * 2019-09-25 2020-01-17 中山大学 Face illumination migration method based on generation of confrontation network
CN114266933A (en) * 2021-12-10 2022-04-01 河南垂天科技有限公司 GAN image defogging algorithm based on deep learning improvement
CN114663570A (en) * 2022-03-25 2022-06-24 北京奇艺世纪科技有限公司 Map generation method and device, electronic device and readable storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
NING NING, JIN XIN; ZHANG XIAOKUN; LI YANNAN: "Research of Face Relighting Method Based on GAN", JOURNAL OF BEIJING ELECTRONIC SCIENCE AND TECHNOLOGY INSTITUTE, vol. 27, no. 4, 15 December 2019 (2019-12-15), pages 33 - 41, XP093124112 *

Also Published As

Publication number Publication date
CN117391924A (en) 2024-01-12

Similar Documents

Publication Publication Date Title
Yeh et al. Lightweight deep neural network for joint learning of underwater object detection and color conversion
Liu et al. Contrastive context-aware learning for 3d high-fidelity mask face presentation attack detection
WO2021036059A1 (en) Image conversion model training method, heterogeneous face recognition method, device and apparatus
WO2019100282A1 (en) Face skin color recognition method, device and intelligent terminal
WO2019015466A1 (en) Method and apparatus for verifying person and certificate
KR100735549B1 (en) Method and apparatus for conversion of skin color of image
Betancourt et al. A sequential classifier for hand detection in the framework of egocentric vision
WO2022206319A1 (en) Image processing method and apparatus, and device, storage medium and computer program product
TW202011260A (en) Liveness detection method, apparatus and computer-readable storage medium
WO2019153741A1 (en) Image coloring method and apparatus
KR20070016849A (en) Method and apparatus for serving prefer color conversion of skin color applying face detection and skin area detection
WO2022151655A1 (en) Data set generation method and apparatus, forgery detection method and apparatus, device, medium and program
WO2019041660A1 (en) Face deblurring method and device
US20110182497A1 (en) Cascade structure for classifying objects in an image
Mallet et al. Using deep learning to detecting deepfakes
Zheng et al. Differential-evolution-based generative adversarial networks for edge detection
WO2022156214A1 (en) Liveness detection method and apparatus
Planamente et al. Da4event: towards bridging the sim-to-real gap for event cameras using domain adaptation
WO2024001363A1 (en) Image processing method and apparatus, and electronic device
WO2020251676A1 (en) A biometric verification framework that utilizes a convolutional neural network for feature matching
US11734389B2 (en) Method for generating human-computer interactive abstract image
Liu et al. Reagent color recognition model for Android platform based on opencv and machine learning
US11893791B2 (en) Pre-processing image frames based on camera statistics
CN111582067B (en) Facial expression recognition method, system, storage medium, computer program and terminal
Wang et al. Research and implementation on face detection approach based on cascaded convolutional neural networks

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23829553

Country of ref document: EP

Kind code of ref document: A1