WO2020237937A1 - 一种图像处理方法及装置、电子设备和存储介质 - Google Patents

一种图像处理方法及装置、电子设备和存储介质 Download PDF

Info

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
Application number
PCT/CN2019/107854
Other languages
English (en)
French (fr)
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 深圳市商汤科技有限公司
Priority to SG11202109209TA priority Critical patent/SG11202109209TA/en
Priority to JP2021549789A priority patent/JP2022521614A/ja
Publication of WO2020237937A1 publication Critical patent/WO2020237937A1/zh
Priority to US17/445,610 priority patent/US20210383154A1/en

Links

Images

Classifications

    • 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
    • G06T7/00Image analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/25Fusion techniques
    • G06F18/251Fusion techniques of input or preprocessed data
    • 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/047Probabilistic or stochastic 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
    • G06N3/084Backpropagation, e.g. using gradient descent
    • 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/088Non-supervised learning, e.g. competitive learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
    • 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/168Feature extraction; Face representation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10024Color image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20076Probabilistic image processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20212Image combination
    • G06T2207/20221Image fusion; Image merging
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30196Human being; Person
    • G06T2207/30201Face

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

一种图像处理方法及装置、电子设备和存储介质
本申请要求在2019年5月24日提交中国专利局、申请号为201910441976.5、发明名称为“一种图像处理方法及装置、电子设备和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本公开涉及图像编辑领域,尤其涉及一种图像处理方法及装置、电子设备和存储介质。
背景技术
在图像处理中,对人脸属性的建模和修改在计算机视觉中一直是一个长期被关注的问题。一方面,人脸属性是用户日常生活中占主导的一个视觉属性,另一方面操控人脸属性在很多领域中都有很重要的应用,比如自动化人脸编辑。然而,对人脸属性的编辑,不支持更多的属性变化及支持用户互动式的属性自定义,导致对人脸样貌的编辑自由度低,对人脸样貌的改变是有限范围内的,不符合人脸样貌更多变化和更多自由度的编辑需求。
发明内容
本公开提出了一种图像处理技术方案。
根据本公开的一方面,提供了一种图像处理方法,所述方法包括:
获取从第一图像中提取的色彩特征;
获取自定义的掩膜特征,所述自定义的掩膜特征用于指定所述色彩特征在所述第一图像中的区域位置;
将所述色彩特征和所述自定义的掩膜特征输入特征映射网络进行图像属性的编辑,得到第二图像。
采用本公开,通过将色彩特征、和指定色彩特征在第一图像中区域位置的掩膜特征(自定义的掩膜特征)经特征映射网络进行图像属性的编辑,可以支持更多的属性变化及支持用户互动式的属性自定义,使编辑所得到的第二图像符合人脸样貌更多变化和更多自由度的编辑需求。
可能的实现方式中,所述特征映射网络,为训练后得到的特征映射网络;
所述特征映射网络的训练过程包括:
将由第一图像数据和对应第一图像数据的掩膜特征构成的数据对作为训练数据集;
将所述训练数据集输入所述特征映射网络,在所述特征映射网络中将所述第一图像数据中至少一个区块的色彩特征映射到对应的掩膜特征中,输出得到第二图像数据,根据所述第二图像数据和所述第一图像数据得到损失函数,通过所述损失函数的反向传播进行生成对抗,达到特征映射网络收敛时 结束所述训练过程。
采用本公开,通过输入由第一图像数据和对应第一图像数据的掩膜特征构成的数据对,对特征映射网络进行训练,根据训练后得到的特征映射网络进行图像属性的编辑,可以支持更多的属性变化及支持用户互动式的属性自定义,使编辑所得到的第二图像符合人脸样貌更多变化和更多自由度的编辑需求。
可能的实现方式中,所述在所述特征映射网络中将所述第一图像数据中至少一个区块的色彩特征映射到对应的掩膜特征中,输出得到第二图像数据,包括:
将所述至少一个区块的色彩特征和对应掩膜特征输入所述特征映射网络中的特征融合编码模块;
通过所述特征融合编码模块将第一图像数据所提供的所述色彩特征和对应掩膜特征所提供的空间特征进行融合,得到用于表征空间和色彩特征的图像融合特征;
将所述图像融合特征和所述对应掩膜特征输入图像生成模块,得到所述第二图像数据。
采用本公开,通过输入第一图像数据所提供的色彩特征和对应掩膜特征至特征融合编码模块中,可以得到用于表征空间和色彩特征的图像融合特征,由于图像融合特征兼具空间感知和色彩特征,因此,根据该图像融合特征和对应掩膜特征以及图像生成模块,所得到的第二图像能符合人脸样貌更多变化和更多自由度的编辑需求。
可能的实现方式中,所述将所述图像融合特征和所述对应掩膜特征输入图像生成模块,得到所述第二图像数据,包括:
将所述图像融合特征输入所述图像生成模块,通过所述图像生成模块将所述图像融合特征变换成为对应的仿射参数,在所述仿射参数中包含第一参数和第二参数;
将所述对应掩膜特征输入所述图像生成模块,得到第三参数;
根据所述第一参数、所述第二参数和所述第三参数,得到所述第二图像数据。
采用本公开,根据图像融合特征得到对应的仿射参数(第一参数和第二参数),再结合根据对应掩膜特征得到的第三参数,可以得到第二图像数据,由于考虑到图像融合特征且进一步结合对应掩膜特征进行训练,所得到的第二图像可以支持更多人脸样貌更多变化。
可能的实现方式中,所述方法还包括:
将所述训练数据集中对应第一图像数据的掩膜特征输入掩膜变分编码模块进行训练,输出得到两个子掩膜变化量。
采用本公开,通过掩膜变分编码模块可以得到子掩膜变化量,则基于该子掩膜变化量进行学习,可以更好的对人脸编辑处理进行模拟训练。
可能的实现方式中,所述将所述训练数据集中对应第一图像数据的掩膜特征输入掩膜变分编码模块进行训练,输出得到两个子掩膜变化量,包括:
从所述训练数据集中得到第一掩膜特征和第二掩膜特征,所述第二掩膜特征不同于所述第一掩膜 特征;
通过掩膜变分编码模块进行编码处理,将所述第一掩膜特征和所述第二掩膜特征分别映射到预设特征空间中,得到第一中间变量和第二中间变量;其中,所述预设特征空间在维度上低于所述第一掩膜特征和所述第二掩膜特征;
根据所述第一中间变量和所述第二中间变量,得到对应所述两个子掩膜变化量的两个第三中间变量;
通过掩膜变分编码模块进行解码处理,将所述两个第三中间变量转换为所述两个子掩膜变化量。
采用本公开,可以通过掩膜变分编码模块的编码处理和解码处理,得到该两个子掩膜变化量,以便利用该两个子掩膜变化量可以更好的对人脸编辑处理进行模拟训练。
可能的实现方式中,所述方法还包括:对人脸编辑处理进行模拟训练的过程;
所述模拟训练的过程包括:
将所述训练数据集中对应第一图像数据的掩膜特征输入掩膜变分编码模块,输出得到两个子掩膜变化量;
将所述两个子掩膜变化量分别输入两个特征映射网络,所述两个特征映射网络共享一组分享权重并予以特征映射网络的权重更新,输出得到两个图像数据;
将融合所述两个图像数据得到的图像融合数据作为所述第二图像数据,根据所述第二图像数据和第一图像数据得到损失函数,通过所述损失函数的反向传播进行生成对抗,达到网络收敛时结束所述模拟训练的过程。
采用本公开,在人脸编辑处理进行模拟训练过程中,将得到的两个子掩膜变化量分别输入共享一组分享权重的特征映射网络,可以得到所生成的第二图像数据,将该第二图像数据与第一图像数据(现实世界的真实图像数据)做损失,可以将人脸编辑处理的精确度提高到接近真实图像数据,从而便于通过自定义掩膜特征所生成的第二图像数据更能符合人脸样貌更多变化和更多自由度的编辑需求。
根据本公开的一方面,提供了一种图像处理装置,所述装置包括:
第一特征获取模块,用于获取从第一图像中提取的色彩特征;
第二特征获取模块,用于获取自定义的掩膜特征,所述自定义的掩膜特征用于指定所述色彩特征在所述第一图像中的区域位置;
编辑模块,用于将所述色彩特征和所述自定义的掩膜特征输入特征映射网络进行图像属性的编辑,得到第二图像。
可能的实现方式中,所述特征映射网络,为训练后得到的特征映射网络;
所述装置还包括:
第一处理模块,用于将由第一图像数据和对应第一图像数据的掩膜特征构成的数据对作为训练数据集;
第二处理模块,用于将所述训练数据集输入所述特征映射网络,在所述特征映射网络中将所述第一图像数据中至少一个区块的色彩特征映射到对应的掩膜特征中,输出得到第二图像数据,根据所述第二图像数据和所述第一图像数据得到损失函数,通过所述损失函数的反向传播进行生成对抗,达到网络收敛时结束所述特征映射网络的训练过程。
可能的实现方式中,所述第二处理模块,进一步用于:
将所述至少一个区块的色彩特征和对应掩膜特征输入所述特征映射网络中的特征融合编码模块;
通过所述特征融合编码模块将第一图像数据所提供的所述色彩特征和对应掩膜特征所提供的空间特征进行融合,得到用于表征空间和色彩特征的图像融合特征;
将所述图像融合特征和所述对应掩膜特征输入图像生成模块,得到所述第二图像数据。
可能的实现方式中,所述第二处理模块,进一步用于:
将所述图像融合特征输入图像生成模块,通过所述图像生成模块将所述图像融合特征变换成为对应的仿射参数,在所述仿射参数中包含第一参数和第二参数;
将所述对应掩膜特征输入所述图像生成模块,得到第三参数;
根据所述第一参数、所述第二参数和所述第三参数,得到所述第二图像数据。
可能的实现方式中,所述装置还包括:第三处理模块,用于:
将所述训练数据集中对应第一图像数据的掩膜特征输入掩膜变分编码模块进行训练,输出得到两个子掩膜变化量。
可能的实现方式中,所述第三处理模块,进一步用于:
从所述训练数据集中得到第一掩膜特征和第二掩膜特征,所述第二掩膜特征不同于所述第一掩膜特征;
通过掩膜变分编码模块进行编码处理,将所述第一掩膜特征和所述第二掩膜特征分别映射到预设特征空间中,得到第一中间变量和第二中间变量;其中,所述预设特征空间在维度上低于所述第一掩膜特征和所述第二掩膜特征;
根据所述第一中间变量和所述第二中间变量,得到对应所述两个子掩膜变化量的两个第三中间变量;
通过掩膜变分编码模块进行解码处理,将所述两个第三中间变量转换为所述两个子掩膜变化量。
可能的实现方式中,所述装置还包括:第四处理模块,用于:
将所述训练数据集中对应第一图像数据的掩膜特征输入掩膜变分编码模块,输出得到两个子掩膜变化量;
将所述两个子掩膜变化量分别输入两个特征映射网络,所述两个特征映射网络共享一组分享权重并予以特征映射网络的权重更新,输出得到两个图像数据;
将融合所述两个图像数据得到的图像融合数据作为所述第二图像数据,根据所述第二图像数据和 所述第一图像数据得到损失函数,通过所述损失函数的反向传播进行生成对抗,达到特征映射网络收敛时结束对人脸编辑处理的模拟训练过程。
根据本公开的一方面,提供了一种电子设备,包括:
处理器;
用于存储处理器可执行指令的存储器;
其中,所述处理器被配置为:执行上述图像处理方法。
根据本公开的一方面,提供了一种计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现上述图像处理方法。
在本公开中,获取从第一图像中提取的色彩特征;获取自定义的掩膜特征,所述自定义的掩膜特征用于指定所述色彩特征在所述第一图像中的区域位置;将所述色彩特征和所述自定义的掩膜特征输入特征映射网络进行图像属性的编辑,得到第二图像。采用本公开,可以通过自定义的掩膜特征指定色彩特征在第一图像中的区域位置,由于支持更多的属性变化及支持用户互动式的掩膜属性自定义,因此,通过特征映射网络进行图像属性的编辑,所得到的第二图像,符合人脸样貌更多变化和更多自由度的编辑需求。
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,而非限制本公开。
根据下面参考附图对示例性实施例的详细说明,本公开的其它特征及方面将变得清楚。
附图说明
此处的附图被并入说明书中并构成本说明书的一部分,这些附图示出了符合本公开的实施例,并与说明书一起用于说明本公开的技术方案。
图1示出根据本公开实施例的图像处理方法的流程图。
图2示出根据本公开实施例的图像处理方法的流程图。
图3示出根据本公开实施例的第一训练过程的示意图。
图4示出根据本公开实施例的密集映射网络的组成示意图。
图5示出根据本公开实施例的第二训练过程的示意图。
图6示出根据本公开实施例的图像处理装置的框图。
图7示出根据本公开实施例的电子设备的框图。
图8示出根据本公开实施例的电子设备的框图。
具体实施方式
以下将参考附图详细说明本公开的各种示例性实施例、特征和方面。附图中相同的附图标记表示功能相同或相似的元件。尽管在附图中示出了实施例的各种方面,但是除非特别指出,不必按比例绘 制附图。
在这里专用的词“示例性”意为“用作例子、实施例或说明性”。这里作为“示例性”所说明的任何实施例不必解释为优于或好于其它实施例。
本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中术语“至少一种”表示多种中的任意一种或多种中的至少两种的任意组合,例如,包括A、B、C中的至少一种,可以表示包括从A、B和C构成的集合中选择的任意一个或多个元素。
另外,为了更好的说明本公开,在下文的具体实施方式中给出了众多的具体细节。本领域技术人员应当理解,没有某些具体细节,本公开同样可以实施。在一些实例中,对于本领域技术人员熟知的方法、手段、元件和电路未作详细描述,以便于凸显本公开的主旨。
对人脸属性的建模和修改一直在计算机视觉中是一个长期被关注的问题。一方面,人脸属性是我们日常生活中占主导的一个视觉属性,另一方面操控人脸属性在很多领域中都有很重要的应用,比如自动化人脸编辑。然而大多数人脸属性编辑工作,主要关注于语义级别的人脸属性编辑,如对于头发或肤色这种编辑,且语义级别的属性编辑仅有很小的自由度,无法进行多变化与互动式的人脸编辑。本公开是一种可以基于人脸属性之几何方位进行互动式编辑人脸的技术方案。所谓几何方位,简单来说,是指:对于图像中某区域位置的调整,比如,图像中的人脸是不笑的,通过对其区域位置的调整,可以得到一张人脸是笑着的图像,这就是一种对区域位置的调整。
图1示出根据本公开实施例的图像处理方法的流程图,该图像处理方法应用于图像处理装置,例如,图像处理装置可以由终端设备或服务器或其它处理设备执行,其中,终端设备可以为用户设备(UE,User Equipment)、移动设备、蜂窝电话、无绳电话、个人数字处理(PDA,Personal Digital Assistant)、手持设备、计算设备、车载设备、可穿戴设备等。在一些可能的实现方式中,该图像处理方法可以通过处理器调用存储器中存储的计算机可读指令的方式来实现。如图1所示,该流程包括:
步骤S101、获取从第一图像中提取的色彩特征。
人脸的属性编辑中,可以包括语义级别的属性编辑,及几何方位级别的属性编辑。其中,对于语义级别的属性编辑举例来说,如头发的颜色,皮肤颜色,化妆的妆容等等。对于几何方位级别的属性编辑举例来说,如自定义的轮廓(shape)。如头发的位置,表情是笑还是不笑。如图4中的掩膜特征M src
步骤S102、获取自定义的掩膜特征,所述自定义的掩膜特征(如图4中的掩膜特征M src)用于指定所述色彩特征在所述第一图像中的区域位置。
步骤S103、将所述色彩特征和所述自定义的掩膜特征输入特征映射网络(如密集映射网络)进行图像属性的编辑,得到第二图像。
本公开中,色彩特征表示图像的语义属性。语义属性是表示图像属性的具体内容,如头发的颜色, 皮肤颜色,化妆的妆容等等。掩膜特征用于标识色彩特征在图像中指定的区域位置或称为区域轮廓(Shape)。掩膜特征可以采用数据集中已有的特征,也可以基于数据集中已有的特征进行自定义编辑,称之为“自定义的掩膜特征”,即可以根据用户的配置指定色彩特征在图像中的区域位置。掩膜特征表示图像的几何属性。几何属性是表示图像属性的位置,如头发在人脸图像的位置,表情在人脸图像中是笑还是不笑等等。如本公开图4中的掩膜特征M src即为该自定义的掩膜特征。特征映射网络用于将目标图像(第一图像)的色彩特征和自定义的掩膜特征(在图像属性编辑中增加了几何属性,即为了改变第一图像的区域形状和/或位置到第二图像中进行自定义的编辑,如第一图像的表情为笑,改变后在第二图像的表情为不笑等)形成密集映射,从而得到用户想要的任意自定义的人脸图像。特征映射网络可以为:对密集映射网络训练后得到的训练后密集映射网络。采用本公开,对人脸属性的编辑,由于对于掩膜特征可以根据用户的配置自定义编辑,增加了人脸编辑更多属性变化、及支持用户以互动的方式进行属性自定义处理,而不仅仅限于采用已有的属性,因此,提高了人脸样貌的编辑自由度,基于该自定义的掩膜,得到所需要的目标图像。对人脸样貌的改变具有普适性,适用范围更加广泛,符合人脸样貌更多变化和更多自由度的编辑需求。
图2示出根据本公开实施例的图像处理方法的流程图,如图2所示,包括:
步骤S201、将特征映射网络根据输入的数据对(第一图像数据和对应第一图像数据的掩膜特征)进行训练,得到训练后的特征映射网络。
对所述特征映射网络的训练过程包括:将由第一图像数据和对应第一图像数据的掩膜特征构成的数据对作为训练数据集;将所述训练数据集输入所述特征映射网络,在所述特征映射网络中将所述第一图像数据中至少一个区块的色彩特征映射到对应的掩膜特征中,输出得到第二图像数据,根据所述第二图像数据和第一图像数据(即有别于所生成的第二图像数据,是现实世界中的真实图像数据)得到损失函数,通过所述损失函数的反向传播进行生成对抗,达到网络收敛时结束所述训练过程。
图3示出根据本公开实施例的第一训练过程的示意图,如图3所示,在训练的Stage I阶段(密集映射网络的训练):输入数据对到特征映射网络(如密集映射网络)11中,数据对为多个,多个数据对构成用于训练该特征映射网络(如密集映射网络)的训练数据集。文中为了简化描述,不强调“多个”。数据对由第一图像数据(如I t)和对应第一图像数据的掩膜特征(M t)构成。例如,将训练数据集输入密集映射网络,在密集映射网络中将第一图像数据中至少一个区块的色彩特征映射到对应的掩膜特征中,输出得到第二图像数据(如I out),将生成的第二图像数据输入判别器12进行生成对抗,即根据第二图像数据和第一图像数据得到损失函数,通过损失函数的反向传播进行生成对抗,达到网络收敛时,结束对密集映射网络的训练过程。
步骤S202、获取从第一图像中提取的色彩特征。
人脸的属性编辑中,可以包括语义级别的属性编辑,及几何方位级别的属性编辑。其中,对于语义级别的属性编辑举例来说,如头发的颜色,皮肤颜色,化妆的妆容等等。对于几何方位级别的属性 编辑举例来说,如自定义的轮廓(shape)。如头发的位置,表情是笑还是不笑。如图4中的掩膜特征M src
步骤S203、获取自定义的掩膜特征,所述自定义的掩膜特征(如图4中的掩膜特征M src)用于指定所述色彩特征在所述第一图像中的区域位置。
步骤S204、将所述色彩特征和所述自定义的掩膜特征输入训练后的特征映射网络(如训练后的密集映射网络)进行图像属性的编辑,得到第二图像。
采用本公开,通过密集映射网络,透过训练学习将目标图像的区块色彩样式投射到对应的掩膜中。该密集映射网络为用户提供了一个编辑平台,让用户可以透过编辑掩膜来改变人脸样貌,具有更大的编辑自由度且可进行多变化与互动式的人脸编辑。用于训练学习的训练数据集,是大规模的人脸掩膜数据集,比以往数据集有着更多的类别和更大的数量级,该数据集中标注像素等级为512x512共30000组,总共有19种类别,包含所有的人脸部件以及配件。
本公开可能的实现方式中,在特征映射网络中将第一图像数据中至少一个区块的色彩特征映射到对应的掩膜特征中,输出得到第二图像数据,包括:将至少一个区块的色彩特征和对应掩膜特征输入特征映射网络中的特征融合编码模块。通过所述特征融合编码模块将第一图像数据所提供的所述色彩特征和对应掩膜特征所提供的空间特征进行融合,得到用于表征空间和色彩特征的图像融合特征,将该图像融合特征和该对应掩膜特征输入图像生成模块,得到第二图像数据。其中,所述表征空间和色彩特征的图像融合特征,是通过将图像提供的色彩特征以及掩膜特征提供的空间特征做融合,以产生兼具空间和色彩特征的该图像融合特征。一个例子中,掩膜特征可以用于指示出图像中某个色彩所在的具体区域位置,比如,头发的色彩特征是金色的,那么,通过掩膜特征可以知道这个金色位于图像中的哪个区域位置,然后将该色彩特征(金色)与对应的区域位置融合,从而得到了图像中该区域中所填充金色的头发。
本公开可能的实现方式中,将所述图像融合特征和所述对应掩膜特征输入图像生成模块,得到所述第二图像数据,包括:将该图像融合特征输入图像生成模块,通过图像生成模块将该图像融合特征变换成为对应的仿射参数,在仿射参数中包含第一参数(如图4中X i)和第二参数(图4中Y i)。将对应掩膜特征输入所述图像生成模块,得到第三参数(如图4中Z i)。根据第一参数、第二参数和第三参数,得到所述第二图像数据。
一个示例中,特征映射网络为密集映射网络,特征融合编码模块为空间感知色彩样式编码器,图像生成模块为影像生成主干。图4示出根据本公开实施例的密集映射网络的组成示意图,如图4所示,该网络包括两个子器件:空间感知色彩样式编码器111和影像生成主干112,在空间感知色彩样式编码器111还包括:空间特征转换的层1111。其中,空间感知色彩样式编码器111用于将表征图像空间特征的掩膜特征与色彩特征相融合。换言之,空间感知色彩样式编码器111利用空间特征转换的层1111将图像提供之色彩特征以及掩膜特征提供之空间特征做融合,以产生图像融合特征。具体的,掩膜特征 用于指示出图像中某个色彩所在的具体区域位置,比如,头发是金色的,那么,通过掩膜特征可以知道这个金色位于图像中的哪个区域位置后,然后将该色彩特征(金色)与对应的区域位置融合,从而得到了图像中金色的头发。影像生成主干112用于将掩膜特征与仿射参数结合,作为输入的参数后,得到对应生成的人脸图像I out。换言之,影像生成主干112使用可适应之实列归一化让该图像融合特征变换成为其仿射参数(X i,Y i),使得输入的掩膜特征得以接收色彩特征以生成对应的人脸影像,最终目标照片的色彩特征和输入掩膜可形成密集映射。
其中,图4中的参数“AdaIN Parameters”是经过训练数据集输入密集映射网络所得到的参数,如输入I t和M t后,经空间特征转换的层1111得到的参数。AdaIN Parameters可以为(X i,Y i,Z i),其中,Xi,Yi为仿射参数,而Z i是输入的掩膜特征M t经过影像生成主干112产生的特征,如图4中箭头对应的四个方块所示。最终,根据上述输入I t和M t输入,经空间特征转换的层1111得到的仿射参数Xi,Yi,及输入的掩膜特征M t产生的特征Z i,得到最终的输出目标图像I out。在生成对抗模型中,将通过生成器生成的I out与真实的图像在判别器进行判别,概率为1为真,说明判别器已经区分不出生成图像和真实图像了。而概率为0,则说明判别器可以区分生成图像还不是真实图像,也就是说,需要继续训练。
本公开可能的实现方式中,所述方法还包括:将所述训练数据集中对应第一图像数据的掩膜特征输入掩膜变分编码模块进行训练,输出得到两个子掩膜变化量。
本公开可能的实现方式中,所述将所述训练数据集中对应第一图像数据的掩膜特征输入掩膜变分编码模块进行训练,输出得到两个子掩膜变化量,包括:从所述训练数据集中得到第一掩膜特征和第二掩膜特征,所述第二掩膜特征不同于所述第一掩膜特征。通过掩膜变分编码模块进行编码处理,将所述第一掩膜特征和所述第二掩膜特征分别映射到预设特征空间中,得到第一中间变量和第二中间变量;其中,所述预设特征空间在维度上低于所述第一掩膜特征和所述第二掩膜特征。根据所述第一中间变量和所述第二中间变量,得到对应所述两个子掩膜变化量的两个第三中间变量。通过掩膜变分编码模块进行解码处理,将所述两个第三中间变量转换为所述两个子掩膜变化量。
一个示例中,掩膜变分编码模块的硬件实现可以为掩膜变分自动编码器10,将训练数据集中对应第一图像数据的掩膜特征M t输入掩膜变分自动编码器10进行训练,输出得到两个子掩膜变化量M inter和M outer。其中,掩膜变分自动编码器,包括编码器和解码器两个子器件。从训练数据集中得到第一掩膜特征M t和第二掩膜特征M ref,M ref和M t都是从训练数据集中提取的掩膜特征且二者不相同。通过掩膜变分自动编码器10的编码器进行编码处理,将第一掩膜特征和所述第二掩膜特征分别映射到预设特征空间中,得到第一中间变量Z t和第二中间变量Z ref;其中,所述预设特征空间在维度上低于所述第一掩膜特征和所述第二掩膜特征。根据所述第一中间变量和所述第二中间变量,得到对应所述两个子掩膜变化量的两个第三中间变量,即Z inter和Z outer。通过掩膜变分自动编码器的编码器10的解码器进行解码处理,将两个第三中间变量转换为所述两个子掩膜变化量,即M inter 和M outer。利用掩膜变分自动编码器10执行的上述处理过程对应如下公式(1)—公式(6)所示。
一、初始化阶段:训练密集映射网络G A,训练掩膜变分自动编码器中的编码器Enc VAE和解码器Dec VAE
二、输入参数为:图像I t,第一掩膜特征M t,第二掩膜特征M ref
三、利用掩膜变分自动编码器10执行的具体处理过程,以得到两个子掩膜变化量,即M inter和M outer
Figure PCTCN2019107854-appb-000001
z t=Enc VAE(M t)   (2)
z ref=Enc VAE(M ref)  (3)
Figure PCTCN2019107854-appb-000002
M inter=Dec VAE(z inter)  (5)
M outer=Dec VAE(z outer)  (6)
上述公式中,
Figure PCTCN2019107854-appb-000003
为从训练数据集中选取M t和I t所构成的数据对;M t为第一掩膜特征,M ref为第二掩膜特征,M ref和M t都是从训练数据集中提取的掩膜特征且二者不相同;Z t为第一中间变量,Z ref为第二中间变量,是将M t和M ref分别映射到预设特征空间中所得到的两个中间变量,以根据Z t和Z ref得到两个第三中间变量Z inter和Z outer,通过Z inter和Z outer可以得到两个子掩膜变化量M inter和M outer
四、输出参数为:根据输入的参数所对应生成的人脸图像I inter和I outer,及根据阿尔法融合器13将该人脸图像融合得到的融合图像I blend。之后,将融合图像与判别器12进行生成对抗,继续根据上述内容二中的处理上述第一训练过程和第二训练过程,以分别更新G A(I t,M t)和G B(I t,M t,M inter,M outer)。
本公开可能的实现方式中,所述方法还包括:对人脸编辑处理进行模拟训练的过程。模拟训练的过程包括:将所述训练数据集中对应第一图像数据的掩膜特征输入掩膜变分编码模块,输出得到两个子掩膜变化量;将所述两个子掩膜变化量分别输入两个特征映射网络,所述两个特征映射网络共享一组分享权重并予以特征映射网络的权重更新,输出得到两个图像数据;将融合(如阿法融合器)所述两个图像数据得到的图像融合数据作为所述第二图像数据,根据所述第二图像数据和第一图像数据得到损失函数,通过所述损失函数的反向传播进行生成对抗,达到网络收敛时结束所述模拟训练的过程。
一个示例中,完整的训练分为两个阶段,首先必须先训练好密集映射网络与掩膜变分自动编码器,第一阶段更新一次密集映射网络。第二阶段利用掩膜变分自动编码器产生两个掩膜变化后,更新两个 分享权重到密集映射网络和阿法融合器。
图5示出根据本公开实施例的第二训练阶段的示意图。如图5所示,在训练的Stage II阶段(使用者编辑模拟训练)中,为了提升密集映射网络对人脸编辑造成掩膜变化的鲁棒性。所采用的该训练方法需要三种模块:掩膜变分自动编码器,密集映射网络和阿法融合器。掩膜变分自动编码器负责模拟使用者编辑过后的掩膜。密集映射网络负责将掩膜转换为人脸,以及将目标人脸的色彩样式投射到该掩膜。阿法融合器负责将掩膜变分自动编码器生成的两组模拟编辑掩膜经密集映射网络生成之人脸进行阿法融合。
在第一训练阶段先训练好密集映射网络与掩膜变分自动编码器,之后使用该密集映射网络与掩膜变分自动编码器。利用掩膜变分自动编码器,即采用上述公式(1)—公式(6),透过在隐空间进行线性差补以产生两个模拟的掩膜变化(如上述本公开中称之为子掩膜变化量)。可以更新一次密集映射网络,然后在本第二阶段利用一开始产生的两个掩膜变化,分别过两个分享权重的密集映射网络生成两个人脸后,再用阿法融合器进行融合,利用融合过的结果和目标影像进行损失计算与更新网络。如此轮流迭代两个阶段直到模型(如密集映射网络与掩膜变分自动编码器)收敛为止。模型在测试时,即使做了大幅度掩膜编修,仍能提升脸部属性的维持(譬如妆容,性别,胡子等)
本领域技术人员可以理解,在具体实施方式的上述方法中,各步骤的撰写顺序并不意味着严格的执行顺序而对实施过程构成任何限定,各步骤的具体执行顺序应当以其功能和可能的内在逻辑确定。
本公开提及的上述各个方法实施例,在不违背原理逻辑的情况下,均可以彼此相互结合形成结合后的实施例,限于篇幅,本公开不再赘述。
此外,本公开还提供了图像处理装置、电子设备、计算机可读存储介质、程序,上述均可用来实现本公开提供的任一种图像分割方法,相应技术方案和描述和参见方法部分的相应记载,不再赘述。
图6示出根据本公开实施例的图像处理装置的框图,如图6所示,本公开实施例的图像处理装置,包括:第一特征获取模块31,用于获取从第一图像中提取的色彩特征;第二特征获取模块32,用于获取自定义的掩膜特征,所述自定义的掩膜特征用于指定所述色彩特征在所述第一图像中的区域位置;编辑模块33,用于将所述色彩特征和所述自定义的掩膜特征输入特征映射网络进行图像属性的编辑,得到第二图像。
本公开可能的实现方式中,所述特征映射网络,为训练后得到的特征映射网络。所述装置还包括:第一处理模块,用于将由第一图像数据和对应第一图像数据的掩膜特征构成的数据对作为训练数据集;第二处理模块,用于将所述训练数据集输入所述特征映射网络,在所述特征映射网络中将所述第一图像数据中至少一个区块的色彩特征映射到对应的掩膜特征中,输出得到第二图像数据,根据所述第二图像数据和第一图像数据得到损失函数,通过所述损失函数的反向传播进行生成对抗,达到网络收敛时结束所述特征映射网络的训练过程。
本公开可能的实现方式中,所述第二处理模块,进一步用于:将所述至少一个区块的色彩 特征和对应掩膜特征输入所述特征映射网络中的特征融合编码模块;通过所述特征融合编码模块将第一图像数据所提供的所述色彩特征和对应掩膜特征所提供的空间特征进行融合,得到图像融合特征。将图像融合特征和所述对应掩膜特征输入图像生成模块,得到所述第二图像数据。
本公开可能的实现方式中,所述第二处理模块,进一步用于:将所述图像融合特征输入图像生成模块,通过所述图像生成模块将所述图像融合特征变换成为对应的仿射参数,在所述仿射参数中包含第一参数和第二参数;将所述对应掩膜特征输入所述图像生成模块,得到第三参数;根据所述第一参数、所述第二参数和所述第三参数,得到所述第二图像数据。
本公开可能的实现方式中,所述装置还包括:第三处理模块,用于:将所述训练数据集中对应第一图像数据的掩膜特征输入掩膜变分编码模块进行训练,输出得到两个子掩膜变化量。
本公开可能的实现方式中,所述第三处理模块,进一步用于:从所述训练数据集中得到第一掩膜特征和第二掩膜特征,所述第二掩膜特征不同于所述第一掩膜特征;通过掩膜变分编码模块进行编码处理,将所述第一掩膜特征和所述第二掩膜特征分别映射到预设特征空间中,得到第一中间变量和第二中间变量;其中,所述预设特征空间在维度上低于所述第一掩膜特征和所述第二掩膜特征;根据所述第一中间变量和所述第二中间变量,得到对应所述两个子掩膜变化量的两个第三中间变量;通过掩膜变分编码模块进行解码处理,将所述两个第三中间变量转换为所述两个子掩膜变化量。
本公开可能的实现方式中,所述装置还包括:第四处理模块,用于:将所述训练数据集中对应第一图像数据的掩膜特征输入掩膜变分编码模块,输出得到两个子掩膜变化量;将所述两个子掩膜变化量分别输入两个特征映射网络,所述两个特征映射网络共享一组分享权重并予以特征映射网络的权重更新,输出得到两个图像数据;将融合所述两个图像数据得到的图像融合数据作为所述第二图像数据,根据所述第二图像数据和第一图像数据得到损失函数,通过所述损失函数的反向传播进行生成对抗,达到特征映射网络收敛时结束对人脸编辑处理的模拟训练过程。
在一些实施例中,本公开实施例提供的装置具有的功能或包含的模块可以用于执行上文方法实施例描述的方法,其具体实现可以参照上文方法实施例的描述,为了简洁,这里不再赘述。
本公开实施例还提出一种计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现上述方法。计算机可读存储介质可以是非易失性计算机可读存储介质。
本公开实施例还提出一种电子设备,包括:处理器;用于存储处理器可执行指令的存储器;其中,所述处理器被配置为上述方法。
电子设备可以被提供为终端、服务器或其它形态的设备。
图7是根据一示例性实施例示出的一种电子设备800的框图。例如,电子设备800可以是移动电话,计算机,数字广播终端,消息收发设备,游戏控制台,平板设备,医疗设备,健身设备,个人数字助理等终端。
参照图7,电子设备800可以包括以下一个或多个组件:处理组件802,存储器804,电源组件806, 多媒体组件808,音频组件810,输入/输出(I/O)的接口812,传感器组件814,以及通信组件816。
处理组件802通常控制电子设备800的整体操作,诸如与显示,电话呼叫,数据通信,相机操作和记录操作相关联的操作。处理组件802可以包括一个或多个处理器820来执行指令,以完成上述的方法的全部或部分步骤。此外,处理组件802可以包括一个或多个模块,便于处理组件802和其他组件之间的交互。例如,处理组件802可以包括多媒体模块,以方便多媒体组件808和处理组件802之间的交互。
存储器804被配置为存储各种类型的数据以支持在电子设备800的操作。这些数据的示例包括用于在电子设备800上操作的任何应用程序或方法的指令,联系人数据,电话簿数据,消息,图片,视频等。存储器804可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。
电源组件806为电子设备800的各种组件提供电力。电源组件806可以包括电源管理系统,一个或多个电源,及其他与为电子设备800生成、管理和分配电力相关联的组件。
多媒体组件808包括在所述电子设备800和用户之间的提供一个输出接口的屏幕。在一些实施例中,屏幕可以包括液晶显示器(LCD)和触摸面板(TP)。如果屏幕包括触摸面板,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。所述触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与所述触摸或滑动操作相关的持续时间和压力。在一些实施例中,多媒体组件808包括一个前置摄像头和/或后置摄像头。当电子设备800处于操作模式,如拍摄模式或视频模式时,前置摄像头和/或后置摄像头可以接收外部的多媒体数据。每个前置摄像头和后置摄像头可以是一个固定的光学透镜系统或具有焦距和光学变焦能力。
音频组件810被配置为输出和/或输入音频信号。例如,音频组件810包括一个麦克风(MIC),当电子设备800处于操作模式,如呼叫模式、记录模式和语音识别模式时,麦克风被配置为接收外部音频信号。所接收的音频信号可以被进一步存储在存储器804或经由通信组件816发送。在一些实施例中,音频组件810还包括一个扬声器,用于输出音频信号。
I/O接口812为处理组件802和外围接口模块之间提供接口,上述外围接口模块可以是键盘,点击轮,按钮等。这些按钮可包括但不限于:主页按钮、音量按钮、启动按钮和锁定按钮。
传感器组件814包括一个或多个传感器,用于为电子设备800提供各个方面的状态评估。例如,传感器组件814可以检测到电子设备800的打开/关闭状态,组件的相对定位,例如所述组件为电子设备800的显示器和小键盘,传感器组件814还可以检测电子设备800或电子设备800一个组件的位置改变,用户与电子设备800接触的存在或不存在,电子设备800方位或加速/减速和电子设备800的温度变化。传感器组件814可以包括接近传感器,被配置用来在没有任何的物理接触时检测附近物体的存在。传感器组件814还可以包括光传感器,如CMOS或CCD图像传感器,用于在成像应用中使用。在一些实 施例中,该传感器组件814还可以包括加速度传感器,陀螺仪传感器,磁传感器,压力传感器或温度传感器。
通信组件816被配置为便于电子设备800和其他设备之间有线或无线方式的通信。电子设备800可以接入基于通信标准的无线网络,如WiFi,2G或3G,或它们的组合。在一个示例性实施例中,通信组件816经由广播信道接收来自外部广播管理系统的广播信号或广播相关信息。在一个示例性实施例中,所述通信组件816还包括近场通信(NFC)模块,以促进短程通信。例如,在NFC模块可基于射频识别(RFID)技术,红外数据协会(IrDA)技术,超宽带(UWB)技术,蓝牙(BT)技术和其他技术来实现。
在示例性实施例中,电子设备800可以被一个或多个应用专用集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理设备(DSPD)、可编程逻辑器件(PLD)、现场可编程门阵列(FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述方法。
在示例性实施例中,还提供了一种非易失性计算机可读存储介质,例如包括计算机程序指令的存储器804,上述计算机程序指令可由电子设备800的处理器820执行以完成上述方法。
图8是根据一示例性实施例示出的一种电子设备900的框图。例如,电子设备900可以被提供为一服务器。参照图8,电子设备900包括处理组件922,其进一步包括一个或多个处理器,以及由存储器932所代表的存储器资源,用于存储可由处理组件922的执行的指令,例如应用程序。存储器932中存储的应用程序可以包括一个或一个以上的每一个对应于一组指令的模块。此外,处理组件922被配置为执行指令,以执行上述方法。
电子设备900还可以包括一个电源组件926被配置为执行电子设备900的电源管理,一个有线或无线网络接口950被配置为将电子设备1900连接到网络,和一个输入输出(I/O)接口958。电子设备900可以操作基于存储在存储器932的操作系统,例如Windows ServerTM,Mac OS XTM,UnixTM,LinuxTM,FreeBSDTM或类似。
在示例性实施例中,还提供了一种非易失性计算机可读存储介质,例如包括计算机程序指令的存储器932,上述计算机程序指令可由电子设备900的处理组件922执行以完成上述方法。
本公开可以是系统、方法和/或计算机程序产品。计算机程序产品可以包括计算机可读存储介质,其上载有用于使处理器实现本公开的各个方面的计算机可读程序指令。
计算机可读存储介质可以是可以保持和存储由指令执行设备使用的指令的有形设备。计算机可读存储介质例如可以是――但不限于――电存储设备、磁存储设备、光存储设备、电磁存储设备、半导体存储设备或者上述的任意合适的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、静态随机存取存储器(SRAM)、便携式压缩盘只读存储器(CD-ROM)、数字多功能盘(DVD)、记忆棒、软盘、机械编码设备、例如其上存储有指令的打孔卡或凹槽内凸起结构、 以及上述的任意合适的组合。这里所使用的计算机可读存储介质不被解释为瞬时信号本身,诸如无线电波或者其他自由传播的电磁波、通过波导或其他传输媒介传播的电磁波(例如,通过光纤电缆的光脉冲)、或者通过电线传输的电信号。
这里所描述的计算机可读程序指令可以从计算机可读存储介质下载到各个计算/处理设备,或者通过网络、例如因特网、局域网、广域网和/或无线网下载到外部计算机或外部存储设备。网络可以包括铜传输电缆、光纤传输、无线传输、路由器、防火墙、交换机、网关计算机和/或边缘服务器。每个计算/处理设备中的网络适配卡或者网络接口从网络接收计算机可读程序指令,并转发该计算机可读程序指令,以供存储在各个计算/处理设备中的计算机可读存储介质中。
用于执行本公开操作的计算机程序指令可以是汇编指令、指令集架构(ISA)指令、机器指令、机器相关指令、微代码、固件指令、状态设置数据、或者以一种或多种编程语言的任意组合编写的源代码或目标代码,所述编程语言包括面向对象的编程语言—诸如Smalltalk、C++等,以及常规的过程式编程语言—诸如“C”语言或类似的编程语言。计算机可读程序指令可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络—包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。在一些实施例中,通过利用计算机可读程序指令的状态信息来个性化定制电子电路,例如可编程逻辑电路、现场可编程门阵列(FPGA)或可编程逻辑阵列(PLA),该电子电路可以执行计算机可读程序指令,从而实现本公开的各个方面。
这里参照根据本公开实施例的方法、装置(系统)和计算机程序产品的流程图和/或框图描述了本公开的各个方面。应当理解,流程图和/或框图的每个方框以及流程图和/或框图中各方框的组合,都可以由计算机可读程序指令实现。
这些计算机可读程序指令可以提供给通用计算机、专用计算机或其它可编程数据处理装置的处理器,从而生产出一种机器,使得这些指令在通过计算机或其它可编程数据处理装置的处理器执行时,产生了实现流程图和/或框图中的一个或多个方框中规定的功能/动作的装置。也可以把这些计算机可读程序指令存储在计算机可读存储介质中,这些指令使得计算机、可编程数据处理装置和/或其他设备以特定方式工作,从而,存储有指令的计算机可读介质则包括一个制造品,其包括实现流程图和/或框图中的一个或多个方框中规定的功能/动作的各个方面的指令。
也可以把计算机可读程序指令加载到计算机、其它可编程数据处理装置、或其它设备上,使得在计算机、其它可编程数据处理装置或其它设备上执行一系列操作步骤,以产生计算机实现的过程,从而使得在计算机、其它可编程数据处理装置、或其它设备上执行的指令实现流程图和/或框图中的一个或多个方框中规定的功能/动作。
附图中的流程图和框图显示了根据本公开的多个实施例的系统、方法和计算机程序产品的可能实 现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或指令的一部分,所述模块、程序段或指令的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
在不违背逻辑的情况下,本申请不同实施例之间可以相互结合,不同实施例描述有所侧重,为侧重描述的部分可以参见其他实施例的记载。以上已经描述了本公开的各实施例,上述说明是示例性的,并非穷尽性的,并且也不限于所披露的各实施例。在不偏离所说明的各实施例的范围和精神的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。本文中所用术语的选择,旨在最好地解释各实施例的原理、实际应用或对市场中技术的技术改进,或者使本技术领域的其它普通技术人员能理解本文披露的各实施例。

Claims (17)

  1. 一种图像处理方法,其特征在于,所述方法包括:
    获取从第一图像中提取的色彩特征;
    获取自定义的掩膜特征,所述自定义的掩膜特征用于指定所述色彩特征在所述第一图像中的区域位置;
    将所述色彩特征和所述自定义的掩膜特征输入特征映射网络进行图像属性的编辑,得到第二图像。
  2. 根据权利要求1所述的方法,其特征在于,所述特征映射网络,为训练后得到的特征映射网络;
    所述特征映射网络的训练过程包括:
    将由第一图像数据和对应第一图像数据的掩膜特征构成的数据对作为训练数据集;
    将所述训练数据集输入所述特征映射网络,在所述特征映射网络中将所述第一图像数据中至少一个区块的色彩特征映射到对应的掩膜特征中,输出得到第二图像数据,根据所述第二图像数据和所述第一图像数据得到损失函数,通过所述损失函数的反向传播进行生成对抗,达到特征映射网络收敛时结束所述训练过程。
  3. 根据权利要求2所述的方法,其特征在于,所述在所述特征映射网络中将所述第一图像数据中至少一个区块的色彩特征映射到对应的掩膜特征中,输出得到第二图像数据,包括:
    将所述至少一个区块的色彩特征和对应掩膜特征输入所述特征映射网络中的特征融合编码模块;
    通过所述特征融合编码模块将第一图像数据所提供的所述色彩特征和对应掩膜特征所提供的空间特征进行融合,得到用于表征空间和色彩特征的图像融合特征;
    将所述图像融合特征和所述对应掩膜特征输入图像生成模块,得到所述第二图像数据。
  4. 根据权利要求3所述的方法,其特征在于,所述将所述图像融合特征和所述对应掩膜特征输入图像生成模块,得到所述第二图像数据,包括:
    将所述图像融合特征输入所述图像生成模块,通过所述图像生成模块将所述图像融合特征变换成为对应的仿射参数,在所述仿射参数中包含第一参数和第二参数;
    将所述对应掩膜特征输入所述图像生成模块,得到第三参数;
    根据所述第一参数、所述第二参数和所述第三参数,得到所述第二图像数据。
  5. 根据权利要求2-4任一项所述的方法,其特征在于,所述方法还包括:
    将所述训练数据集中对应第一图像数据的掩膜特征输入掩膜变分编码模块进行训练,输出得到两个子掩膜变化量。
  6. 根据权利要求5所述的方法,其特征在于,所述将所述训练数据集中对应第一图像数据的掩膜特征输入掩膜变分编码模块进行训练,输出得到两个子掩膜变化量,包括:
    从所述训练数据集中得到第一掩膜特征和第二掩膜特征,所述第二掩膜特征不同于所述第一掩膜特征;
    通过掩膜变分编码模块进行编码处理,将所述第一掩膜特征和所述第二掩膜特征分别映射到预设特征空间中,得到第一中间变量和第二中间变量;其中,所述预设特征空间在维度上低于所述第一掩膜特征和所述第二掩膜特征;
    根据所述第一中间变量和所述第二中间变量,得到对应所述两个子掩膜变化量的两个第三中间变量;
    通过掩膜变分编码模块进行解码处理,将所述两个第三中间变量转换为所述两个子掩膜变化量。
  7. 根据权利要求5所述的方法,其特征在于,所述方法还包括:对人脸编辑处理进行模拟训练的过程;
    所述模拟训练的过程包括:
    将所述训练数据集中对应第一图像数据的掩膜特征输入掩膜变分编码模块,输出得到两个子掩膜变化量;
    将所述两个子掩膜变化量分别输入两个特征映射网络,所述两个特征映射网络共享一组分享权重并予以特征映射网络的权重更新,输出得到两个图像数据;
    将融合所述两个图像数据得到的图像融合数据作为所述第二图像数据,根据所述第二图像数据和第一图像数据得到损失函数,通过所述损失函数的反向传播进行生成对抗,达到网络收敛时结束所述模拟训练的过程。
  8. 一种图像处理装置,其特征在于,所述装置包括:
    第一特征获取模块,用于获取从第一图像中提取的色彩特征;
    第二特征获取模块,用于获取自定义的掩膜特征,所述自定义的掩膜特征用于指定所述色彩特征在所述第一图像中的区域位置;
    编辑模块,用于将所述色彩特征和所述自定义的掩膜特征输入特征映射网络进行图像属性的编辑,得到第二图像。
  9. 根据权利要求8所述的装置,其特征在于,所述特征映射网络,为训练后得到的特征映射网络;
    所述装置还包括:
    第一处理模块,用于将由第一图像数据和对应第一图像数据的掩膜特征构成的数据对作为训练数据集;
    第二处理模块,用于将所述训练数据集输入所述特征映射网络,在所述特征映射网络中将所述第一图像数据中至少一个区块的色彩特征映射到对应的掩膜特征中,输出得到第二图像数据,根据所述第二图像数据和所述第一图像数据得到损失函数,通过所述损失函数的反向传播进行生成对抗,达到网络收敛时结束所述特征映射网络的训练过程。
  10. 根据权利要求9所述的装置,其特征在于,所述第二处理模块,进一步用于:
    将所述至少一个区块的色彩特征和对应掩膜特征输入所述特征映射网络中的特征融合编码模块;
    通过所述特征融合编码模块将第一图像数据所提供的所述色彩特征和对应掩膜特征所提供的空间特征进行融合,得到用于表征空间和色彩特征的图像融合特征;
    将所述图像融合特征和所述对应掩膜特征输入图像生成模块,得到所述第二图像数据。
  11. 根据权利要求10所述的装置,其特征在于,所述第二处理模块,进一步用于:
    将所述图像融合特征输入图像生成模块,通过所述图像生成模块将所述图像融合特征变换成为对应的仿射参数,在所述仿射参数中包含第一参数和第二参数;
    将所述对应掩膜特征输入所述图像生成模块,得到第三参数;
    根据所述第一参数、所述第二参数和所述第三参数,得到所述第二图像数据。
  12. 根据权利要求9-11任一项所述的装置,其特征在于,所述装置还包括:第三处理模块,用于:
    将所述训练数据集中对应第一图像数据的掩膜特征输入掩膜变分编码模块进行训练,输出得到两个子掩膜变化量。
  13. 根据权利要求12所述的装置,其特征在于,所述第三处理模块,进一步用于:
    从所述训练数据集中得到第一掩膜特征和第二掩膜特征,所述第二掩膜特征不同于所述第一掩膜特征;
    通过掩膜变分编码模块进行编码处理,将所述第一掩膜特征和所述第二掩膜特征分别映射到预设特征空间中,得到第一中间变量和第二中间变量;其中,所述预设特征空间在维度上低于所述第一掩膜特征和所述第二掩膜特征;
    根据所述第一中间变量和所述第二中间变量,得到对应所述两个子掩膜变化量的两个第三中间变量;
    通过掩膜变分编码模块进行解码处理,将所述两个第三中间变量转换为所述两个子掩膜变化量。
  14. 根据权利要求12所述的装置,其特征在于,所述装置还包括:第四处理模块,用于:
    将所述训练数据集中对应第一图像数据的掩膜特征输入掩膜变分编码模块,输出得到两个子掩膜变化量;
    将所述两个子掩膜变化量分别输入两个特征映射网络,所述两个特征映射网络共享一组分享权重并予以特征映射网络的权重更新,输出得到两个图像数据;
    将融合所述两个图像数据得到的图像融合数据作为所述第二图像数据,根据所述第二图像数据和所述第一图像数据得到损失函数,通过所述损失函数的反向传播进行生成对抗,达到特征映射网络收敛时结束对人脸编辑处理的模拟训练过程。
  15. 一种电子设备,其特征在于,包括:
    处理器;
    用于存储处理器可执行指令的存储器;
    其中,所述处理器被配置为:执行权利要求1至7中任意一项所述的方法。
  16. 一种计算机可读存储介质,其上存储有计算机程序指令,其特征在于,所述计算机程序指令被处理器执行时实现权利要求1至7中任意一项所述的方法。
  17. 一种计算机程序,其特征在于,所述计算机程序包括计算机可读代码,当所述计算机可读代码在电子设备中运行时,所述电子设备中的处理器执行用于实现权利要求1至7中的任意一项所述的方法。
PCT/CN2019/107854 2019-05-24 2019-09-25 一种图像处理方法及装置、电子设备和存储介质 WO2020237937A1 (zh)

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)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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 北京大学深圳研究生院 基于受限文本空间的多步自注意力跨媒体检索方法及系统

Patent Citations (4)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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