+

HK40020283B - Image noise processing method and device - Google Patents

Image noise processing method and device Download PDF

Info

Publication number
HK40020283B
HK40020283B HK42020010279.6A HK42020010279A HK40020283B HK 40020283 B HK40020283 B HK 40020283B HK 42020010279 A HK42020010279 A HK 42020010279A HK 40020283 B HK40020283 B HK 40020283B
Authority
HK
Hong Kong
Prior art keywords
image
model
training
target
sample
Prior art date
Application number
HK42020010279.6A
Other languages
Chinese (zh)
Other versions
HK40020283A (en
Inventor
刘龙坡
Original Assignee
腾讯科技(深圳)有限公司
Filing date
Publication date
Application filed by 腾讯科技(深圳)有限公司 filed Critical 腾讯科技(深圳)有限公司
Publication of HK40020283A publication Critical patent/HK40020283A/en
Publication of HK40020283B publication Critical patent/HK40020283B/en

Links

Description

Image noise adding processing method and device
Technical Field
The present disclosure relates to the field of image processing technologies, and in particular, to a method and an apparatus for processing noise of an image.
Background
At present, in each large internet site, many images are often directly public-oriented, and the images also often comprise information with privacy attributes, for example, in a scene of taking a face as a user head portrait, the user head portrait (image) is often a face image of a user, and the images comprise information with privacy attributes such as gender, approximate age and the like of the user; in addition, in a scene in which photographs of places such as business offices and schools are taken as promotional photographs, some information on privacy attributes inside the business is often included in photographs of the places. However, the protection problem of the privacy attribute information is not considered in the prior art, and once the privacy attribute information is lost through the image, the information of the privacy attribute is revealed, which will affect users, enterprises and the like. Therefore, there is a need to provide a reliable and efficient solution to the problem of directly exposing privacy attributes in existing images.
Disclosure of Invention
The application provides a method and a device for processing the noise of an image, which can remove the characteristics of a target privacy attribute needing to be kept secret on the basis of ensuring certain similarity between the image subjected to the noise processing and an original image, can realize accurate distinguishing of different objects based on the image subjected to the noise processing, and simultaneously avoid the safety problem of leakage of the target privacy attribute.
In one aspect, the present application provides a method for noise-adding processing an image, where the method includes:
acquiring random noise information and a target object image;
the random noise information is used as input of a target noise image generation model, and a target noise image is generated, wherein the target noise image is an image which has object classification performance and removes target privacy attributes of objects;
performing noise adding processing on the target object image based on the target noise image to obtain a noise added image of the target object image;
the target noise image generation model is a model obtained by performing constraint training of object image recognition on a first deep learning model, target privacy attribute removal on a target privacy attribute recognition model, object recognition on the object recognition model and image authenticity judgment on a judgment model by combining a sample object image when the image generation training of the generation model is performed on the basis of sample noise information.
Another aspect provides an apparatus for noise-adding an image, the apparatus comprising:
the data acquisition module is used for acquiring random noise information and a target object image;
a target noise image generation module, configured to generate a target noise image by using the random noise information as an input of a target noise image generation model, where the target noise image is an image that has object classification performance and removes a target privacy attribute of an object;
The noise adding processing module is used for adding noise to the target object image based on the target noise image to obtain a noise added image of the target object image;
the target noise image generation model is a model obtained by performing constraint training of object image recognition on a first deep learning model, target privacy attribute removal on a target privacy attribute recognition model, object recognition on the object recognition model and image authenticity judgment on a judgment model by combining a sample object image when the image generation training of the generation model is performed on the basis of sample noise information.
In another aspect, an apparatus for processing an image by noise is provided, the apparatus including a processor and a memory, where at least one instruction, at least one program, a code set, or an instruction set is stored in the memory, where the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by the processor to implement a method for processing an image by noise as described above.
Another aspect provides a computer readable storage medium having stored therein at least one instruction, at least one program, code set, or instruction set loaded and executed by a processor to implement a method of denoising an image as described above.
The image noise adding processing method and device provided by the application have the following technical effects:
according to the method and the device, random noise information can be converted into the target noise image with the characteristics of removing the target privacy attribute needing to be kept secret based on the target noise image generation model, meanwhile, the object classification performance is kept, then, noise is added to the target object image based on the target noise image, the characteristics of removing the target privacy attribute needing to be kept secret can be guaranteed on the basis that the obtained noise added image has a certain similarity with the original target object image, and therefore the fact that different objects are accurately distinguished based on the image after noise addition is achieved, meanwhile, the real target privacy attribute of the target object is removed, and the safety problem of leakage of the target privacy attribute is avoided.
Drawings
In order to more clearly illustrate the technical solutions and advantages of embodiments of the present application or of the prior art, the following description will briefly introduce the drawings that are required to be used in the embodiments or the prior art descriptions, it is obvious that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of an application environment provided by an embodiment of the present application;
FIG. 2 is a flowchart of a training method of a target noise image generation model according to an embodiment of the present application;
fig. 3 is a flowchart of a training method of a target privacy attribute identification model according to an embodiment of the present application;
FIG. 4 is a flowchart of another training method of a target privacy attribute identification model according to an embodiment of the present application;
FIG. 5 is a flowchart of a training method of an object recognition model according to an embodiment of the present application;
fig. 6 is a flowchart of a method for noise-adding processing of an image according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of an image noise adding device according to an embodiment of the present application;
fig. 8 is a hardware block diagram of a server of a method for processing noise of an image according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present application based on the embodiments herein.
It should be noted that the terms "first," "second," and the like in the description and claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that embodiments of the present application described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or server that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed or inherent to such process, method, article, or apparatus, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Artificial intelligence (Artificial Intelligence, AI) is the theory, method, technique and application system that uses a digital computer or a machine controlled by a digital computer to simulate, extend and extend human intelligence, sense the environment, acquire knowledge and use the knowledge to obtain optimal results. The artificial intelligence software technology mainly comprises a computer vision technology, a voice processing technology, a natural language processing technology, machine learning/deep learning and other directions.
In recent years, with research and progress of artificial intelligence technology, the artificial intelligence technology is widely applied in a plurality of fields, and the scheme provided by the embodiment of the application relates to the technology of machine learning/deep learning and the like of artificial intelligence, and is specifically described by the following embodiments:
referring to fig. 1, fig. 1 is a schematic diagram of an application environment provided in an embodiment of the present application, and as shown in fig. 1, the application environment may at least include a server 01 and a terminal 02.
In the embodiment of the present specification, the server 01 may include one independently operating server, or a distributed server, or a server cluster composed of a plurality of servers. The server 01 may include a network communication unit, a processor, a memory, and the like. Specifically, the server 01 may be used to perform training learning of a target noise image generation model, which in the embodiment of the present specification may be used to generate an image having object classification performance and removing the target privacy attribute of the object.
In this embodiment of the present disclosure, the terminal 02 may include a smart phone, a desktop computer, a tablet computer, a notebook computer, a digital assistant, an augmented reality (augmented reality, AR)/Virtual Reality (VR) device, a smart wearable device, or other type of physical device, or may include software running in the physical device, such as an application program, or the like. The operating system running on the terminal 02 in the embodiment of the present application may include, but is not limited to, an android system, an IOS system, linux, windows, and the like. In this embodiment of the present disclosure, the terminal 02 may be configured to generate a model based on the target noise image trained by the server 01, and provide a service for noise adding processing of the image, so that the feature of the target privacy attribute of the target object may be removed while the feature of the original image is retained by the image after noise adding of the target object image. In the embodiment of the present disclosure, the target object may include, but is not limited to, a person, an animal, an article, a location corresponding to an address, and the like, and the corresponding target object image may be an image of the target object, for example, a face image. Specifically, the target privacy attribute may be an attribute that needs to be kept secret in combination with a target object image set in practical application, for example, age, sex, etc. in a face image, internal data posted in a place, etc.
In addition, the application environment shown in fig. 1 is only one type of image noise adding processing, and in practical application, training learning of the target noise image generation model may also be processed on a device that provides an image noise adding processing service.
Embodiments of the training process of the target noise image generation model of the present application are described below, and specifically may include:
in the embodiment of the present disclosure, the target noise image generation model may be a model obtained by performing, when training is performed on image generation of the generation model based on sample noise information, constraint training for performing object image recognition on the first deep learning model, performing target privacy attribute removal on the target privacy attribute recognition model, performing object recognition on the object recognition model, and performing image authenticity determination on the determination model in combination with the sample object image.
An embodiment of a training process for the target noise image generation model is described below in conjunction with FIG. 2
S201: sample noise information and a sample object image are acquired.
In the embodiment of the present specification, the sample noise information may be a vector obtained by randomly sampling from a gaussian distribution. In particular, the sample object image may be an image of a large number of objects.
In a specific embodiment, when the object is a person, the sample object image may be a large number of face images, and accordingly, a large number of face images of users may be collected from the internet site, and then the collected face images are scaled into images of the size according to the size (for example, 64×64) of the input image in the model at the time of subsequent training, so as to be used as sample object images; in addition, the face shape of the face image may have a certain skew, so that in order to facilitate the subsequent model training and optimization, in the embodiment of the present disclosure, the face image may be corrected, and specifically, the face key point may be detected by using a face key point detection method first; then, determining dual-purpose coordinates according to the detected face key points; and correcting the face image in an affine transformation mode according to the specification of consistent binocular ordinate, and finally, scaling the image to the size of the input image of the model during training so as to obtain the sample object image.
In another specific embodiment, the sample object image may also be an image of a location, such as an office location of a business, and accordingly, a plurality of images of the office location including the target privacy attribute (e.g., posted internal data) may be collected and scaled to the size of the model versus the size of the input image at the time of training, thereby obtaining the sample object image.
S203: and taking the sample noise information as input of a generation model, and performing training learning of image generation on the generation model to obtain a first generation image.
In the embodiment of the present specification, the generation model may be a generation model in a generation-type countermeasure network (GAN, generative Adversarial Networks), and in particular, the generation model may include a full connection layer, a first deconvolution layer, a second deconvolution layer, a third deconvolution layer, a fourth deconvolution layer, and a fifth deconvolution layer.
In a specific embodiment, assuming that the sample noise information is a vector randomly sampled from a gaussian distribution of a specified dimension (e.g., 100 dimensions), the vector randomly sampled from the gaussian distribution of the specified dimension may be input to a generation model, and then input to a fully-connected layer of 16384 neurons to obtain a vector Z of 1×16348 dimensions, and then input to a first deconvolution layer of 1024 neurons, where the step size is 2, the vector Z is adjusted to four dimensions 0 (1×4×4×1024); then, vector Z is again 0 A second deconvolution layer input to 512 neurons, wherein the step size is 2, a vector Z of 1×8×8×512 can be obtained 1 Vector Z is then calculated 1 Is input into the third deconvolution layer of 256 neurons with a step size of 2 to obtain a vector Z of 1×16×16×256 2 And then Z is 2 Input to a fourth deconvolution layer with a step length of 2 and a neuron number of 128 to obtain a vector Z of 1×32×32×128 3 Finally Z is 3 Input into a fifth deconvolution layer with step length of 2 and neuron number of 3 to obtain a 64×64×3 vector Z 4 ,Z 4 I.e. the image generated by the generation model (first generated image), and furthermore, the neuron size of each convolution layer in the generation model is 3x3.
S205: a second generated image is generated based on the sample object image and the first generated image.
In the embodiment of the present disclosure, in order to control the graph generated by the generated model to be as consistent as possible with the input image, the first generated image generated by the generated model is averaged with the sample object image, that is, only the feature vector corresponding to the sample object image and the feature vector corresponding to the first generated image are processed by averaging, and then the feature vector after the averaging is input into the deconvolution layer to generate the final image.
Specifically, the structure of the deconvolution layer can be combined with the actual setting of the size requirement of the input image by the subsequent model.
In addition, it should be noted that the sample object image in the embodiment of the present disclosure includes a plurality of sample object images, and the corresponding second generated image may be generated based on each sample object image and the first generated image.
S207: and taking the second generated image and the sample object image as input of a first deep learning model, taking the sample object image and the first generated image as input of a target privacy attribute identification model, taking the sample object image and the first generated image as input of a target identification model, and respectively carrying out training learning of object image identification, target privacy attribute removal and object identification on the first deep learning model, the target privacy attribute identification model and the target identification model to obtain a first error corresponding to the first deep learning model, a second error corresponding to the target privacy attribute identification model and a third error corresponding to the target identification model.
In the embodiment of the present specification, the first deep learning model may include, but is not limited to, a deep learning model such as a convolutional neural network, a recurrent neural network, or a recurrent neural network.
In a particular embodiment, the first deep learning model may include a first convolution layer of 128 3x3 neurons, a second convolution layer of 256 3x3 neurons, a third convolution layer of 512 3x3 neurons, and an average pooling layer.
Specifically, the second generated image and the sample object image may be used as input of a first deep learning model, training learning of object image identification is performed on the first deep learning model, and a training image is obtained as a predicted value of the sample object image, where the training image includes the second generated image and the sample object image; and then, calculating a first error between a predicted value of the training image as a sample object image and a sample label of the training image based on a first loss function, wherein the sample label corresponding to the training image represents the probability of the training image as the sample object image.
In the embodiment of the present disclosure, the probability that the second generated image represented by the sample label of the second generated image is the sample object image is 0; the probability that the sample object image characterized by the sample label of the sample object image is a sample object image is 1. In a specific embodiment, assuming that the predicted value of the training image as the sample object image is p, the sample label corresponding to the training image is y, the first loss function is (y-p)/(2), and accordingly, the first error can be obtained according to (y-p)/(2) in the training process.
In addition, it should be noted that the first loss function in the embodiment of the present disclosure is not limited to the above-mentioned (y-p)/(2), and other loss functions may be included in the practical application, and the embodiment of the present disclosure is not limited to the above-mentioned.
In the embodiment of the present disclosure, in the training learning process for performing the generated model, the training learning for performing object image recognition on the first deep learning model by combining the second generated image including the sample object image may improve the similarity between the generated image of the generated model and the sample object image.
In the embodiment of the present disclosure, the target privacy attribute recognition model may include a model obtained by training and learning for target privacy attribute recognition on a preset deep learning model based on a sample object image and a target privacy attribute of an object corresponding to the sample object image. Specifically, the preset deep learning model may include, but is not limited to, a deep learning model such as a convolutional neural network, a recurrent neural network, or a recurrent neural network.
In a specific embodiment, the preset deep learning model herein may include a first convolution layer of 128 3x3 neurons, a second convolution layer of 256 3x3 neurons, a third convolution layer of 512 3x3 neurons, and an average pooling layer.
In a specific embodiment, as shown in fig. 3, when the target privacy attribute is the age of the object, the training process of the target privacy attribute identification model may include:
S301: and determining the age label of the object corresponding to the sample object image.
Specifically, the age tag herein may be the true age of the subject.
S303: and taking the sample object image as the input of a second deep learning model, and performing training learning of age identification on the second deep learning model to obtain the predicted age of the object corresponding to the sample object image.
Specifically, the second deep learning model may or may not be identical to the above-described structure of the preset deep learning model.
S305: and calculating a fifth error between the predicted age and the age label of the object corresponding to the sample object image based on a fifth loss function.
In the present embodiment, the fifth loss function may include, but is not limited to, a square difference function.
S307: and judging whether the fifth error meets a third preset condition or not.
In this embodiment of the present disclosure, the third preset condition may be that a fifth error between a predicted age and an age of a first percentage of image corresponding objects in the sample object image is less than or equal to a specified threshold, or a difference between a current fifth error between the predicted age and the age of the sample object image corresponding objects and a fifth error after the last training learning is less than a certain threshold.
Specifically, the first percentage may be a value of 100% or less, which is set in connection with the actual application.
In the embodiment of the specification, the specified threshold can be set in combination with the requirement of the target privacy attribute recognition accuracy of the target privacy attribute recognition model in practical application, and generally, the larger the specified threshold is, the higher the recognition accuracy of the trained target privacy attribute recognition model is, but the longer the training time is; on the contrary, the smaller the designated threshold value is, the lower the recognition accuracy of the trained target privacy attribute recognition model is, but the shorter the training time is.
S309: and when the judgment result is negative, the model parameters in the second deep learning model are adjusted based on a gradient descent method, and the steps from the step S303 to the step S307 are repeated.
S311: and when the judgment result is yes, taking the current second deep learning model as the target privacy attribute identification model.
In another specific embodiment, as shown in fig. 4, when the target privacy attribute is the gender of the object, the training process of the target privacy attribute identification model may include:
s401: and determining the gender label of the object corresponding to the sample object image.
In the present embodiment, the sex tag may include, but is not limited to, male and female in the case of a human subject, male and female in the case of an animal subject, and the like.
S403: and taking the sample object image as the input of a third deep learning model, and performing training learning of gender identification on the third deep learning model to obtain the predicted gender of the object corresponding to the sample object image.
S405: and judging whether the predicted gender and the gender label of the object corresponding to the sample object image are consistent.
S407: and when the judgment result is negative, the model parameters in the third deep learning model are adjusted based on a gradient descent method, and the steps from S403 to S405 are repeated.
Specifically, the third deep learning model may or may not be identical to the above-described structure of the preset deep learning model.
S409: and when the judgment result is yes, taking the current third deep learning model as the target privacy attribute identification model.
In addition, it should be noted that the target privacy attribute identification model in the embodiment of the present disclosure may include one or more models having different target privacy attribute identification capabilities.
Specifically, the sample object image and the first generated image may be used as input of a target privacy attribute identification model, and training learning for removing target privacy attributes is performed on the target privacy attribute identification model to obtain a target privacy attribute predicted value corresponding to the sample object image and a target privacy attribute predicted value corresponding to the first generated image; and calculating a second error between the target privacy attribute predicted value corresponding to the sample object image and the target privacy attribute predicted value corresponding to the first generated image based on a second loss function.
In this embodiment of the present disclosure, the second loss function may include, but is not limited to, an average absolute error (Mean Absolute Deviation, mad), and accordingly, a second error (using 1/mad as the second error) between the target privacy attribute predicted value corresponding to the sample object image and the target privacy attribute predicted value corresponding to the first generated image may be calculated based on the average absolute error, where the smaller the second error, the larger the difference between the sample object image and the target privacy attribute corresponding to the first generated image, and the more the generated image can wipe out the target privacy attribute in the original object image.
In another specific embodiment, when the target privacy attribute is the privacy profile information of the object, the training process of the target privacy attribute identification model may include:
1) Determining privacy information corresponding to the sample object image;
specifically, the object may be a place, an article, etc., and the privacy information may be information to be kept secret in the place or the article image, for example, information of internal information posted by the place, a user name on the article, etc.
2) Taking the sample object image as the input of a fifth deep learning model, and performing training learning of privacy information identification on the fifth deep learning model to obtain the predicted privacy information corresponding to the sample object image;
3) Judging whether the sample object image corresponds to the predicted privacy information and the privacy information;
4) When the judgment result is negative, adjusting model parameters in the fifth deep learning model based on a gradient descent method, and repeating the training learning steps;
5) And when the judgment result is yes, taking the current fifth deep learning model as the target privacy attribute identification model.
Specifically, the training of the fifth deep learning model may be referred to the above description of the training process of the third deep learning model, which is not repeated herein.
In the embodiment of the specification, in the training learning process of generating the model, training learning of removing the target privacy attribute of the target privacy attribute model with identification target privacy attribute is performed by combining the sample object image and the first generated image output by the generating model, so that the removal of the target privacy attribute in the image generated by the generating model can be ensured, and confidentiality of the target privacy attribute is realized.
In the embodiment of the present specification, the object recognition model may include a model obtained by training learning in which object recognition is performed on the fourth deep learning model based on the sample object image and the object label corresponding to the sample object image.
In particular, the fourth deep learning model may include, but is not limited to, a deep learning model such as a convolutional neural network, a recurrent neural network, or a recurrent neural network.
In a specific embodiment, the fourth deep learning model may include a first convolution layer of 128 3x3 neurons, a second convolution layer of 256 3x3 neurons, a third convolution layer of 512 3x3 neurons, and a similarity calculation layer.
In a specific embodiment, as shown in fig. 5, the training process of the object recognition model may include:
s501: and determining an object label corresponding to the sample object image.
S503: and taking the sample object image as input of a fourth deep learning model, and performing training learning of object identification on the fourth deep learning model to obtain a predicted object corresponding to the sample object image.
S505: and judging whether the predicted object corresponding to the sample object image is consistent with the object label.
S507: and when the judgment result is negative, the model parameters in the fourth deep learning model are adjusted based on a gradient descent method, and the steps of S503 to S505 are repeated.
S509: and when the judgment result is yes, taking the current fourth deep learning model as the object recognition model.
Specifically, the sample object image and the first generated image may be used as input of an object recognition model, and training learning of object recognition is performed on the object recognition model to obtain a predicted value of an image corresponding to the same object as the sample object image and the first generated image; and taking the predicted value as a third error.
In this embodiment of the present disclosure, the predicted value of the image corresponding to the sample object image and the first generated image that are the same object may include, but is not limited to, calculating a cosine similarity between the sample object image and the first generated image, that is, a predicted value output by the model is a similarity between two feature vectors corresponding to the sample object image and the first generated image, where the similarity is a third error, and when the two vectors are more similar, the lower the cosine similarity is, the smaller the third error is.
In the embodiment of the specification, in the training learning process of generating the model, the training learning of object recognition is performed on the object recognition model with the object recognition capability by combining the sample object image and the first generated image generated by the generating model, so that the image generated by the generating model can be ensured to have the object recognition classification performance while removing the target privacy attribute.
S209: judging whether the first error, the second error and the third error meet a first preset condition or not.
In the embodiment of the present disclosure, the first preset condition may be that a sum of the first error, the second error, and the third error is less than or equal to a specified threshold; the difference between the current sum of the first error, the second error and the third error and the sum of the first error, the second error and the third error in the last training is smaller than or equal to a preset threshold value; the sum of the first error, the second error and the third error is smaller than or equal to a specified threshold value, and the first error, the second error and the third error are respectively smaller than or equal to another specified threshold value; the difference between the current sum of the first error, the second error and the third error and the sum of the first error, the second error and the third error in the last training is smaller than or equal to a preset threshold value, the difference between the current first error and the first error in the last training is smaller than or equal to another preset threshold value, the difference between the current second error and the second error in the last training is smaller than or equal to another preset threshold value, and the difference between the current third error and the third error in the last training is smaller than or equal to another preset threshold value.
S211: and when the judgment result is negative, adjusting model parameters in the generation model, the first deep learning model, the target privacy attribute identification model and the object identification model based on a gradient descent method, and repeating the training learning steps.
S213: and when the judgment result is yes, taking the current generation model as a primary training generation model.
In the embodiment of the specification, in the training learning process of generating the model, the training learning of object image recognition of the first deep learning model, the training learning of object privacy attribute removal of the object privacy attribute model with recognition object privacy attribute and the training learning of object recognition of the object recognition model with object recognition are combined, so that the similarity between the graph generated by the generating model and the sample object image can be improved, the object privacy attribute in the image generated by the generating model is removed, confidentiality of the object privacy attribute is realized, and meanwhile, the image generated by the generating model has the object recognition and classification performance.
S215: and taking the sample noise information as the input of the initial training generation model, and performing training learning of image generation on the initial training generation model to obtain a third generated image.
S217: and taking the third generated image and the sample object image as input of a judging model, and performing training learning of image authenticity judgment on the judging model to obtain a fourth error corresponding to the judging model.
In the embodiment of the present specification, the decision model may be a decision model in a generation countermeasure network (GAN, generative Adversarial Networks), and in particular, the decision model may include a first convolution layer, a second convolution layer, a third convolution layer, and an average pooling layer.
In a specific embodiment, the first convolution layer may include 128 3x3 neurons, the second convolution layer may include 256 3x3 neurons, and the third convolution layer may include 512 3x3 neurons.
Specifically, the third generated image and the sample object image may be used as input of a determination model, training learning for determining image authenticity is performed on the determination model, and an authenticity prediction value of a training image is obtained, where the training image includes the third generated image and the sample object image;
and calculating a fourth error between the real face predicted value of the training image and the sample label of the training image based on a fourth loss function, wherein the sample label corresponding to the training image represents the probability that the training image is a sample object image.
In this embodiment of the present disclosure, the authenticity prediction value of the training image may be a prediction probability of whether the training image is a sample object image, specifically, a probability that a sample label corresponding to the third generated image characterizes the third generated image as the sample object image is 0, and a probability that a sample label corresponding to the sample object image characterizes the sample object image as the sample object image is 1.
Specifically, the specific description of calculating the fourth error between the real face predicted value of the training image and the sample label of the training image based on the fourth loss function may refer to the above description of calculating the predicted value of the training image as the sample object image based on the first loss function and the first error between the sample label of the training image, which is not described herein.
S219: and judging whether the fourth error meets a second preset condition or not.
Specifically, the second preset condition may refer to a description related to the third preset condition, which is not described herein.
S221: and when the judgment result is negative, adjusting model parameters in the generation model and the judgment model based on a gradient descent method, and repeating the training and learning steps.
S223: and when the judgment result is yes, taking the current generation model as a target noise image generation model.
In the embodiment of the specification, the target noise image generation model is trained in a countermeasure mode, and then any random noise information can be converted into an image with the characteristic of removing the target privacy attribute needing confidentiality based on the target noise image generation model, and meanwhile, the performance of object classification is maintained.
In the following, a method for processing an image by noise according to the present application will be described based on a model for generating a target noise image, and fig. 6 is a schematic flow chart of a method for processing an image by noise according to an embodiment of the present application, where the present specification provides steps of operation of the method as described in the example or the flowchart, but may include more or less steps of operation based on conventional or non-creative labor. The order of steps recited in the embodiments is merely one way of performing the order of steps and does not represent a unique order of execution. When implemented in a real system or server product, the methods illustrated in the embodiments or figures may be performed sequentially or in parallel (e.g., in a parallel processor or multithreaded environment). As shown in fig. 6, the method may include:
s601: random noise information and a target object image are acquired.
In the embodiment of the present specification, the random noise information may include a vector randomly sampled from a gaussian distribution of a specified dimension. Specifically, the target object may include, but is not limited to, a person, an animal, an article, a place, etc., and the target object image may be an image of the object. The object corresponding to the sample object image includes a target object.
S603: and using the random noise information as an input of a target noise image generation model to generate a target noise image.
In this embodiment of the present disclosure, in a training process of a target noise image generation model, constraint training of performing object image recognition on a first deep learning model, performing object privacy attribute removal on a target privacy attribute recognition model, performing object recognition on the object recognition model, and performing image authenticity determination on a determination model in combination with a sample object image may implement constraint restriction that performs object privacy attribute removal on an image generated by the generation model and has object classification performance, and accordingly, in this embodiment of the present disclosure, the target noise image generated by the target noise image generation model may be an image that has object classification performance and removes the object privacy attribute of the object.
S605: and carrying out noise adding processing on the target object image based on the target noise image to obtain a noise added image of the target object image.
In practical application, when the image is processed, the image is equivalent to a feature vector with image features, and correspondingly, the feature vector corresponding to the target noise image and the feature vector corresponding to the target object image can be subjected to average processing to obtain an average processed feature vector; and performing deconvolution operation on the feature vector subjected to the average processing to obtain a noise-added image of the target object image.
In the embodiment of the present disclosure, after obtaining a target noise image with object classification performance and removing a target privacy attribute of an object, the target noise image and the target object image are subjected to an average process, and then a deconvolution operation is performed on a feature vector after the average process to obtain a noise added image of the target object image, which may include removing a feature of the target privacy attribute that needs to be kept secret on the basis of a certain similarity between the noise added image and an original target object image, while maintaining the object classification performance. In practical application, different objects can be accurately distinguished based on the noisy image, meanwhile, the real target privacy attribute of the target object is removed, and the security problem of leakage of the target privacy attribute is avoided.
The embodiment of the application also provides a device for processing the noise of the image, as shown in fig. 7, the device comprises:
a data acquisition module 710, configured to acquire random noise information and a target object image;
the target noise image generation module 720 may be configured to use the random noise information as an input of a target noise image generation model, and generate a target noise image, where the target noise image is an image that has object classification performance and removes a target privacy attribute of an object;
the noise adding processing module 730 may be configured to perform noise adding processing on the target object image based on the target noise image, to obtain a noise added image of the target object image;
the target noise image generation model is a model obtained by performing constraint training of object image recognition on a first deep learning model, target privacy attribute removal on a target privacy attribute recognition model, object recognition on the object recognition model and image authenticity judgment on a judgment model by combining a sample object image when the image generation training of the generation model is performed on the basis of sample noise information.
In some embodiments, the noise-adding processing module 730 includes:
The average processing module is used for carrying out average processing on the feature vector corresponding to the target noise image and the feature vector corresponding to the target object image to obtain an average processed feature vector;
and the deconvolution operation module is used for carrying out deconvolution operation on the feature vector after the average processing to obtain a noise-added image of the target object image.
In some embodiments, the apparatus further comprises:
the training sample data acquisition module is used for acquiring sample noise information and sample object images;
the first image generation module is used for taking the sample noise information as the input of a generation model, and performing training learning of image generation on the generation model to obtain a first generation image;
a second generated image generation module for generating a second generated image based on the sample object image and the first generated image;
the constraint training learning module is used for taking the second generated image and the sample object image as input of a first deep learning model, taking the sample object image and the first generated image as input of a target privacy attribute identification model, respectively carrying out training learning of object image identification, target privacy attribute removal and object identification on the first deep learning model, the target privacy attribute identification model and the object identification model by taking the sample object image and the first generated image as input of a target privacy attribute identification model, and obtaining a first error corresponding to the first deep learning model, a second error corresponding to the target privacy attribute identification model and a third error corresponding to the object identification model;
The first judging module is used for judging whether the first error, the second error and the third error meet a first preset condition or not;
the first model parameter adjustment module is used for adjusting model parameters in the generation model, the first deep learning model, the target privacy attribute identification model and the object identification model based on a gradient descent method when the judgment result of the first judgment module is negative, and repeating the training learning steps;
the initial training generation model determining module is used for taking the current generation model as the initial training generation model when the first judging module judges that the result is yes;
the third image generation module is used for taking the sample noise information as the input of the initial training generation model, and performing training learning of image generation on the initial training generation model to obtain a third generated image;
the training learning module is used for taking the third generated image and the sample object image as the input of a judging model, and carrying out training learning of image authenticity judgment on the judging model to obtain a fourth error corresponding to the judging model;
the second judging module is used for judging whether the fourth error meets a second preset condition or not;
The second model parameter adjusting module is used for adjusting model parameters in the generating model and the judging model based on a gradient descent method when the judging result of the second judging module is negative, and repeating the training and learning steps;
and the target noise image generation model determining module is used for taking the current generation model as a target noise image generation model when the judgment result of the second judging module is yes.
In some embodiments, the constraint training learning module comprises:
the training learning unit is used for taking the second generated image and the sample object image as input of a first deep learning model, performing training learning of object image identification on the first deep learning model, and obtaining a training image which is a predicted value of the sample object image, wherein the training image comprises the second generated image and the sample object image;
the first error calculation unit is used for calculating a first error between a predicted value of the training image serving as a sample object image and a sample label of the training image based on a first loss function, wherein the sample label corresponding to the training image represents the probability of the training image serving as the sample object image;
The training learning unit is used for taking the sample object image and the first generated image as the input of a target privacy attribute identification model, and performing training learning of target privacy attribute removal on the target privacy attribute identification model to obtain a target privacy attribute predicted value corresponding to the sample object image and a target privacy attribute predicted value corresponding to the first generated image;
a second error calculation unit, configured to calculate a second error between a target privacy attribute predicted value corresponding to the sample object image and a target privacy attribute predicted value corresponding to the first generated image based on a second loss function;
the training learning module is used for taking the sample object image and the first generated image as input of an object recognition model, and performing training learning of object recognition on the object recognition model to obtain a predicted value of an image corresponding to the same object as the sample object image and the first generated image;
and the second error determining unit is used for taking the predicted value as a third error.
In some embodiments, the training learning module of image authenticity determination comprises:
The training learning unit is used for taking the third generated image and the sample object image as the input of a judging model, performing training learning of image authenticity judgment on the judging model, and obtaining an authenticity predicted value of a training image, wherein the training image comprises the third generated image and the sample object image;
and the fourth error calculation unit is used for calculating a fourth error between the real face predicted value of the training image and the sample label of the training image based on a fourth loss function, and the sample label corresponding to the training image represents the probability that the training image is a sample object image.
In some embodiments, when the target privacy attribute is the age of the subject, the apparatus further comprises:
the age determining module is used for determining the age of the object corresponding to the sample object image;
the training learning module is used for taking the sample object image as the input of a second deep learning model, and performing training learning of age identification on the second deep learning model to obtain the predicted age of the object corresponding to the sample object image;
a fifth error calculation module, configured to calculate a fifth error between the predicted age and the age of the object corresponding to the sample object image based on a fifth loss function;
The third judging module is used for judging whether the fifth error meets a third preset condition or not;
the third model parameter adjustment module is used for adjusting the model parameters in the second deep learning model based on a gradient descent method when the result of the judgment of the third judgment module is negative, and repeating the training learning steps;
and the first target privacy attribute identification model determining module is used for taking the current second deep learning model as the target privacy attribute identification model when the result of the third judging module is yes.
In some embodiments, when the target privacy attribute is the gender of the object, the apparatus further comprises:
the sex label determining module is used for determining a sex label of the object corresponding to the sample object image;
the training learning module is used for taking the sample object image as the input of a third deep learning model, and performing training learning of sex identification on the third deep learning model to obtain the predicted sex of the object corresponding to the sample object image;
a fourth judging module, configured to judge whether the predicted gender and the gender label of the object corresponding to the sample object image are consistent;
The fourth model parameter adjustment module is used for adjusting the model parameters in the third deep learning model based on a gradient descent method when the result of the judgment of the fourth judgment module is negative, and repeating the training learning steps;
and the second target privacy attribute identification model determining module is used for taking the current third deep learning model as the target privacy attribute identification model when the judgment result of the fourth judging module is yes.
In some embodiments, the apparatus further comprises:
the object label determining module is used for determining an object label corresponding to the sample object image;
the training learning module is used for taking the sample object image as the input of a fourth deep learning model, and performing training learning of object recognition on the fourth deep learning model to obtain a predicted object corresponding to the sample object image;
a fifth judging module, configured to judge whether a predicted object corresponding to the sample object image is consistent with an object tag;
a fifth model parameter adjustment module, configured to adjust model parameters in the fourth deep learning model based on a gradient descent method when the result determined by the fifth determination module is negative, and repeat the training learning step;
And the object recognition model determining module is used for taking the current fourth deep learning model as the object recognition model when the judgment result of the fifth judging module is yes.
In some embodiments, when the target privacy attribute is privacy profile information of an object, the apparatus further comprises:
the privacy information determining module is used for determining privacy information corresponding to the sample object image;
the training learning module is used for taking the sample object image as the input of a fifth deep learning model, and carrying out training learning of the privacy information identification on the fifth deep learning model to obtain the predicted privacy information corresponding to the sample object image;
a sixth judging module, configured to judge whether the predicted privacy information corresponding to the sample object image is consistent with the privacy information;
a sixth model parameter adjustment module, configured to adjust model parameters in the fifth deep learning model based on a gradient descent method when the result determined by the sixth determination module is negative, and repeat the training learning step;
and the third target privacy attribute identification model determining module is used for taking the current fifth deep learning model as the target privacy attribute identification model when the result of the judgment of the sixth judging module is yes.
The device and method embodiments in the device embodiments described are based on the same application concept.
The embodiment of the application provides an image denoising processing device, which comprises a processor and a memory, wherein at least one instruction, at least one section of program, a code set or an instruction set is stored in the memory, and the at least one instruction, the at least one section of program, the code set or the instruction set is loaded and executed by the processor to realize the image denoising processing method provided by the embodiment of the method.
The memory may be used to store software programs and modules that the processor executes to perform various functional applications and data processing by executing the software programs and modules stored in the memory. The memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, application programs required for functions, and the like; the storage data area may store data created according to the use of the device, etc. In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory may also include a memory controller to provide access to the memory by the processor.
The method embodiments provided in the embodiments of the present application may be performed in a mobile terminal, a computer terminal, a server, or similar computing device. Taking the operation on the server as an example, fig. 8 is a block diagram of a hardware structure of the server of an image noise processing method according to an embodiment of the present application. As shown in fig. 8, the server 800 may vary considerably in configuration or performance and may include one or more central processing units (Central Processing Units, CPU) 810 (the processor 810 may include, but is not limited to, a microprocessor MCU or a processing device such as a programmable logic device FPGA), a memory 830 for storing data, one or more storage mediums 820 (e.g., one or more mass storage devices) for storing applications 823 or data 822. Wherein memory 830 and storage medium 820 can be transitory or persistent. The program stored on the storage medium 820 may include one or more modules, each of which may include a series of instruction operations on a server. Still further, the central processor 810 may be arranged to communicate with the storage medium 820 and to execute a series of instruction operations in the storage medium 820 on the server 800. The Server 800 may also include one or more power supplies 860, one or more wired or wireless network interfaces 850, one or more input/output interfaces 840, and/or one or more operating systems 821, such as Windows Server TM ,Mac OS X TM ,Unix TM LinuxTM, freeBSDTM, etc.
The input-output interface 840 may be used to receive or transmit data via a network. The specific example of the network described above may include a wireless network provided by a communication provider of the server 800. In one example, the input-output interface 840 includes a network adapter (Network Interface Controller, NIC) that may connect to other network devices through a base station to communicate with the internet. In one example, the input-output interface 840 may be a Radio Frequency (RF) module for communicating with the internet wirelessly.
It will be appreciated by those of ordinary skill in the art that the configuration shown in fig. 8 is merely illustrative and is not intended to limit the configuration of the electronic device described above. For example, server 800 may also include more or fewer components than shown in fig. 8, or have a different configuration than shown in fig. 8.
Embodiments of the present application also provide a storage medium that may be disposed in a server to store at least one instruction, at least one program, a code set, or an instruction set related to a method for implementing the method for noise-adding an image in the method embodiment, where the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by the processor to implement the method for noise-adding an image provided in the method embodiment.
Alternatively, in this embodiment, the storage medium may be located in at least one network server among a plurality of network servers of the computer network. Alternatively, in the present embodiment, the storage medium may include, but is not limited to: a U-disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing program codes.
According to the embodiment of the image noise adding processing method, device, server or storage medium, the random noise information is converted into the target noise image with the characteristics of removing the target privacy attribute needing to be kept secret based on the target noise image generation model, the target object image is subjected to noise adding based on the target noise image, the characteristics of removing the target privacy attribute needing to be kept secret can be ensured to be achieved on the basis of a certain similarity between the obtained noise adding image and the original target object image, and the safety problem of leakage of the target privacy attribute is avoided while the fact that different objects are accurately distinguished based on the image after noise adding is achieved.
It should be noted that: the foregoing sequence of the embodiments of the present application is only for describing, and does not represent the advantages and disadvantages of the embodiments. And the foregoing description has been directed to specific embodiments of this specification. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for apparatus, devices and storage medium embodiments, the description is relatively simple as it is substantially similar to method embodiments, with reference to the description of method embodiments in part.
Those of ordinary skill in the art will appreciate that all or a portion of the steps implementing the above embodiments may be implemented by hardware, or may be implemented by a program indicating that the relevant hardware is implemented, where the program may be stored on a computer readable storage medium, where the storage medium may be a read only memory, a magnetic disk or optical disk, etc.
The foregoing description of the preferred embodiments of the present application is not intended to limit the invention to the particular embodiments of the present application, but to limit the scope of the invention to the particular embodiments of the present application.

Claims (18)

1. A method for noise-adding an image, the method comprising:
acquiring random noise information and a target object image;
the random noise information is used as input of a target noise image generation model, and a target noise image is generated, wherein the target noise image is an image which has object classification performance and removes target privacy attributes of objects;
performing noise adding processing on the target object image based on the target noise image to obtain a noise added image of the target object image;
the target noise image generation model is a model obtained by performing constraint training of object image recognition on a first deep learning model, target privacy attribute removal on a target privacy attribute recognition model, object recognition on the object recognition model and image authenticity judgment on a judgment model by combining a sample object image when the image generation training of the generation model is performed on the basis of sample noise information;
The target noise image generation model is generated by adopting the following modes: acquiring sample noise information and a sample object image; taking the sample noise information as input of a generation model, and performing training learning of image generation on the generation model to obtain a first generation image; generating a second generated image based on the sample object image and the first generated image; taking the second generated image and the sample object image as input of a first deep learning model, taking the sample object image and the first generated image as input of a target privacy attribute identification model, and taking the sample object image and the first generated image as input of a target identification model, respectively carrying out training learning of object image identification, target privacy attribute removal and object identification on the first deep learning model, the target privacy attribute identification model and the target identification model to obtain a first error corresponding to the first deep learning model, a second error corresponding to the target privacy attribute identification model and a third error corresponding to the target identification model; judging whether the first error, the second error and the third error meet a first preset condition or not; when the judgment result is negative, adjusting model parameters in the generation model, the first deep learning model, the target privacy attribute identification model and the object identification model based on a gradient descent method, and repeating the training and learning steps; when the judgment result is yes, taking the current generation model as a primary training generation model; taking the sample noise information as the input of the initial training generation model, and performing training learning of image generation on the initial training generation model to obtain a third generated image; taking the third generated image and the sample object image as the input of a judging model, and performing training learning of image authenticity judgment on the judging model to obtain a fourth error corresponding to the judging model; judging whether the fourth error meets a second preset condition or not; when the judgment result is negative, adjusting model parameters in the generation model and the judgment model based on a gradient descent method, and repeating the training and learning steps; and when the judgment result is yes, taking the current generation model as the target noise image generation model.
2. The method of claim 1, wherein the denoising the target object image based on the target noise image comprises:
carrying out average processing on the feature vector corresponding to the target noise image and the feature vector corresponding to the target object image to obtain an average processed feature vector;
and performing deconvolution operation on the feature vector subjected to the average processing to obtain a noise-added image of the target object image.
3. The method according to claim 1, wherein the performing training learning of object image recognition, object privacy attribute removal, and object recognition on the first deep learning model, the object privacy attribute recognition model, and the object recognition model with the second generated image and the sample object image as input of a first deep learning model, the sample object image and the first generated image as input of a target privacy attribute recognition model, and the sample object image and the first generated image as input of an object recognition model, respectively, to obtain a first error corresponding to the first deep learning model, a second error corresponding to the target privacy attribute recognition model, and a third error corresponding to the object recognition model includes:
Taking the second generated image and the sample object image as input of a first deep learning model, and performing training learning of object image identification on the first deep learning model to obtain a training image which is a predicted value of the sample object image, wherein the training image comprises the second generated image and the sample object image;
calculating a first error between a predicted value of the training image as a sample object image and a sample label of the training image based on a first loss function, wherein the sample label corresponding to the training image represents the probability of the training image as the sample object image;
taking the sample object image and the first generated image as the input of a target privacy attribute identification model, and performing training learning of target privacy attribute removal on the target privacy attribute identification model to obtain a target privacy attribute predicted value corresponding to the sample object image and a target privacy attribute predicted value corresponding to the first generated image;
calculating a second error between a target privacy attribute predicted value corresponding to the sample object image and a target privacy attribute predicted value corresponding to the first generated image based on a second loss function;
Taking the sample object image and the first generated image as input of an object recognition model, and performing training learning of object recognition on the object recognition model to obtain a predicted value of an image corresponding to the same object as the sample object image and the first generated image;
and taking the predicted value as a third error.
4. The method according to claim 1, wherein the performing training learning of image authenticity determination on the determination model by using the third generated image and the sample object image as inputs of the determination model, and obtaining a fourth error corresponding to the determination model includes:
taking the third generated image and the sample object image as the input of a judging model, and performing training learning of image authenticity judgment on the judging model to obtain an authenticity predicted value of a training image, wherein the training image comprises the third generated image and the sample object image;
and calculating a fourth error between the real face predicted value of the training image and the sample label of the training image based on a fourth loss function, wherein the sample label corresponding to the training image represents the probability that the training image is a sample object image.
5. The method of claim 1, wherein when the target privacy attribute is the age of the subject, the method further comprises:
determining an age label of the object corresponding to the sample object image;
taking the sample object image as the input of a second deep learning model, and performing training learning of age identification on the second deep learning model to obtain the predicted age of the object corresponding to the sample object image;
calculating a fifth error between the predicted age and the age label of the object corresponding to the sample object image based on a fifth loss function;
judging whether the fifth error meets a third preset condition or not;
when the judgment result is negative, adjusting model parameters in the second deep learning model based on a gradient descent method, and repeating the training learning steps;
and when the judgment result is yes, taking the current second deep learning model as the target privacy attribute identification model.
6. The method of claim 1, wherein when the target privacy attribute is the gender of the subject, the method further comprises:
determining a sex label of an object corresponding to the sample object image;
taking the sample object image as the input of a third deep learning model, and performing training learning of gender identification on the third deep learning model to obtain the predicted gender of the object corresponding to the sample object image;
Judging whether the predicted gender and gender label of the object corresponding to the sample object image are consistent;
when the judgment result is negative, adjusting model parameters in the third deep learning model based on a gradient descent method, and repeating the training learning steps;
and when the judgment result is yes, taking the current third deep learning model as the target privacy attribute identification model.
7. The method of claim 1, wherein when the target privacy attribute is privacy profile information of an object, the method further comprises:
determining privacy information corresponding to the sample object image;
taking the sample object image as the input of a fifth deep learning model, and performing training learning of privacy information identification on the fifth deep learning model to obtain the predicted privacy information corresponding to the sample object image;
judging whether the sample object image corresponds to the predicted privacy information and the privacy information;
when the judgment result is negative, adjusting model parameters in the fifth deep learning model based on a gradient descent method, and repeating the training learning steps;
and when the judgment result is yes, taking the current fifth deep learning model as the target privacy attribute identification model.
8. The method according to claim 1, wherein the method further comprises:
determining an object label corresponding to the sample object image;
taking the sample object image as input of a fourth deep learning model, and performing training learning of object identification on the fourth deep learning model to obtain a predicted object corresponding to the sample object image;
judging whether a predicted object corresponding to the sample object image is consistent with an object label or not;
when the judgment result is negative, adjusting model parameters in the fourth deep learning model based on a gradient descent method, and repeating the training learning steps;
and when the judgment result is yes, taking the current fourth deep learning model as the object recognition model.
9. An apparatus for noise-adding processing an image, the apparatus comprising:
the data acquisition module is used for acquiring random noise information and a target object image;
a target noise image generation module, configured to generate a target noise image by using the random noise information as an input of a target noise image generation model, where the target noise image is an image that has object classification performance and removes a target privacy attribute of an object;
The noise adding processing module is used for adding noise to the target object image based on the target noise image to obtain a noise added image of the target object image;
the target noise image generation model is a model obtained by performing constraint training of object image recognition on a first deep learning model, target privacy attribute removal on a target privacy attribute recognition model, object recognition on the object recognition model and image authenticity judgment on a judgment model by combining a sample object image when the image generation training of the generation model is performed on the basis of sample noise information;
the target noise image generation model is generated based on the following modules: the training sample data acquisition module is used for acquiring sample noise information and sample object images; the first image generation module is used for taking the sample noise information as the input of a generation model, and performing training learning of image generation on the generation model to obtain a first generation image; a second generated image generation module for generating a second generated image based on the sample object image and the first generated image; the constraint training learning module is used for taking the second generated image and the sample object image as input of a first deep learning model, taking the sample object image and the first generated image as input of a target privacy attribute identification model, respectively carrying out training learning of object image identification, target privacy attribute removal and object identification on the first deep learning model, the target privacy attribute identification model and the object identification model by taking the sample object image and the first generated image as input of a target privacy attribute identification model, and obtaining a first error corresponding to the first deep learning model, a second error corresponding to the target privacy attribute identification model and a third error corresponding to the object identification model; the first judging module is used for judging whether the first error, the second error and the third error meet a first preset condition or not; the first model parameter adjustment module is used for adjusting model parameters in the generation model, the first deep learning model, the target privacy attribute identification model and the object identification model based on a gradient descent method when the judgment result of the first judgment module is negative, and repeating the training learning steps; the initial training generation model determining module is used for taking the current generation model as the initial training generation model when the first judging module judges that the result is yes; the third image generation module is used for taking the sample noise information as the input of the initial training generation model, and performing training learning of image generation on the initial training generation model to obtain a third generated image; the training learning module is used for taking the third generated image and the sample object image as the input of a judging model, and carrying out training learning of image authenticity judgment on the judging model to obtain a fourth error corresponding to the judging model; the second judging module is used for judging whether the fourth error meets a second preset condition or not; the second model parameter adjusting module is used for adjusting model parameters in the generating model and the judging model based on a gradient descent method when the judging result of the second judging module is negative, and repeating the training and learning steps; and the target noise image generation model determining module is used for taking the current generation model as the target noise image generation model when the second judging module judges that the result is yes.
10. The apparatus of claim 9, wherein the noise-adding processing module comprises:
the average processing module is used for carrying out average processing on the feature vector corresponding to the target noise image and the feature vector corresponding to the target object image to obtain an average processed feature vector;
and the deconvolution operation module is used for carrying out deconvolution operation on the feature vector after the average processing to obtain a noise-added image of the target object image.
11. The apparatus of claim 9, wherein the constraint training learning module comprises:
the training learning unit is used for taking the second generated image and the sample object image as input of a first deep learning model, performing training learning of object image identification on the first deep learning model, and obtaining a training image which is a predicted value of the sample object image, wherein the training image comprises the second generated image and the sample object image;
the first error calculation unit is used for calculating a first error between a predicted value of the training image serving as a sample object image and a sample label of the training image based on a first loss function, wherein the sample label corresponding to the training image represents the probability of the training image serving as the sample object image;
The training learning unit is used for taking the sample object image and the first generated image as the input of a target privacy attribute identification model, and performing training learning of target privacy attribute removal on the target privacy attribute identification model to obtain a target privacy attribute predicted value corresponding to the sample object image and a target privacy attribute predicted value corresponding to the first generated image;
a second error calculation unit, configured to calculate a second error between a target privacy attribute predicted value corresponding to the sample object image and a target privacy attribute predicted value corresponding to the first generated image based on a second loss function;
the training learning module is used for taking the sample object image and the first generated image as input of an object recognition model, and performing training learning of object recognition on the object recognition model to obtain a predicted value of an image corresponding to the same object as the sample object image and the first generated image;
and the second error determining unit is used for taking the predicted value as a third error.
12. The apparatus of claim 9, wherein the training learning module of the image authenticity determination comprises:
The training learning unit is used for taking the third generated image and the sample object image as the input of a judging model, performing training learning of image authenticity judgment on the judging model, and obtaining an authenticity predicted value of a training image, wherein the training image comprises the third generated image and the sample object image;
and the fourth error calculation unit is used for calculating a fourth error between the real face predicted value of the training image and the sample label of the training image based on a fourth loss function, and the sample label corresponding to the training image represents the probability that the training image is a sample object image.
13. The apparatus of claim 9, wherein when the target privacy attribute is the age of the subject, the apparatus further comprises:
the age determining module is used for determining the age of the object corresponding to the sample object image;
the training learning module is used for taking the sample object image as the input of a second deep learning model, and performing training learning of age identification on the second deep learning model to obtain the predicted age of the object corresponding to the sample object image;
A fifth error calculation module, configured to calculate a fifth error between the predicted age and the age of the object corresponding to the sample object image based on a fifth loss function;
the third judging module is used for judging whether the fifth error meets a third preset condition or not;
the third model parameter adjustment module is used for adjusting the model parameters in the second deep learning model based on a gradient descent method when the result of the judgment of the third judgment module is negative, and repeating the training learning steps;
and the first target privacy attribute identification model determining module is used for taking the current second deep learning model as the target privacy attribute identification model when the result of the third judging module is yes.
14. The apparatus of claim 9, wherein when the target privacy attribute is the gender of the subject, the apparatus further comprises:
the sex label determining module is used for determining a sex label of the object corresponding to the sample object image;
the training learning module is used for taking the sample object image as the input of a third deep learning model, and performing training learning of sex identification on the third deep learning model to obtain the predicted sex of the object corresponding to the sample object image;
A fourth judging module, configured to judge whether the predicted gender and the gender label of the object corresponding to the sample object image are consistent;
the fourth model parameter adjustment module is used for adjusting the model parameters in the third deep learning model based on a gradient descent method when the result of the judgment of the fourth judgment module is negative, and repeating the training learning steps;
and the second target privacy attribute identification model determining module is used for taking the current third deep learning model as the target privacy attribute identification model when the judgment result of the fourth judging module is yes.
15. The apparatus of claim 9, wherein the apparatus further comprises:
the object label determining module is used for determining an object label corresponding to the sample object image;
the training learning module is used for taking the sample object image as the input of a fourth deep learning model, and performing training learning of object recognition on the fourth deep learning model to obtain a predicted object corresponding to the sample object image;
a fifth judging module, configured to judge whether a predicted object corresponding to the sample object image is consistent with an object tag;
A fifth model parameter adjustment module, configured to adjust model parameters in the fourth deep learning model based on a gradient descent method when the result determined by the fifth determination module is negative, and repeat the training learning step;
and the object recognition model determining module is used for taking the current fourth deep learning model as the object recognition model when the judgment result of the fifth judging module is yes.
16. The apparatus of claim 9, wherein when the target privacy attribute is privacy profile information of an object, the apparatus further comprises:
the privacy information determining module is used for determining privacy information corresponding to the sample object image;
the training learning module is used for taking the sample object image as the input of a fifth deep learning model, and carrying out training learning of the privacy information identification on the fifth deep learning model to obtain the predicted privacy information corresponding to the sample object image;
a sixth judging module, configured to judge whether the predicted privacy information corresponding to the sample object image is consistent with the privacy information;
a sixth model parameter adjustment module, configured to adjust model parameters in the fifth deep learning model based on a gradient descent method when the result determined by the sixth determination module is negative, and repeat the training learning step;
And the third target privacy attribute identification model determining module is used for taking the current fifth deep learning model as the target privacy attribute identification model when the result of the judgment of the sixth judging module is yes.
17. An apparatus for noise-adding an image, characterized in that the apparatus comprises a processor and a memory, in which at least one instruction, at least one program, a set of codes or a set of instructions is stored, which is loaded and executed by the processor to implement the method for noise-adding an image according to any one of claims 1 to 8.
18. A computer readable storage medium having stored therein at least one instruction, at least one program, code set, or instruction set, the at least one instruction, the at least one program, the code set, or instruction set being loaded and executed by a processor to implement the method of denoising an image according to any one of claims 1 to 8.
HK42020010279.6A 2020-07-01 Image noise processing method and device HK40020283B (en)

Publications (2)

Publication Number Publication Date
HK40020283A HK40020283A (en) 2020-10-23
HK40020283B true HK40020283B (en) 2023-09-08

Family

ID=

Similar Documents

Publication Publication Date Title
CN110648289B (en) Image noise adding processing method and device
US11443772B2 (en) Method for triggering events in a video
CN107679490B (en) Method and apparatus for detection image quality
CN111291841B (en) Image recognition model training method and device, computer equipment and storage medium
CN110147744B (en) Face image quality assessment method, device and terminal
CN106803055B (en) Face identification method and device
CN109446889B (en) Object tracking method and device based on twin matching network
CN108288051B (en) Pedestrian re-recognition model training method and device, electronic equipment and storage medium
CN110765882B (en) Video tag determination method, device, server and storage medium
CN107798354B (en) Image clustering method and device based on face image and storage equipment
CN111598038B (en) Facial feature point detection method, device, equipment and storage medium
CN107330904A (en) Image processing method, image processing device, electronic equipment and storage medium
CN110866469B (en) Facial five sense organs identification method, device, equipment and medium
CN109063584B (en) Facial feature point location method, device, equipment and medium based on cascade regression
CN114399424B (en) Model training methods and related equipment
CN110809768B (en) Data cleansing system and method
CN111783997B (en) Data processing method, device and equipment
CN113254491A (en) Information recommendation method and device, computer equipment and storage medium
CN113095333A (en) Unsupervised feature point detection method and unsupervised feature point detection device
EP3410389A1 (en) Image processing method and device
CN114387656B (en) Face-changing method, device, equipment and storage medium based on artificial intelligence
CN114549728B (en) Image processing model training method, image processing method, device and medium
US20190311216A1 (en) Image processing device, image processing method, and image processing program
TW202514551A (en) Network training method for pose estimation, pose estimation method, electronic equipment and computer-readable storage medium
WO2023124869A1 (en) Liveness detection method, device and apparatus, and storage medium
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载