Search

CN-117121048-B - Image processing method and device, electronic equipment and storage medium

CN117121048BCN 117121048 BCN117121048 BCN 117121048BCN-117121048-B

Abstract

A privacy-preserving image processing method, device, electronic equipment and storage medium, the method comprises the steps of obtaining a preprocessed image to conduct feature extraction on the preprocessed image to obtain a first feature vector (S10), generating a noise image according to the preprocessed image to conduct feature extraction on the noise image to obtain a second feature vector (S20), establishing a loss function according to structural similarity of the preprocessed image and the noise image (S30), processing the noise image by the loss function to obtain a fuzzy image (S40), and replacing the preprocessed image by the fuzzy image (S50).

Inventors

  • FU YANYAN

Assignees

  • 深圳市欢太科技有限公司
  • OPPO广东移动通信有限公司

Dates

Publication Date
20260505
Application Date
20210406

Claims (20)

  1. 1. A privacy-preserving image processing method, comprising: Acquiring a preprocessed image to perform feature extraction on the preprocessed image to obtain a first feature vector; Generating a noise image according to the preprocessed image so as to perform feature extraction on the noise image to obtain a second feature vector; establishing a loss function according to the structural dissimilarity or structural similarity of the preprocessed image and the noise image, wherein the first characteristic vector and the second characteristic vector are used for generating a loss function; processing the noise image by using the loss function to obtain a blurred image; Replacing the preprocessed image with the blurred image.
  2. 2. The image processing method according to claim 1, wherein the acquiring the preprocessed image includes: And carrying out face detection on the scene image comprising the face features to obtain a face area, and determining the face area as the preprocessing image.
  3. 3. The image processing method according to claim 2, characterized in that the image processing method further comprises: and carrying out face recognition on the preprocessed image so as to authenticate the face.
  4. 4. The image processing method according to claim 2, wherein the performing face detection on the scene image to obtain a face area, and determining the face area as the preprocessed image further comprises: Performing size transformation on the face area to transform the original first size into a second size so as to obtain the preprocessed image; the replacing the preprocessed image with the blurred image comprises: And transforming the size of the blurred image into the first size to replace the face area corresponding to the preprocessed image.
  5. 5. The image processing method according to claim 4, wherein the noise image is a random noise image, and the size of the noise image is the second size.
  6. 6. The image processing method according to claim 1, wherein the establishing the loss function by the first feature vector and the second feature vector according to a structural dissimilarity or a structural similarity of the preprocessed image and the noise image includes: establishing a first loss function To determine the loss function and to minimize the first loss function to obtain the blurred image, wherein SSIM is structural similarity, T2 is intermediate iterative image, T0 is the preprocessed image, E2 is the second eigenvector, E0 is the first eigenvector, Is a penalty term.
  7. 7. The image processing method according to claim 6, characterized in that the image processing method further comprises: Establishing a second loss function , wherein, For the function label, For the predicted probability, n is the number of samples, and the label is label=1 if the Euclidean distance between the protection image and the scene image is smaller than a preset threshold value; A first integrated loss function is minimized to obtain the blurred image, the first integrated loss function including the second loss function and the first loss function.
  8. 8. The image processing method according to claim 1, wherein the processing the noise image with the loss function to obtain the blurred image further comprises: establishing a third loss function To determine the loss function and to minimize the third loss function to obtain the blurred image, wherein SSIM is structural similarity, T2 is intermediate iterative image, T0 is the pre-processed image, cos For cosine distance, λ is the penalty term.
  9. 9. The image processing method according to claim 8, characterized in that the image processing method further comprises: Establishing a second loss function , wherein, For the function label, For the predicted probability, n is the number of samples, and the label is label=1 if the Euclidean distance between the protection image and the scene image is smaller than a preset threshold value; a second integrated loss function is minimized to obtain the blurred image, the second integrated loss function including the second loss function and the third loss function.
  10. 10. A privacy-preserving image processing apparatus, comprising: The acquisition module is used for acquiring a preprocessed image so as to perform feature extraction on the preprocessed image to obtain a first feature vector; the generation module is used for generating a noise image to perform feature extraction on the noise image to obtain a second feature vector, and the noise image corresponds to the preprocessing image; the processing module is used for establishing a loss function according to the structural similarity of the preprocessed image and the noise image, and the first characteristic vector and the second characteristic vector; the blurring module is used for processing the noise image by utilizing the loss function to obtain a blurred image; And the replacing module is used for replacing the preprocessed image by the blurred image.
  11. 11. The image processing apparatus of claim 10, wherein the acquisition module comprises: The extraction unit is used for carrying out face detection on the scene image comprising the face features to obtain a face area, and determining the face area as the preprocessing image.
  12. 12. The image processing apparatus according to claim 11, characterized in that the image processing apparatus further comprises: And the identification module is used for carrying out face identification on the preprocessed image so as to authenticate the face.
  13. 13. The image processing apparatus according to claim 11, wherein the extracting unit further comprises: A size transformation subunit, configured to perform size transformation on the face area to transform an original first size into a second size to obtain the preprocessed image; the replacement module includes: and the size replacing unit is used for converting the size of the blurred image into the first size so as to replace the face area corresponding to the preprocessed image.
  14. 14. The image processing apparatus according to claim 13, wherein the noise image is a random noise image, and a size of the noise image is the second size.
  15. 15. The image processing apparatus of claim 10, wherein the processing module comprises: A first loss function unit for establishing an optimized first loss function Determining the loss function and minimizing the loss function to minimize the first loss function to obtain the blurred image, wherein SSIM is structural similarity, T2 is an intermediate iteration image, T0 is the preprocessed image, E2 is the second feature vector, E0 is the first feature vector, and lambda is a punishment term.
  16. 16. The image processing apparatus according to claim 15, wherein the image processing apparatus further comprises: a first comprehensive loss function module for establishing a second loss function , wherein, For the function label, For the predicted probability, n is the number of samples, the label is label=1 if the Euclidean distance between the protection image and the scene image is smaller than a preset threshold value, and A first integrated loss function is minimized to obtain the blurred image, the first integrated loss function including the second loss function and the first loss function.
  17. 17. The image processing apparatus of claim 10, wherein the processing module further comprises: a third loss function unit for establishing a third loss function To determine the loss function and to minimize the third loss function to obtain the blurred image, wherein SSIM is structural similarity, T2 is intermediate iterative image, T0 is the pre-processed image, cos For cosine distance, λ is the penalty term.
  18. 18. The image processing apparatus according to claim 17, wherein the image processing apparatus further comprises: a second comprehensive loss function module for establishing a second loss function , wherein, For the function label, For the predicted probability, n is the number of samples, the label is label=1 if the Euclidean distance between the protection image and the scene image is smaller than a preset threshold value, and A second integrated loss function is minimized to obtain the blurred image, the second integrated loss function including the second loss function and the third loss function.
  19. 19. An electronic device comprising a memory and a processor, the memory having stored therein a computer program which, when executed by the processor, implements the image processing method of any of claims 1-9.
  20. 20. A non-transitory computer readable storage medium containing a computer program, characterized in that the image processing method of any of claims 1-9 is implemented when the computer program is executed by one or more processors.

Description

Image processing method and device, electronic equipment and storage medium Technical Field The present application relates to the field of image technology, and in particular, to an image processing method, an image processing apparatus, an electronic device, and a storage medium for privacy protection. Background With the advent of the artificial intelligence era, face information has been increasingly applied or collected in real life, such as face recognition, video monitoring, and the like. However, in these applications, if the face information is not effectively protected, privacy disclosure may be caused to infringe privacy rights and portrait rights. In the prior art, some picture processing modes such as scrambling, blurring and covering are adopted to protect personal identity information, but the processing modes are not beneficial to subsequent business applications such as face recognition and authentication. Still other methods use traditional encryption methods to encrypt or encrypt private content in the transform domain, but such methods have the risk of unauthorized decryption due to the encryption and decryption keys. Disclosure of Invention The embodiment of the application provides an image processing method, an image processing device, an electronic device and a storage medium for privacy protection. The image processing method for privacy protection comprises the steps of obtaining a preprocessed image to conduct feature extraction on the preprocessed image to obtain a first feature vector, generating a noise image according to the preprocessed image to conduct feature extraction on the noise image to obtain a second feature vector, building a loss function according to structural similarity of the preprocessed image and the noise image, processing the noise image by the loss function to obtain a fuzzy image, and replacing the preprocessed image by the fuzzy image. The image processing device for privacy protection comprises an acquisition module, a generation module, a processing module and a blurring module, wherein the acquisition module is used for acquiring a preprocessed image to conduct feature extraction on the preprocessed image to obtain a first feature vector, the generation module is used for generating a noise image to conduct feature extraction on the noise image to obtain a second feature vector, the noise image corresponds to the preprocessed image, the processing module is used for establishing the loss function according to the structural similarity of the preprocessed image and the noise image, the first feature vector and the second feature vector are used for establishing the loss function, the blurring module is used for processing the noise image by using the loss function to obtain a blurred image, and the substitution module is used for substituting the blurred image for the preprocessed image. The electronic device according to the embodiment of the application comprises a memory and a processor, wherein the memory stores a computer program, and the computer program realizes the image processing method when being executed by the processor. A non-transitory computer-readable storage medium of a computer program according to an embodiment of the present application is characterized in that the above-described image processing method is implemented when the computer program is executed by one or more processors. Additional aspects and advantages of embodiments of the application will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the application. Drawings The foregoing and/or additional aspects and advantages of the present application will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings, in which: fig. 1 is a flow chart of an image processing method according to an embodiment of the present application; FIG. 2 is a flow chart of an image processing method according to an embodiment of the present application; FIG. 3 is a flow chart of an image processing method according to an embodiment of the present application; FIG. 4 is a flow chart of an image processing method according to an embodiment of the present application; FIG. 5 is a flow chart of an image processing method according to an embodiment of the present application; FIG. 6 is a flow chart of an image processing method according to an embodiment of the present application; Fig. 7 is a flowchart of an image processing method according to an embodiment of the present application; fig. 8 is a flow chart of an image processing method according to an embodiment of the present application; Fig. 9 is a block diagram of an image processing apparatus according to an embodiment of the present application; fig. 10 is a block diagram of an image processing apparatus according to an embodiment of the present application; Fig. 11