WO2020237937A1 - 一种图像处理方法及装置、电子设备和存储介质 - Google Patents
一种图像处理方法及装置、电子设备和存储介质 Download PDFInfo
- Publication number
- WO2020237937A1 WO2020237937A1 PCT/CN2019/107854 CN2019107854W WO2020237937A1 WO 2020237937 A1 WO2020237937 A1 WO 2020237937A1 CN 2019107854 W CN2019107854 W CN 2019107854W WO 2020237937 A1 WO2020237937 A1 WO 2020237937A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- feature
- mask
- image
- image data
- training
- Prior art date
Links
- 238000003860 storage Methods 0.000 title claims abstract description 28
- 238000003672 processing method Methods 0.000 title claims abstract description 14
- 238000013507 mapping Methods 0.000 claims abstract description 115
- 238000000034 method Methods 0.000 claims abstract description 73
- 238000012549 training Methods 0.000 claims description 101
- 238000012545 processing Methods 0.000 claims description 74
- 230000004927 fusion Effects 0.000 claims description 63
- 230000006870 function Effects 0.000 claims description 37
- 230000008569 process Effects 0.000 claims description 34
- PXFBZOLANLWPMH-UHFFFAOYSA-N 16-Epiaffinine Natural products C1C(C2=CC=CC=C2N2)=C2C(=O)CC2C(=CC)CN(C)C1C2CO PXFBZOLANLWPMH-UHFFFAOYSA-N 0.000 claims description 17
- 238000004590 computer program Methods 0.000 claims description 15
- 238000004088 simulation Methods 0.000 claims description 14
- 230000001131 transforming effect Effects 0.000 claims description 4
- 230000001815 facial effect Effects 0.000 abstract description 12
- 238000010586 diagram Methods 0.000 description 22
- 238000004891 communication Methods 0.000 description 10
- 230000008859 change Effects 0.000 description 8
- 238000005516 engineering process Methods 0.000 description 6
- 230000009471 action Effects 0.000 description 5
- 230000005540 biological transmission Effects 0.000 description 5
- 238000006243 chemical reaction Methods 0.000 description 4
- 230000003287 optical effect Effects 0.000 description 4
- 230000005236 sound signal Effects 0.000 description 4
- 230000037308 hair color Effects 0.000 description 3
- 239000000203 mixture Substances 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 230000001133 acceleration Effects 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 230000002452 interceptive effect Effects 0.000 description 2
- 230000007774 longterm Effects 0.000 description 2
- 239000013307 optical fiber Substances 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 230000001902 propagating effect Effects 0.000 description 2
- 230000003068 static effect Effects 0.000 description 2
- 230000000007 visual effect Effects 0.000 description 2
- RYGMFSIKBFXOCR-UHFFFAOYSA-N Copper Chemical compound [Cu] RYGMFSIKBFXOCR-UHFFFAOYSA-N 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 229910052802 copper Inorganic materials 0.000 description 1
- 239000010949 copper Substances 0.000 description 1
- 238000009826 distribution Methods 0.000 description 1
- 238000011156 evaluation Methods 0.000 description 1
- 238000003709 image segmentation Methods 0.000 description 1
- 238000003384 imaging method Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000008447 perception Effects 0.000 description 1
- 229920001690 polydopamine Polymers 0.000 description 1
- 230000002441 reversible effect Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 230000001052 transient effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformations in the plane of the image
- G06T3/04—Context-preserving transformations, e.g. by using an importance map
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/214—Generating training patterns; Bootstrap methods, e.g. bagging or boosting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/25—Fusion techniques
- G06F18/251—Fusion techniques of input or preprocessed data
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/045—Combinations of networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/047—Probabilistic or stochastic networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
- G06N3/084—Backpropagation, e.g. using gradient descent
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
- G06N3/088—Non-supervised learning, e.g. competitive learning
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/90—Determination of colour characteristics
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/82—Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/10—Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
- G06V40/16—Human faces, e.g. facial parts, sketches or expressions
- G06V40/168—Feature extraction; Face representation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10024—Color image
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20076—Probabilistic image processing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20081—Training; Learning
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20212—Image combination
- G06T2207/20221—Image fusion; Image merging
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30196—Human being; Person
- G06T2207/30201—Face
Definitions
- the present disclosure relates to the field of image editing, and in particular to an image processing method and device, electronic equipment and storage medium.
- face attributes are a dominant visual attribute in the daily life of users.
- manipulating face attributes has important applications in many fields, such as automated face editing.
- the editing of face attributes does not support more attribute changes and user-interactive attribute customization, resulting in a low degree of freedom in editing the face appearance, and changes to the face appearance are within a limited range , Does not meet the editing needs of more changes and more freedom of facial appearance.
- the present disclosure proposes an image processing technical solution.
- an image processing method including:
- the color feature and the self-defined mask feature are input into a feature mapping network to edit image attributes to obtain a second image.
- the feature mapping network is a feature mapping network obtained after training
- the training process of the feature mapping network includes:
- the feature mapping network is trained, and the image attributes are edited according to the feature mapping network obtained after training, which can support more Multiple attribute changes and support for user-interactive attribute customization, so that the second image obtained by editing meets the editing needs of more changes in facial appearance and more freedom.
- mapping the color feature of at least one block in the first image data to the corresponding mask feature in the feature mapping network to output the second image data includes:
- the image fusion feature and the corresponding mask feature are input to an image generation module to obtain the second image data.
- image fusion features used to characterize space and color features can be obtained. Because the image fusion features have both spatial perception and Color feature, therefore, according to the image fusion feature and corresponding mask feature and image generation module, the obtained second image can meet the editing needs of more changes and more degrees of freedom of the facial appearance.
- the inputting the image fusion feature and the corresponding mask feature into an image generation module to obtain the second image data includes:
- the image fusion feature Inputting the image fusion feature into the image generation module, and transforming the image fusion feature into a corresponding affine parameter through the image generation module, and the affine parameter includes a first parameter and a second parameter;
- the second image data is obtained.
- the corresponding affine parameters are obtained according to the image fusion feature, and the third parameter obtained according to the corresponding mask feature can be combined to obtain the second image data. Since the image fusion feature is taken into consideration And further training is combined with corresponding mask features, and the obtained second image can support more face appearances and more changes.
- the method further includes:
- the mask feature corresponding to the first image data in the training data set is input to the mask variational coding module for training, and two sub-mask variations are obtained as output.
- the variation of the sub-mask can be obtained through the mask variational coding module, and then learning is performed based on the variation of the sub-mask, which can better simulate and train the face editing process.
- the input of the mask feature corresponding to the first image data in the training data set to the mask variational coding module for training, and the output of two sub-mask variations includes:
- Encoding is performed by the mask variational encoding module, and the first mask feature and the second mask feature are respectively mapped to a preset feature space to obtain the first intermediate variable and the second intermediate variable; where The preset feature space is lower in dimension than the first mask feature and the second mask feature;
- the mask variational encoding module is used to perform decoding processing, and the two third intermediate variables are converted into the two sub-mask variations.
- the two sub-mask changes can be obtained through the encoding processing and decoding processing of the mask variational encoding module, so that the two sub-mask changes can be used to better simulate the face editing processing.
- the method further includes: a process of simulation training on face editing processing;
- the simulation training process includes:
- the two feature mapping networks Inputting the two sub-mask changes into two feature mapping networks respectively, the two feature mapping networks share a set of shared weights and update the weights of the feature mapping network, and output two image data;
- the simulation training process ends when the network convergence is reached.
- the obtained two sub-mask changes are respectively input into a feature mapping network sharing a set of shared weights, and the generated second image data can be obtained.
- Loss of the image data and the first image data can improve the accuracy of face editing processing to be close to the real image data, so that the second image data generated by custom mask features is more convenient. It can meet the editing needs of more changes and more freedom of facial appearance.
- an image processing apparatus including:
- the first feature acquisition module is configured to acquire the color features extracted from the first image
- a second feature acquisition module configured to acquire a custom mask feature, where the custom mask feature is used to specify a regional position of the color feature in the first image
- the editing module is used to input the color feature and the self-defined mask feature into a feature mapping network to edit image attributes to obtain a second image.
- the feature mapping network is a feature mapping network obtained after training
- the device also includes:
- the first processing module is configured to use a data pair composed of the first image data and the mask feature corresponding to the first image data as a training data set;
- the second processing module is configured to input the training data set into the feature mapping network, and map the color feature of at least one block in the first image data to the corresponding mask feature in the feature mapping network , Output the second image data, obtain a loss function according to the second image data and the first image data, generate a confrontation through the back propagation of the loss function, and end the feature mapping network when the network converges The training process.
- the second processing module is further configured to:
- the image fusion feature and the corresponding mask feature are input to an image generation module to obtain the second image data.
- the second processing module is further configured to:
- the image fusion feature Inputting the image fusion feature into an image generation module, and transforming the image fusion feature into a corresponding affine parameter through the image generation module, and the affine parameter includes a first parameter and a second parameter;
- the device further includes: a third processing module, configured to:
- the mask feature corresponding to the first image data in the training data set is input to the mask variational coding module for training, and two sub-mask variations are obtained as output.
- the third processing module is further configured to:
- Encoding is performed by the mask variational encoding module, and the first mask feature and the second mask feature are respectively mapped to a preset feature space to obtain a first intermediate variable and a second intermediate variable; where The preset feature space is lower in dimension than the first mask feature and the second mask feature;
- the mask variational encoding module is used to perform decoding processing to convert the two third intermediate variables into the two sub-mask variation amounts.
- the device further includes: a fourth processing module, configured to:
- the two feature mapping networks Inputting the two sub-mask changes into two feature mapping networks respectively, the two feature mapping networks share a set of shared weights and update the weights of the feature mapping network, and output two image data;
- the image fusion data obtained by fusing the two image data is used as the second image data, a loss function is obtained according to the second image data and the first image data, and generated by back propagation of the loss function Confrontation, the simulation training process of face editing processing is ended when the feature mapping network is converged.
- an electronic device including:
- a memory for storing processor executable instructions
- the processor is configured to execute the above-mentioned image processing method.
- a computer-readable storage medium having computer program instructions stored thereon, and the computer program instructions implement the above-mentioned image processing method when executed by a processor.
- acquiring a color feature extracted from a first image acquiring a custom mask feature, the custom mask feature being used to specify the region position of the color feature in the first image;
- the color feature and the self-defined mask feature are input into a feature mapping network to edit image attributes to obtain a second image.
- the location of the color feature in the first image can be specified through a custom mask feature. Since it supports more attribute changes and supports user-interactive mask attribute customization, the feature mapping network is implemented Editing of image attributes, the second image obtained meets the editing needs of more changes and more freedom of facial appearance.
- Fig. 1 shows a flowchart of an image processing method according to an embodiment of the present disclosure.
- Fig. 2 shows a flowchart of an image processing method according to an embodiment of the present disclosure.
- Fig. 3 shows a schematic diagram of a first training process according to an embodiment of the present disclosure.
- Fig. 4 shows a schematic diagram of the composition of a dense mapping network according to an embodiment of the present disclosure.
- Fig. 5 shows a schematic diagram of a second training process according to an embodiment of the present disclosure.
- Fig. 6 shows a block diagram of an image processing apparatus according to an embodiment of the present disclosure.
- FIG. 7 shows a block diagram of an electronic device according to an embodiment of the present disclosure.
- FIG. 8 shows a block diagram of an electronic device according to an embodiment of the present disclosure.
- face attributes are a dominant visual attribute in our daily life.
- manipulating face attributes has very important applications in many fields, such as automated face editing.
- most of the face attribute editing work mainly focuses on the semantic level of face attribute editing, such as the editing of hair or skin color, and the semantic level attribute editing has only a small degree of freedom, and cannot be changed and interactively.
- the present disclosure is a technical solution that can interactively edit a face based on the geometric orientation of the face attribute.
- the so-called geometric orientation in simple terms, refers to the adjustment of the position of a certain area in the image, for example, the face in the image is not smiling. By adjusting the position of the area, you can get a face that is smiling Image, this is an adjustment to the position of the area.
- FIG. 1 shows a flowchart of an image processing method according to an embodiment of the present disclosure.
- the image processing method is applied to an image processing apparatus.
- the image processing apparatus may be executed by a terminal device or a server or other processing device, where the terminal device may be User Equipment (UE, User Equipment), mobile devices, cellular phones, cordless phones, personal digital assistants (PDAs, Personal Digital Assistant), handheld devices, computing devices, vehicle-mounted devices, wearable devices, etc.
- the image processing method can be implemented by a processor calling computer-readable instructions stored in the memory. As shown in Figure 1, the process includes:
- Step S101 Acquire color features extracted from the first image.
- the attribute editing of the face can include semantic level attribute editing and geometric orientation level attribute editing.
- semantic level attribute editing for example, such as hair color, skin color, makeup and makeup.
- geometric orientation level such as a custom shape.
- the position of the hair whether the expression is smiling or not smiling.
- Step S102 Obtain a custom mask feature, where the custom mask feature (mask feature M src in FIG. 4) is used to specify the region position of the color feature in the first image.
- the custom mask feature mask feature M src in FIG. 4
- Step S103 Input the color feature and the self-defined mask feature into a feature mapping network (such as a dense mapping network) to edit image attributes to obtain a second image.
- a feature mapping network such as a dense mapping network
- the color feature represents the semantic attribute of the image.
- Semantic attributes are the specific content of image attributes, such as hair color, skin color, makeup and so on.
- the mask feature is used to identify the location of the area specified by the color feature in the image, or it is called the shape of the area.
- the mask feature can use the existing features in the data set, or it can be customized based on the existing features in the data set, which is called "custom mask feature", that is, the color feature can be specified in the image according to the user's configuration The location of the area.
- the mask feature represents the geometric properties of the image. Geometric attributes represent the position of image attributes, such as the position of the hair in the face image, whether the expression is smiling or not smiling in the face image, and so on.
- the mask feature M src in FIG. 4 of the present disclosure is the self-defined mask feature.
- the feature mapping network is used to combine the color features of the target image (the first image) and custom mask features (geometric attributes are added in the image attribute editing, that is, in order to change the area shape and/or position of the first image to the second Custom editing is performed in the image, for example, the expression of the first image is smiling, and the expression of the second image is not smiling after the change, etc.) to form a dense mapping, so as to obtain any customized face image desired by the user.
- the feature mapping network may be: a dense mapping network after training obtained after training the dense mapping network.
- the editing of face attributes can be customized according to the user's configuration for mask features, which adds more attribute changes to face editing, and supports users to perform attribute customization in an interactive manner. It is only limited to the use of existing attributes, therefore, the degree of freedom of editing the facial appearance is improved, and the desired target image is obtained based on the self-defined mask.
- the change of facial appearance is universal, and the scope of application is wider, which meets the editing needs of more changes and more freedom of facial appearance.
- Fig. 2 shows a flowchart of an image processing method according to an embodiment of the present disclosure, as shown in Fig. 2, including:
- Step S201 Train the feature mapping network according to the input data (the first image data and the mask feature corresponding to the first image data) to obtain the trained feature mapping network.
- the process of training the feature mapping network includes: using a data pair consisting of first image data and mask features corresponding to the first image data as a training data set; inputting the training data set into the feature mapping network, In the feature mapping network, the color feature of at least one block in the first image data is mapped to the corresponding mask feature, and the second image data is obtained by outputting.
- the second image data and the first image data ie Different from the generated second image data, it is real image data in the real world
- the training process ends when the network converges.
- Fig. 3 shows a schematic diagram of the first training process according to an embodiment of the present disclosure.
- input data pair to feature mapping network such as dense mapping network
- feature mapping network such as dense mapping network
- multiple data pairs constitute a training data set for training the feature mapping network (such as a dense mapping network).
- the data pair is composed of first image data (such as I t ) and a mask feature (M t ) corresponding to the first image data.
- the training data set into a dense mapping network map the color feature of at least one block in the first image data to the corresponding mask feature in the dense mapping network, and output the second image data (such as I out ),
- the generated second image data is input to the discriminator 12 for generating confrontation, that is, the loss function is obtained according to the second image data and the first image data, and the generation confrontation is performed through the back propagation of the loss function.
- the dense mapping is ended. The training process of the network.
- Step S202 Obtain the color feature extracted from the first image.
- the attribute editing of the face can include semantic level attribute editing and geometric orientation level attribute editing.
- semantic level attribute editing for example, such as hair color, skin color, makeup and makeup.
- geometric orientation level such as a custom shape.
- the position of the hair whether the expression is smiling or not smiling.
- Step S203 Acquire a custom mask feature, where the custom mask feature (mask feature M src in FIG. 4) is used to specify the region position of the color feature in the first image.
- the custom mask feature mask feature M src in FIG. 4
- Step S204 Input the color feature and the custom mask feature into a trained feature mapping network (such as a trained dense mapping network) to edit image attributes to obtain a second image.
- a trained feature mapping network such as a trained dense mapping network
- the block color pattern of the target image is projected into the corresponding mask through training and learning through a dense mapping network.
- the dense mapping network provides users with an editing platform that allows users to change the appearance of faces by editing masks, with greater editing freedom and multiple changes and interactive face editing.
- the training data set used for training and learning is a large-scale face mask data set. It has more categories and a larger order of magnitude than the previous data set.
- the data set has a pixel level of 512x512 and a total of 30,000 groups, a total of 19 A category, including all face parts and accessories.
- mapping the color feature of at least one block in the first image data to the corresponding mask feature in the feature mapping network, and outputting to obtain the second image data includes: Color features and corresponding mask features are input to the feature fusion coding module in the feature mapping network. The color feature provided by the first image data and the spatial feature provided by the corresponding mask feature are fused by the feature fusion coding module to obtain an image fusion feature for representing the space and color features, and the image fusion feature The corresponding mask feature is input to the image generation module to obtain second image data.
- the image fusion feature that characterizes the space and the color feature is to generate the image fusion feature that has both the space and the color feature by fusing the color feature provided by the image and the space feature provided by the mask feature.
- the mask feature can be used to indicate the specific area location of a certain color in the image. For example, if the color feature of hair is golden, then the mask feature can be used to know where the golden color is located in the image , And then fuse the color feature (golden color) with the corresponding area position to obtain the golden hair filled in the area in the image.
- inputting the image fusion feature and the corresponding mask feature into an image generation module to obtain the second image data includes: inputting the image fusion feature into the image generation module and pass the image generation module
- the image fusion feature is transformed into corresponding affine parameters, and the affine parameters include the first parameter (X i in FIG. 4) and the second parameter (Y i in FIG. 4 ).
- the second image data is obtained.
- the feature mapping network is a dense mapping network
- the feature fusion coding module is a spatially aware color style encoder
- the image generation module is the backbone of image generation.
- FIG. 4 shows a schematic diagram of the composition of a dense mapping network according to an embodiment of the present disclosure.
- the network includes two sub-components: a spatially aware color style encoder 111 and an image generation backbone 112.
- the spatially aware color style encoder 111 also includes: a layer 1111 of spatial feature conversion. Among them, the space-aware color style encoder 111 is used for fusing the mask feature representing the spatial feature of the image with the color feature.
- the spatially aware color pattern encoder 111 uses the layer 1111 of spatial feature conversion to fuse the color features provided by the image and the spatial features provided by the mask feature to generate image fusion features.
- the mask feature is used to indicate the specific area location of a certain color in the image. For example, if the hair is golden, then the mask feature can be used to know where the golden color is located in the image.
- the color feature (golden color) is merged with the corresponding area position to get the golden hair in the image.
- the image generation backbone 112 is used to combine the mask features with the affine parameters, and use them as input parameters to obtain the correspondingly generated face image I out .
- video generation backbone 112 can be adapted to columns of the real normalized image fusion Have converted into feature affine parameter (X i, Y i), characterized in that the input mask is received to generate corresponding color characteristic face
- the image, the color characteristics of the final target photo and the input mask can form a dense mapping.
- AdaIN Parameters is a parameter obtained by inputting a training data set into a dense mapping network, such as a parameter obtained by a layer 1111 of spatial feature conversion after inputting I t and M t .
- AdaIN Parameters may be (X i, Y i, Z i), wherein, Xi, Yi is the affine parameter, and Z i is the characteristic feature of the input mask image M t generated via trunk 112 generates, as shown by the arrows in The corresponding four squares are shown.
- the method further includes: inputting the mask feature corresponding to the first image data in the training data set to a mask variational coding module for training, and outputting two sub-mask variations.
- the input of the mask feature corresponding to the first image data in the training data set to the mask variational coding module for training, and the output to obtain two sub-mask variations includes: A first mask feature and a second mask feature are obtained from the data set, and the second mask feature is different from the first mask feature.
- Encoding is performed by the mask variational encoding module, and the first mask feature and the second mask feature are respectively mapped to a preset feature space to obtain a first intermediate variable and a second intermediate variable; where The predetermined feature space is lower in dimension than the first mask feature and the second mask feature.
- two third intermediate variables corresponding to the changes of the two sub-masks are obtained.
- the mask variational encoding module is used to perform decoding processing, and the two third intermediate variables are converted into the two sub-mask variations.
- the hardware implementation of the mask variational encoding module may be the mask variational autoencoder 10, and the mask feature M t corresponding to the first image data in the training data set is input into the mask variational autoencoder 10 for training , And output two sub-mask changes M inter and M outer .
- the mask variational automatic encoder includes two sub-devices: an encoder and a decoder.
- the first mask feature M t and the second mask feature M ref are obtained from the training data set. Both M ref and M t are mask features extracted from the training data set and they are not the same.
- the encoding process is performed by the encoder of the mask variational autoencoder 10, and the first mask feature and the second mask feature are respectively mapped to the preset feature space, and the first intermediate variable Z t and the second intermediate variable are obtained.
- Variable Z ref wherein the preset feature space is lower in dimension than the first mask feature and the second mask feature.
- two third intermediate variables corresponding to the changes of the two sub-masks, namely Z inter and Z outer are obtained .
- the decoder of the encoder 10 of the mask variational autoencoder performs decoding processing to convert the two third intermediate variables into the two sub-mask variations, namely M inter and M outer .
- the above-mentioned processing performed by the mask variational automatic encoder 10 corresponds to the following formula (1)-formula (6).
- the initialization phase training a dense network mapping G A, Enc VAE encoder and a decoder Dec VAE mask Variational automatic train encoder.
- the input parameters are: image I t , first mask feature M t , and second mask feature M ref .
- the specific processing performed by the mask variational autoencoder 10 is used to obtain two sub-mask variation, namely M inter and M outer .
- M t and I t is composed of;
- M t is a first mask features, M ref second mask features, M ref and M t is extracted from the training data are concentrated mask Features and the two are not the same;
- Z t is the first intermediate variable, and
- Z ref is the second intermediate variable, which are two intermediate variables obtained by mapping M t and M ref to the preset feature space respectively, so as to be based on Z t and Z ref obtain two intermediate variables Z inter third and Z outer, two sub-masks can be obtained variation amount M inter and M outer through Z inter and Z outer.
- the output parameters are: the face images I inter and I outer generated according to the input parameters, and the fused image I blend obtained by fusing the face images according to the alpha blender 13. After that, the fused image is confronted with the discriminator 12, and the first training process and the second training process are processed according to the above content two to update G A (I t , M t ) and G B (I t , M t , M inter , M outer ).
- the method further includes: a process of simulation training for face editing processing.
- the simulation training process includes: inputting the mask features corresponding to the first image data in the training data set to the mask variational coding module, and outputting two sub-mask changes; and inputting the two sub-mask changes to two Two feature mapping networks, the two feature mapping networks share a set of shared weights and update the weights of the feature mapping network, and output two image data; the two image data are obtained by fusing (such as Alpha Fusion)
- the image fusion data is used as the second image data, a loss function is obtained according to the second image data and the first image data, and the back-propagation of the loss function is used to generate a confrontation, and the simulation training is ended when the network converges process.
- the complete training is divided into two stages.
- the dense mapping network and the mask variational autoencoder must be trained first, and the dense mapping network is updated in the first stage.
- the second stage uses the mask variational autoencoder to generate two mask changes, and then updates the two shared weights to the dense mapping network and the Alpha Fusion.
- Fig. 5 shows a schematic diagram of a second training phase according to an embodiment of the present disclosure.
- Stage II training user editing simulation training
- the training method used requires three modules: mask variational autoencoder, dense mapping network and Alpha Fusion.
- the mask variational autoencoder is responsible for simulating the mask edited by the user.
- the dense mapping network is responsible for converting the mask into a human face and projecting the color pattern of the target human face to the mask.
- the Alpha Fusion is responsible for the Alpha fusion of the two sets of simulated editing masks generated by the mask variational autoencoder and the faces generated by the dense mapping network.
- the dense mapping network and the mask variational autoencoder are trained first, and then the dense mapping network and the mask variational autoencoder are used.
- the mask variational autoencoder that is, using the above formula (1)-formula (6), through the linear difference compensation in the hidden space to generate two simulated mask changes (as referred to as sub Mask change amount).
- the dense mapping network can be updated once, and then in the second stage, using the two mask changes generated at the beginning, the two dense mapping networks that share weights are used to generate two faces, and then the Alpha Fusion is used for fusion.
- the fused result and the target image are used for loss calculation and network update.
- the model (such as dense mapping network and masked variational autoencoder) converges.
- the model can still improve the maintenance of facial attributes (such as makeup, gender, beard, etc.)
- the writing order of the steps does not mean a strict execution order but constitutes any limitation on the implementation process.
- the specific execution order of each step should be based on its function and possibility.
- the inner logic is determined.
- the present disclosure also provides image processing devices, electronic equipment, computer-readable storage media, and programs, all of which can be used to implement any image segmentation method provided in the present disclosure.
- image processing devices electronic equipment, computer-readable storage media, and programs, all of which can be used to implement any image segmentation method provided in the present disclosure.
- Fig. 6 shows a block diagram of an image processing device according to an embodiment of the present disclosure.
- the image processing device of an embodiment of the present disclosure includes: a first feature acquisition module 31, which is used to acquire the image extracted from the first image Color feature; a second feature acquisition module 32, used to acquire a custom mask feature, the custom mask feature is used to specify the color feature in the region position in the first image; editing module 33, It is used to input the color feature and the self-defined mask feature into a feature mapping network to edit image attributes to obtain a second image.
- the feature mapping network is a feature mapping network obtained after training.
- the device further includes: a first processing module, configured to use a data pair composed of the first image data and a mask feature corresponding to the first image data as a training data set; a second processing module, configured to combine the training data set Input the feature mapping network, map the color feature of at least one block in the first image data to the corresponding mask feature in the feature mapping network, and output the second image data, according to the second
- the image data and the first image data obtain a loss function, and generate a confrontation through back propagation of the loss function, and the training process of the feature mapping network is ended when the network is converged.
- the second processing module is further configured to: input the color feature and the corresponding mask feature of the at least one block into the feature fusion coding module in the feature mapping network;
- the feature fusion coding module fuses the color feature provided by the first image data and the spatial feature provided by the corresponding mask feature to obtain an image fusion feature.
- the image fusion feature and the corresponding mask feature are input to an image generation module to obtain the second image data.
- the second processing module is further configured to: input the image fusion feature into an image generation module, and transform the image fusion feature into a corresponding affine parameter through the image generation module,
- the affine parameter includes a first parameter and a second parameter; the corresponding mask feature is input to the image generation module to obtain a third parameter; according to the first parameter, the second parameter, and the The third parameter is to obtain the second image data.
- the device further includes: a third processing module, configured to: input the mask features corresponding to the first image data in the training data set to the mask variational coding module for training, and output two Sub-mask change amount.
- a third processing module configured to: input the mask features corresponding to the first image data in the training data set to the mask variational coding module for training, and output two Sub-mask change amount.
- the third processing module is further configured to: obtain a first mask feature and a second mask feature from the training data set, where the second mask feature is different from the first mask feature A mask feature; the encoding process is performed by the mask variational encoding module, and the first mask feature and the second mask feature are respectively mapped into a preset feature space to obtain the first intermediate variable and the second intermediate Variable; wherein the preset feature space is lower in dimension than the first mask feature and the second mask feature; according to the first intermediate variable and the second intermediate variable, the corresponding Two third intermediate variables of the two sub-mask changes; the two third intermediate variables are converted into the two sub-mask changes by performing decoding processing by a mask variational encoding module.
- the device further includes: a fourth processing module, configured to: input the mask features corresponding to the first image data in the training data set to the mask variational coding module, and output two sub-masks.
- Film change amount input the two sub-mask changes into two feature mapping networks respectively, the two feature mapping networks share a set of shared weights and update the weights of the feature mapping network, and output two image data;
- the image fusion data obtained by fusing the two image data is used as the second image data, a loss function is obtained according to the second image data and the first image data, and the back propagation of the loss function is used to generate a confrontation to achieve When the feature mapping network converges, the simulation training process of face editing processing ends.
- the functions or modules contained in the device provided in the embodiments of the present disclosure can be used to execute the methods described in the above method embodiments.
- the functions or modules contained in the device provided in the embodiments of the present disclosure can be used to execute the methods described in the above method embodiments.
- the embodiments of the present disclosure also provide a computer-readable storage medium on which computer program instructions are stored, and the computer program instructions implement the above-mentioned method when executed by a processor.
- the computer-readable storage medium may be a non-volatile computer-readable storage medium.
- An embodiment of the present disclosure also provides an electronic device, including: a processor; a memory for storing executable instructions of the processor; wherein the processor is configured as the above method.
- the electronic device can be provided as a terminal, server or other form of device.
- Fig. 7 is a block diagram showing an electronic device 800 according to an exemplary embodiment.
- the electronic device 800 may be a mobile phone, a computer, a digital broadcasting terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, and other terminals.
- the electronic device 800 may include one or more of the following components: a processing component 802, a memory 804, a power supply component 806, a multimedia component 808, an audio component 810, an input/output (I/O) interface 812, and a sensor component 814 , And communication component 816.
- the processing component 802 generally controls the overall operations of the electronic device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations.
- the processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the foregoing method.
- the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components.
- the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.
- the memory 804 is configured to store various types of data to support operations in the electronic device 800. Examples of these data include instructions for any application or method operating on the electronic device 800, contact data, phone book data, messages, pictures, videos, etc.
- the memory 804 can be implemented by any type of volatile or nonvolatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable Programmable Read Only Memory (EPROM), Programmable Read Only Memory (PROM), Read Only Memory (ROM), Magnetic Memory, Flash Memory, Magnetic Disk or Optical Disk.
- SRAM static random access memory
- EEPROM electrically erasable programmable read-only memory
- EPROM erasable Programmable Read Only Memory
- PROM Programmable Read Only Memory
- ROM Read Only Memory
- Magnetic Memory Flash Memory
- Magnetic Disk Magnetic Disk or Optical Disk.
- the power supply component 806 provides power for various components of the electronic device 800.
- the power supply component 806 may include a power management system, one or more power supplies, and other components associated with the generation, management, and distribution of power for the electronic device 800.
- the multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user.
- the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user.
- the touch panel includes one or more touch sensors to sense touch, sliding, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure related to the touch or slide operation.
- the multimedia component 808 includes a front camera and/or a rear camera. When the electronic device 800 is in an operation mode, such as a shooting mode or a video mode, the front camera and/or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have focal length and optical zoom capabilities.
- the audio component 810 is configured to output and/or input audio signals.
- the audio component 810 includes a microphone (MIC).
- the microphone is configured to receive external audio signals.
- the received audio signal may be further stored in the memory 804 or transmitted via the communication component 816.
- the audio component 810 further includes a speaker for outputting audio signals.
- the I/O interface 812 provides an interface between the processing component 802 and a peripheral interface module.
- the peripheral interface module may be a keyboard, a click wheel, a button, and the like. These buttons may include but are not limited to: home button, volume button, start button, and lock button.
- the sensor component 814 includes one or more sensors for providing the electronic device 800 with various aspects of state evaluation.
- the sensor component 814 can detect the on/off status of the electronic device 800 and the relative positioning of the components.
- the component is the display and the keypad of the electronic device 800.
- the sensor component 814 can also detect the electronic device 800 or the electronic device 800.
- the position of the component changes, the presence or absence of contact between the user and the electronic device 800, the orientation or acceleration/deceleration of the electronic device 800, and the temperature change of the electronic device 800.
- the sensor component 814 may include a proximity sensor configured to detect the presence of nearby objects when there is no physical contact.
- the sensor component 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications.
- the sensor component 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor or a temperature sensor.
- the communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices.
- the electronic device 800 can access a wireless network based on a communication standard, such as WiFi, 2G, or 3G, or a combination thereof.
- the communication component 816 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel.
- the communication component 816 further includes a near field communication (NFC) module to facilitate short-range communication.
- the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
- RFID radio frequency identification
- IrDA infrared data association
- UWB ultra-wideband
- Bluetooth Bluetooth
- the electronic device 800 may be used by one or more application specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPD), programmable logic devices (PLD), field A programmable gate array (FPGA), controller, microcontroller, microprocessor, or other electronic components are implemented to implement the above methods.
- ASIC application specific integrated circuits
- DSP digital signal processors
- DSPD digital signal processing devices
- PLD programmable logic devices
- FPGA field A programmable gate array
- controller microcontroller, microprocessor, or other electronic components are implemented to implement the above methods.
- a non-volatile computer-readable storage medium such as a memory 804 including computer program instructions, which can be executed by the processor 820 of the electronic device 800 to complete the foregoing method.
- Fig. 8 is a block diagram showing an electronic device 900 according to an exemplary embodiment.
- the electronic device 900 may be provided as a server.
- the electronic device 900 includes a processing component 922, which further includes one or more processors, and a memory resource represented by a memory 932, for storing instructions that can be executed by the processing component 922, such as application programs.
- the application program stored in the memory 932 may include one or more modules each corresponding to a set of instructions.
- the processing component 922 is configured to execute instructions to perform the aforementioned methods.
- the electronic device 900 may also include a power supply component 926 configured to perform power management of the electronic device 900, a wired or wireless network interface 950 configured to connect the electronic device 1900 to a network, and an input output (I/O) interface 958 .
- the electronic device 900 can operate based on an operating system stored in the memory 932, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM or the like.
- a non-volatile computer-readable storage medium such as the memory 932 including computer program instructions, which can be executed by the processing component 922 of the electronic device 900 to complete the foregoing method.
- the present disclosure may be a system, method, and/or computer program product.
- the computer program product may include a computer-readable storage medium loaded with computer-readable program instructions for enabling a processor to implement various aspects of the present disclosure.
- the computer-readable storage medium may be a tangible device that can hold and store instructions used by the instruction execution device.
- the computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing.
- Computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM) Or flash memory), static random access memory (SRAM), portable compact disk read-only memory (CD-ROM), digital versatile disk (DVD), memory stick, floppy disk, mechanical encoding device, such as a printer with instructions stored thereon
- RAM random access memory
- ROM read-only memory
- EPROM erasable programmable read-only memory
- flash memory flash memory
- SRAM static random access memory
- CD-ROM compact disk read-only memory
- DVD digital versatile disk
- memory stick floppy disk
- mechanical encoding device such as a printer with instructions stored thereon
- the computer-readable storage medium used here is not interpreted as a transient signal itself, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (for example, light pulses through optical fiber cables), or through wires Transmission of electrical signals.
- the computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to various computing/processing devices, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and/or a wireless network.
- the network may include copper transmission cables, optical fiber transmission, wireless transmission, routers, firewalls, switches, gateway computers, and/or edge servers.
- the network adapter card or network interface in each computing/processing device receives computer-readable program instructions from the network, and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing/processing device .
- the computer program instructions used to perform the operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, status setting data, or in one or more programming languages.
- Source code or object code written in any combination, the programming language includes object-oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as "C" language or similar programming languages.
- Computer-readable program instructions can be executed entirely on the user's computer, partly on the user's computer, executed as a stand-alone software package, partly on the user's computer and partly executed on a remote computer, or entirely on the remote computer or server carried out.
- the remote computer can be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (for example, using an Internet service provider to access the Internet connection).
- LAN local area network
- WAN wide area network
- an electronic circuit such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), can be customized by using the status information of the computer-readable program instructions.
- the computer-readable program instructions are executed to realize various aspects of the present disclosure.
- These computer-readable program instructions can be provided to the processors of general-purpose computers, special-purpose computers, or other programmable data processing devices, thereby producing a machine that makes these instructions when executed by the processors of the computer or other programmable data processing devices , A device that implements the functions/actions specified in one or more blocks in the flowchart and/or block diagram is produced. It is also possible to store these computer-readable program instructions in a computer-readable storage medium. These instructions make computers, programmable data processing apparatuses, and/or other devices work in a specific manner, so that the computer-readable medium storing instructions includes An article of manufacture, which includes instructions for implementing various aspects of the functions/actions specified in one or more blocks in the flowchart and/or block diagram.
- each block in the flowchart or block diagram may represent a module, program segment, or part of an instruction, and the module, program segment, or part of an instruction contains one or more components for implementing the specified logical function.
- Executable instructions may also occur in a different order than the order marked in the drawings. For example, two consecutive blocks can actually be executed in parallel, or they can sometimes be executed in the reverse order, depending on the functions involved.
- each block in the block diagram and/or flowchart, and the combination of the blocks in the block diagram and/or flowchart can be implemented by a dedicated hardware-based system that performs the specified functions or actions Or it can be realized by a combination of dedicated hardware and computer instructions.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Evolutionary Computation (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Health & Medical Sciences (AREA)
- Artificial Intelligence (AREA)
- Data Mining & Analysis (AREA)
- General Health & Medical Sciences (AREA)
- Life Sciences & Earth Sciences (AREA)
- Computing Systems (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Molecular Biology (AREA)
- Biophysics (AREA)
- Computational Linguistics (AREA)
- Biomedical Technology (AREA)
- Mathematical Physics (AREA)
- Multimedia (AREA)
- Databases & Information Systems (AREA)
- Medical Informatics (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Bioinformatics & Computational Biology (AREA)
- Evolutionary Biology (AREA)
- Oral & Maxillofacial Surgery (AREA)
- Probability & Statistics with Applications (AREA)
- Human Computer Interaction (AREA)
- Image Analysis (AREA)
- Image Processing (AREA)
Abstract
Description
Claims (17)
- 一种图像处理方法,其特征在于,所述方法包括:获取从第一图像中提取的色彩特征;获取自定义的掩膜特征,所述自定义的掩膜特征用于指定所述色彩特征在所述第一图像中的区域位置;将所述色彩特征和所述自定义的掩膜特征输入特征映射网络进行图像属性的编辑,得到第二图像。
- 根据权利要求1所述的方法,其特征在于,所述特征映射网络,为训练后得到的特征映射网络;所述特征映射网络的训练过程包括:将由第一图像数据和对应第一图像数据的掩膜特征构成的数据对作为训练数据集;将所述训练数据集输入所述特征映射网络,在所述特征映射网络中将所述第一图像数据中至少一个区块的色彩特征映射到对应的掩膜特征中,输出得到第二图像数据,根据所述第二图像数据和所述第一图像数据得到损失函数,通过所述损失函数的反向传播进行生成对抗,达到特征映射网络收敛时结束所述训练过程。
- 根据权利要求2所述的方法,其特征在于,所述在所述特征映射网络中将所述第一图像数据中至少一个区块的色彩特征映射到对应的掩膜特征中,输出得到第二图像数据,包括:将所述至少一个区块的色彩特征和对应掩膜特征输入所述特征映射网络中的特征融合编码模块;通过所述特征融合编码模块将第一图像数据所提供的所述色彩特征和对应掩膜特征所提供的空间特征进行融合,得到用于表征空间和色彩特征的图像融合特征;将所述图像融合特征和所述对应掩膜特征输入图像生成模块,得到所述第二图像数据。
- 根据权利要求3所述的方法,其特征在于,所述将所述图像融合特征和所述对应掩膜特征输入图像生成模块,得到所述第二图像数据,包括:将所述图像融合特征输入所述图像生成模块,通过所述图像生成模块将所述图像融合特征变换成为对应的仿射参数,在所述仿射参数中包含第一参数和第二参数;将所述对应掩膜特征输入所述图像生成模块,得到第三参数;根据所述第一参数、所述第二参数和所述第三参数,得到所述第二图像数据。
- 根据权利要求2-4任一项所述的方法,其特征在于,所述方法还包括:将所述训练数据集中对应第一图像数据的掩膜特征输入掩膜变分编码模块进行训练,输出得到两个子掩膜变化量。
- 根据权利要求5所述的方法,其特征在于,所述将所述训练数据集中对应第一图像数据的掩膜特征输入掩膜变分编码模块进行训练,输出得到两个子掩膜变化量,包括:从所述训练数据集中得到第一掩膜特征和第二掩膜特征,所述第二掩膜特征不同于所述第一掩膜特征;通过掩膜变分编码模块进行编码处理,将所述第一掩膜特征和所述第二掩膜特征分别映射到预设特征空间中,得到第一中间变量和第二中间变量;其中,所述预设特征空间在维度上低于所述第一掩膜特征和所述第二掩膜特征;根据所述第一中间变量和所述第二中间变量,得到对应所述两个子掩膜变化量的两个第三中间变量;通过掩膜变分编码模块进行解码处理,将所述两个第三中间变量转换为所述两个子掩膜变化量。
- 根据权利要求5所述的方法,其特征在于,所述方法还包括:对人脸编辑处理进行模拟训练的过程;所述模拟训练的过程包括:将所述训练数据集中对应第一图像数据的掩膜特征输入掩膜变分编码模块,输出得到两个子掩膜变化量;将所述两个子掩膜变化量分别输入两个特征映射网络,所述两个特征映射网络共享一组分享权重并予以特征映射网络的权重更新,输出得到两个图像数据;将融合所述两个图像数据得到的图像融合数据作为所述第二图像数据,根据所述第二图像数据和第一图像数据得到损失函数,通过所述损失函数的反向传播进行生成对抗,达到网络收敛时结束所述模拟训练的过程。
- 一种图像处理装置,其特征在于,所述装置包括:第一特征获取模块,用于获取从第一图像中提取的色彩特征;第二特征获取模块,用于获取自定义的掩膜特征,所述自定义的掩膜特征用于指定所述色彩特征在所述第一图像中的区域位置;编辑模块,用于将所述色彩特征和所述自定义的掩膜特征输入特征映射网络进行图像属性的编辑,得到第二图像。
- 根据权利要求8所述的装置,其特征在于,所述特征映射网络,为训练后得到的特征映射网络;所述装置还包括:第一处理模块,用于将由第一图像数据和对应第一图像数据的掩膜特征构成的数据对作为训练数据集;第二处理模块,用于将所述训练数据集输入所述特征映射网络,在所述特征映射网络中将所述第一图像数据中至少一个区块的色彩特征映射到对应的掩膜特征中,输出得到第二图像数据,根据所述第二图像数据和所述第一图像数据得到损失函数,通过所述损失函数的反向传播进行生成对抗,达到网络收敛时结束所述特征映射网络的训练过程。
- 根据权利要求9所述的装置,其特征在于,所述第二处理模块,进一步用于:将所述至少一个区块的色彩特征和对应掩膜特征输入所述特征映射网络中的特征融合编码模块;通过所述特征融合编码模块将第一图像数据所提供的所述色彩特征和对应掩膜特征所提供的空间特征进行融合,得到用于表征空间和色彩特征的图像融合特征;将所述图像融合特征和所述对应掩膜特征输入图像生成模块,得到所述第二图像数据。
- 根据权利要求10所述的装置,其特征在于,所述第二处理模块,进一步用于:将所述图像融合特征输入图像生成模块,通过所述图像生成模块将所述图像融合特征变换成为对应的仿射参数,在所述仿射参数中包含第一参数和第二参数;将所述对应掩膜特征输入所述图像生成模块,得到第三参数;根据所述第一参数、所述第二参数和所述第三参数,得到所述第二图像数据。
- 根据权利要求9-11任一项所述的装置,其特征在于,所述装置还包括:第三处理模块,用于:将所述训练数据集中对应第一图像数据的掩膜特征输入掩膜变分编码模块进行训练,输出得到两个子掩膜变化量。
- 根据权利要求12所述的装置,其特征在于,所述第三处理模块,进一步用于:从所述训练数据集中得到第一掩膜特征和第二掩膜特征,所述第二掩膜特征不同于所述第一掩膜特征;通过掩膜变分编码模块进行编码处理,将所述第一掩膜特征和所述第二掩膜特征分别映射到预设特征空间中,得到第一中间变量和第二中间变量;其中,所述预设特征空间在维度上低于所述第一掩膜特征和所述第二掩膜特征;根据所述第一中间变量和所述第二中间变量,得到对应所述两个子掩膜变化量的两个第三中间变量;通过掩膜变分编码模块进行解码处理,将所述两个第三中间变量转换为所述两个子掩膜变化量。
- 根据权利要求12所述的装置,其特征在于,所述装置还包括:第四处理模块,用于:将所述训练数据集中对应第一图像数据的掩膜特征输入掩膜变分编码模块,输出得到两个子掩膜变化量;将所述两个子掩膜变化量分别输入两个特征映射网络,所述两个特征映射网络共享一组分享权重并予以特征映射网络的权重更新,输出得到两个图像数据;将融合所述两个图像数据得到的图像融合数据作为所述第二图像数据,根据所述第二图像数据和所述第一图像数据得到损失函数,通过所述损失函数的反向传播进行生成对抗,达到特征映射网络收敛时结束对人脸编辑处理的模拟训练过程。
- 一种电子设备,其特征在于,包括:处理器;用于存储处理器可执行指令的存储器;其中,所述处理器被配置为:执行权利要求1至7中任意一项所述的方法。
- 一种计算机可读存储介质,其上存储有计算机程序指令,其特征在于,所述计算机程序指令被处理器执行时实现权利要求1至7中任意一项所述的方法。
- 一种计算机程序,其特征在于,所述计算机程序包括计算机可读代码,当所述计算机可读代码在电子设备中运行时,所述电子设备中的处理器执行用于实现权利要求1至7中的任意一项所述的方法。
Priority Applications (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
SG11202109209TA SG11202109209TA (en) | 2019-05-24 | 2019-09-25 | Image processing method and apparatus, electronic device and storage medium |
JP2021549789A JP2022521614A (ja) | 2019-05-24 | 2019-09-25 | 画像処理方法及び装置、電子デバイス並びに記憶媒体 |
US17/445,610 US20210383154A1 (en) | 2019-05-24 | 2021-08-22 | Image processing method and apparatus, electronic device and storage medium |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910441976.5 | 2019-05-24 | ||
CN201910441976.5A CN110189249B (zh) | 2019-05-24 | 2019-05-24 | 一种图像处理方法及装置、电子设备和存储介质 |
Related Child Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US17/445,610 Continuation US20210383154A1 (en) | 2019-05-24 | 2021-08-22 | Image processing method and apparatus, electronic device and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2020237937A1 true WO2020237937A1 (zh) | 2020-12-03 |
Family
ID=67717790
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2019/107854 WO2020237937A1 (zh) | 2019-05-24 | 2019-09-25 | 一种图像处理方法及装置、电子设备和存储介质 |
Country Status (6)
Country | Link |
---|---|
US (1) | US20210383154A1 (zh) |
JP (1) | JP2022521614A (zh) |
CN (1) | CN110189249B (zh) |
SG (1) | SG11202109209TA (zh) |
TW (1) | TW202044113A (zh) |
WO (1) | WO2020237937A1 (zh) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112651915A (zh) * | 2020-12-25 | 2021-04-13 | 百果园技术(新加坡)有限公司 | 一种人脸图像合成方法、系统、电子设备及存储介质 |
CN112967213A (zh) * | 2021-02-05 | 2021-06-15 | 深圳市宏电技术股份有限公司 | 车牌图像增强方法、装置、设备及存储介质 |
JP2023523502A (ja) * | 2021-04-07 | 2023-06-06 | ベイジン バイドゥ ネットコム サイエンス テクノロジー カンパニー リミテッド | モデルトレーニング方法、歩行者再識別方法、装置および電子機器 |
Families Citing this family (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110189249B (zh) * | 2019-05-24 | 2022-02-18 | 深圳市商汤科技有限公司 | 一种图像处理方法及装置、电子设备和存储介质 |
CN111047509B (zh) * | 2019-12-17 | 2024-07-05 | 中国科学院深圳先进技术研究院 | 一种图像特效处理方法、装置及终端 |
CN111429551A (zh) * | 2020-03-20 | 2020-07-17 | 北京达佳互联信息技术有限公司 | 图像编辑方法、装置、电子设备和存储介质 |
CN111563427A (zh) * | 2020-04-23 | 2020-08-21 | 中国科学院半导体研究所 | 人脸图像属性编辑方法、装置及设备 |
US20210358164A1 (en) * | 2020-05-15 | 2021-11-18 | Nvidia Corporation | Content-aware style encoding using neural networks |
CN111652828B (zh) * | 2020-05-27 | 2023-08-08 | 北京百度网讯科技有限公司 | 人脸图像生成方法、装置、设备和介质 |
CN111833238B (zh) * | 2020-06-01 | 2023-07-25 | 北京百度网讯科技有限公司 | 图像的翻译方法和装置、图像翻译模型的训练方法和装置 |
US11330196B2 (en) * | 2020-10-12 | 2022-05-10 | Microsoft Technology Licensing, Llc | Estimating illumination in an environment based on an image of a reference object |
CN112330530B (zh) * | 2020-10-21 | 2024-04-12 | 北京市商汤科技开发有限公司 | 图像处理方法、装置、设备及存储介质 |
US11900519B2 (en) * | 2021-11-17 | 2024-02-13 | Adobe Inc. | Disentangling latent representations for image reenactment |
CN115953597B (zh) * | 2022-04-25 | 2024-04-16 | 北京字跳网络技术有限公司 | 图像处理方法、装置、设备及介质 |
CN114782708B (zh) * | 2022-05-12 | 2024-04-16 | 北京百度网讯科技有限公司 | 图像生成方法、图像生成模型的训练方法、装置和设备 |
CN115393183B (zh) * | 2022-10-28 | 2023-02-07 | 腾讯科技(深圳)有限公司 | 图像编辑方法、装置、计算机设备和存储介质 |
CN118446927A (zh) * | 2023-12-28 | 2024-08-06 | 荣耀终端有限公司 | 图像处理方法、图像处理系统训练方法及电子设备 |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108510435A (zh) * | 2018-03-28 | 2018-09-07 | 北京市商汤科技开发有限公司 | 图像处理方法及装置、电子设备和存储介质 |
US20180276488A1 (en) * | 2017-03-27 | 2018-09-27 | Samsung Electronics Co., Ltd. | Liveness test method and apparatus |
CN109559289A (zh) * | 2018-11-30 | 2019-04-02 | 维沃移动通信(深圳)有限公司 | 一种图像处理方法及移动终端 |
CN110189249A (zh) * | 2019-05-24 | 2019-08-30 | 深圳市商汤科技有限公司 | 一种图像处理方法及装置、电子设备和存储介质 |
Family Cites Families (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1738426A (zh) * | 2005-09-09 | 2006-02-22 | 南京大学 | 一种视频运动目标分割与跟踪方法 |
CN103259621A (zh) * | 2013-04-12 | 2013-08-21 | 江苏圆坤二维码研究院有限公司 | 彩色三维码的编码方法和装置以及彩色三维码的应用方法和系统 |
US9619862B2 (en) * | 2014-05-30 | 2017-04-11 | Apple Inc. | Raw camera noise reduction using alignment mapping |
CN104850825B (zh) * | 2015-04-18 | 2018-04-27 | 中国计量学院 | 一种基于卷积神经网络的人脸图像颜值计算方法 |
CN104978708B (zh) * | 2015-04-24 | 2019-11-01 | 云南大学 | 交互式绝版套色木刻数字合成方法 |
CN105701508B (zh) * | 2016-01-12 | 2017-12-15 | 西安交通大学 | 基于多级卷积神经网络的全局‑局部优化模型及显著性检测算法 |
US10319076B2 (en) * | 2016-06-16 | 2019-06-11 | Facebook, Inc. | Producing higher-quality samples of natural images |
CN106650690A (zh) * | 2016-12-30 | 2017-05-10 | 东华大学 | 基于深度卷积‑反卷积神经网络的夜视图像场景识别方法 |
US10614557B2 (en) * | 2017-10-16 | 2020-04-07 | Adobe Inc. | Digital image completion using deep learning |
CN108875766B (zh) * | 2017-11-29 | 2021-08-31 | 北京旷视科技有限公司 | 图像处理的方法、装置、系统及计算机存储介质 |
CN108319686B (zh) * | 2018-02-01 | 2021-07-30 | 北京大学深圳研究生院 | 基于受限文本空间的对抗性跨媒体检索方法 |
CN108875818B (zh) * | 2018-06-06 | 2020-08-18 | 西安交通大学 | 基于变分自编码机与对抗网络结合的零样本图像分类方法 |
CN109783657B (zh) * | 2019-01-07 | 2022-12-30 | 北京大学深圳研究生院 | 基于受限文本空间的多步自注意力跨媒体检索方法及系统 |
-
2019
- 2019-05-24 CN CN201910441976.5A patent/CN110189249B/zh active Active
- 2019-09-25 SG SG11202109209TA patent/SG11202109209TA/en unknown
- 2019-09-25 JP JP2021549789A patent/JP2022521614A/ja active Pending
- 2019-09-25 WO PCT/CN2019/107854 patent/WO2020237937A1/zh active Application Filing
- 2019-10-22 TW TW108138074A patent/TW202044113A/zh unknown
-
2021
- 2021-08-22 US US17/445,610 patent/US20210383154A1/en not_active Abandoned
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20180276488A1 (en) * | 2017-03-27 | 2018-09-27 | Samsung Electronics Co., Ltd. | Liveness test method and apparatus |
CN108510435A (zh) * | 2018-03-28 | 2018-09-07 | 北京市商汤科技开发有限公司 | 图像处理方法及装置、电子设备和存储介质 |
CN109559289A (zh) * | 2018-11-30 | 2019-04-02 | 维沃移动通信(深圳)有限公司 | 一种图像处理方法及移动终端 |
CN110189249A (zh) * | 2019-05-24 | 2019-08-30 | 深圳市商汤科技有限公司 | 一种图像处理方法及装置、电子设备和存储介质 |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112651915A (zh) * | 2020-12-25 | 2021-04-13 | 百果园技术(新加坡)有限公司 | 一种人脸图像合成方法、系统、电子设备及存储介质 |
CN112651915B (zh) * | 2020-12-25 | 2023-08-29 | 百果园技术(新加坡)有限公司 | 一种人脸图像合成方法、系统、电子设备及存储介质 |
CN112967213A (zh) * | 2021-02-05 | 2021-06-15 | 深圳市宏电技术股份有限公司 | 车牌图像增强方法、装置、设备及存储介质 |
JP2023523502A (ja) * | 2021-04-07 | 2023-06-06 | ベイジン バイドゥ ネットコム サイエンス テクノロジー カンパニー リミテッド | モデルトレーニング方法、歩行者再識別方法、装置および電子機器 |
JP7403673B2 (ja) | 2021-04-07 | 2023-12-22 | ベイジン バイドゥ ネットコム サイエンス テクノロジー カンパニー リミテッド | モデルトレーニング方法、歩行者再識別方法、装置および電子機器 |
Also Published As
Publication number | Publication date |
---|---|
JP2022521614A (ja) | 2022-04-11 |
SG11202109209TA (en) | 2021-09-29 |
TW202044113A (zh) | 2020-12-01 |
CN110189249B (zh) | 2022-02-18 |
US20210383154A1 (en) | 2021-12-09 |
CN110189249A (zh) | 2019-08-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2020237937A1 (zh) | 一种图像处理方法及装置、电子设备和存储介质 | |
TWI781359B (zh) | 人臉和人手關聯檢測方法及裝置、電子設備和電腦可讀儲存媒體 | |
WO2020192252A1 (zh) | 图像生成方法及装置、电子设备和存储介质 | |
US10152207B2 (en) | Method and device for changing emoticons in a chat interface | |
CN107944447B (zh) | 图像分类方法及装置 | |
TW202042175A (zh) | 圖像處理方法及裝置、電子設備和電腦可讀儲存媒體 | |
CN110909815B (zh) | 神经网络训练、图像处理方法、装置及电子设备 | |
TWI718631B (zh) | 人臉圖像的處理方法及裝置、電子設備和儲存介質 | |
CN109257645A (zh) | 视频封面生成方法及装置 | |
WO2021120690A1 (zh) | 语音识别方法、装置和介质 | |
JP7568201B2 (ja) | 仮想対象のアクション処理方法およびその装置、コンピュータプログラム | |
TWI735112B (zh) | 圖像生成方法、電子設備和儲存介質 | |
WO2019205605A1 (zh) | 人脸特征点的定位方法及装置 | |
CN110659690B (zh) | 神经网络的构建方法及装置、电子设备和存储介质 | |
WO2020155713A1 (zh) | 图像处理方法及装置、网络训练方法及装置 | |
CN115273831A (zh) | 语音转换模型训练方法、语音转换方法和装置 | |
CN110135349A (zh) | 识别方法、装置、设备及存储介质 | |
US20180173394A1 (en) | Method and apparatus for inputting expression information | |
WO2020173284A1 (zh) | 互动内容展示方法、装置、电子设备及存储介质 | |
CN112184876B (zh) | 图像处理方法、装置、电子设备和存储介质 | |
CN107239758B (zh) | 人脸关键点定位的方法及装置 | |
CN113420553A (zh) | 文本生成方法、装置、存储介质及电子设备 | |
CN117351123A (zh) | 交互式数字人像生成方法、装置、设备及存储介质 | |
CN112613447A (zh) | 关键点检测方法及装置、电子设备和存储介质 | |
CN111178086B (zh) | 数据处理方法、装置和介质 |
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: 19931268 Country of ref document: EP Kind code of ref document: A1 |
|
ENP | Entry into the national phase |
Ref document number: 2021549789 Country of ref document: JP Kind code of ref document: A |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 19931268 Country of ref document: EP Kind code of ref document: A1 |
|
32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 22.03.2022) |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 19931268 Country of ref document: EP Kind code of ref document: A1 |