An anti-face recognition method and system based on adversarial attack
The anti-face recognition method is optimized through sparse adversarial attack, perceptual color difference constraints and smooth shearing technology, which solves the problem of insufficient optimization of perturbation position and intensity in the existing technology, achieves the imperceptibility and high efficiency of adversarial perturbation, and protects Face identity privacy.
Patent Information
- Application Number
- CN202111077702.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-14
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2041-09-14
AI Technical Summary
Existing anti-face recognition methods have deficiencies in the optimization of perturbation location and intensity, which results in the deep neural network model being potentially deceived, and traditional adversarial perturbations are easy to identify and cannot effectively protect facial identity privacy.
Using sparse adversarial attack, perceptual color difference constraint and smooth shearing technology, the perturbation position and constraint intensity are determined through sparse adversarial attacks, perceptual color difference is used to replace the norm constraint, and the perturbation image is generated in combination with the smooth shearing function to ensure that the disturbance is undetectable.
It is possible to add adversarial perturbations to the user's face image, effectively protecting the image from being recognized by unauthorized face recognition models, while minimizing the subjective perception effect and enhancing the invisibility and smoothness of the perturbation.
Smart Images

Figure CN113869152B
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of artificial intelligence security technology, and relates to a face privacy protection method and system, and specifically to an anti-face recognition method and system based on adversarial attacks. Technical Background
[0002] With the advent of the big data era, the networking and transparency of personal data has become an irresistible trend. Anyone who masters the relevant technology can collect data through the Internet without our knowledge to build a high-precision face recognition model and use it to confirm people's identities. Citizens' personal privacy is seriously threatened, and we urgently need effective technical means to protect people's face identity privacy data.
[0003] Most of the face images generated by current anti-face recognition methods produce unnatural distortions, which are limited in practicality and effectiveness. The adversarial attack-based method achieves the effect of anti-face recognition by adding imperceptible adversarial perturbations to the user's facial image. When users want to share photos on social media or public networks, they can make subtle modifications to the images that are invisible to the human eye before uploading them. If these photos are collected by unauthorized third-party trackers and used to train face recognition models to identify users, these subtle modifications will cause model recognition errors.
[0004] However, the existing anti-face recognition schemes based on the adversarial attack principle still have the following serious defects:
[0005] (1) Existing adversarial attack methods generally assume that all pixels are perturbed and optimize the perturbation intensity to make it invisible to the human eye. In fact, if only some pixels in an image are perturbed, the deep neural network model may be deceived.
[0006] (2) Existing adversarial attack methods mainly ensure the imperceptibility of perturbations by strictly limiting the norm size of the perturbations. However, the necessary condition for imperceptibility is not necessarily a perturbation with a small norm size, but is also related to the invisibility of image changes.
[0007] (3) The high-frequency structure of traditional adversarial perturbations can be easily exploited by many explicit and implicit methods to mitigate the adversarial effect, while smooth adversarial perturbations are more easily hidden in the original image, but traditional shearing functions will reduce the smoothness of the perturbations. Summary of the invention
[0008] In view of the above problems, the present invention optimizes the anti-face recognition method from the perspectives of sparse adversarial attack, perceptual chromatic aberration constraint and smooth shearing, and proposes an anti-face recognition method and system based on adversarial attack.
[0009] The technical solution adopted by the method of the present invention is: an anti-face recognition method based on adversarial attack, comprising the following steps:
[0010] Step 1: Add perturbations to the original image, including determining the perturbation position of the sparse adversarial attack and constraining the perturbation intensity;
[0011] The perturbation position of the sparse adversarial attack is determined, and the specific implementation includes the following sub-steps:
[0012] Step A1: Decompose the perturbation of a single pixel into two features: perturbation intensity and perturbation position. Use the dot product between a continuous perturbation intensity vector δ and a binary selection factor G to represent the perturbation r, thereby converting the sparse adversarial attack problem into a mixed integer programming problem.
[0013] Step A2: Replace the binary constraint on the binary selection factor G with a box constraint and an l 2 Spherical constraint, using two additional variables Y 1 and Y 2 Decompose the box and sphere constraints on G;
[0014] Step A3: Initialize G = 1, keep G unchanged, and update δ by gradient descent method;
[0015] Step A4: Keep δ unchanged, add dual variables to transform the loss function into augmented Lagrangian form, and first update Y by calculating the optimal solution 1 and Y 2 , then update G by gradient descent, and finally update the dual variable;
[0016] Step A5: Repeat steps A4 and A5 until the loss function converges, and the position corresponding to the convergence is the perturbation position;
[0017] The constraint disturbance strength is specifically implemented by the following sub-steps:
[0018] Step B1: Calculate the perceived color difference between the perturbed image and the original image;
[0019] Step B2: Use perceptual color difference instead of norm constraint as the regularization term of the loss function, and optimize the intensity of the disturbance through back propagation until the loss function converges. The corresponding disturbance intensity at convergence is the disturbance intensity added to the disturbance position;
[0020] Step 2: Smoothly shear the perturbed image to obtain the final perturbed image;
[0021] The specific implementation includes the following sub-steps:
[0022] Step 2.1: When the range of x+r exceeds the valid range, calculate the mask m separately0 and m 1 As an indicator of pixels that exceed the validity limit; where x is the image and r is the perturbation calculated in each iteration;
[0023] Step 2.2: Combined with the neighborhood correlation of the perturbation, a low-pass filter g is used to propagate the out-of-bounds error to the neighborhood perturbation;
[0024] Step 2.3: Adjust the perturbation r using the step size ∈ and the maximum value of the out-of-bounds error;
[0025] Step 2.4: Repeat steps 2.1-2.3 until all pixels in x+r are within the valid range of the input domain.
[0026] The technical solution adopted by the system of the present invention is: an anti-face recognition system based on adversarial attack, comprising the following modules:
[0027] Module 1 is used to add perturbations to the original image, including determining the perturbation position of sparse adversarial attacks and constraining the perturbation intensity;
[0028] The perturbation position of the sparse adversarial attack is determined, and the specific implementation includes the following sub-steps:
[0029] Step A1: Decompose the perturbation of a single pixel into two features: perturbation intensity and perturbation position. Use the dot product between a continuous perturbation intensity vector δ and a binary selection factor G to represent the perturbation r, thereby converting the sparse adversarial attack problem into a mixed integer programming problem.
[0030] Step A2: Replace the binary constraint on the binary selection factor G with a box constraint and an l 2 Spherical constraint, using two additional variables Y 1 and Y 2 Decompose the box and sphere constraints on G;
[0031] Step A3: Initialize G = 1, keep G unchanged, and update δ by gradient descent method;
[0032] Step A4: Keep δ unchanged, add dual variables to transform the loss function into augmented Lagrangian form, and first update Y by calculating the optimal solution 1 and Y 2 , then update G by gradient descent, and finally update the dual variable;
[0033] Step A5: Repeat steps A4 and A5 until the loss function converges, and the position corresponding to the convergence is the perturbation position;
[0034] The constraint disturbance strength is specifically implemented by the following sub-steps:
[0035] Step B1: Calculate the perceived color difference between the perturbed image and the original image;
[0036] Step B2: Use perceptual color difference instead of norm constraint as the regularization term of the loss function, and optimize the intensity of the disturbance through back propagation until the loss function converges. The corresponding disturbance intensity at convergence is the disturbance intensity added to the disturbance position;
[0037] Module 2, used for smoothing and shearing the disturbed image to obtain the final disturbed image;
[0038] The specific implementation includes the following sub-steps:
[0039] Step 2.1: When the range of x+r exceeds the valid range, calculate the mask m separately 0 and m 1 As an indicator of pixels that exceed the validity limit; where x is the image and r is the perturbation calculated in each iteration;
[0040] Step 2.2: Combined with the neighborhood correlation of the perturbation, a low-pass filter g is used to propagate the out-of-bounds error to the neighborhood perturbation;
[0041] Step 2.3: Adjust the perturbation r using the step size ∈ and the maximum value of the out-of-bounds error;
[0042] Step 2.4: Repeat steps 2.1-2.3 until all pixels in x+r are within the valid range of the input domain.
[0043] The present invention adds adversarial perturbations to the user's face image, effectively protecting the user's image from being recognized by unauthorized face recognition models while enhancing the imperceptibility of the perturbations. Compared with existing anti-face recognition attack methods, the present invention has the following advantages and positive effects:
[0044] 1) Compared with dense adversarial attacks, the sparse adversarial attacks used in the present invention require less perturbations, thus minimizing the subjective perception effect.
[0045] 2) The present invention uses perceptual color difference instead of norm to limit the intensity of disturbance, and enhances the strength of adversarial effects by adding disturbance while still ensuring the invisibility of disturbance.
[0046] 3) The present invention adopts a smooth shearing function to shear the disturbance image, which can obtain better disturbance smoothness than the traditional method. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 : A flow chart of a method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0048] In order to facilitate ordinary technicians in this field to understand and implement the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and implementation cases. It should be understood that the implementation examples described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.
[0049] Existing adversarial attack methods mainly focus on optimizing the intensity of disturbances, but ignore the impact on the location of disturbances. The present invention decomposes the disturbance at each pixel in the image into the product of the disturbance intensity and the binary selection factor, and determines the location of the disturbance by jointly optimizing the disturbance intensity and the disturbance selection factor.
[0050] Since the color in the RGB space perceived by the human eye does not change uniformly with distance, the perceived color perturbation is less likely to be detected by the human eye, especially in the color saturated area. The perceived color difference can effectively hide the stronger perturbation in the RGB space, so the present invention uses the perceived color difference as a regularization term to constrain the perturbation intensity.
[0051] The traditional shearing function will truncate each pixel separately, resulting in the loss of local correlation between neighborhoods. The present invention proposes a smooth shearing function to shear the disturbed image.
[0052] Based on the above principles, the present invention proposes an anti-face recognition method based on adversarial attack, see Figure 1 , specifically including the following steps:
[0053] Step 1: Add perturbations to the original image, including determining the perturbation position of the sparse adversarial attack and constraining the perturbation intensity;
[0054] In this embodiment, the perturbation position of the sparse adversarial attack is determined, and the specific implementation includes the following sub-steps:
[0055] Step A1: Decompose the perturbation r into the dot product of a perturbation intensity vector δ and a binary selection factor G, so that the loss function of sparse adversarial attack is:
[0056]
[0057] Among them, f:x→y represents the classification model, x represents the original image, y is its true value label, f(x) represents the posterior vector; f(x+δ⊙G) represents the label obtained by inputting the perturbed image into the classification model. If y t =y, it is an untargeted attack, and the loss function L is set to the negative cross entropy loss function; if y t ≠y, it is a targeted attack, and the loss function L is set to the cross entropy loss function; p can be assigned different values according to the attacker's requirements, indicating the calculation of the perturbation l p norm; λ 1>0 is a trade-off parameter; N is the total number of pixels in the image; cardinality constraint 1 T G = k means that only k < N pixels are perturbed; because δ is a continuous value and G is an integer, the sparse adversarial attack optimization problem is transformed into a mixed integer programming optimization problem;
[0058] Step A2: Replace the binary constraints on G as follows:
[0059]
[0060] Where S b =[0,1] 2 is a box constraint, is a l 2 Sphere constraint;
[0061] The loss function is rewritten as:
[0062]
[0063] Among them, Y 1 and Y 2 are two additional variables used to decompose the box and sphere constraints on G;
[0064] Step A3: Given G, update δ by gradient descent, namely:
[0065]
[0066] Among them, η δ represents the learning rate for updating δ;
[0067] Step A4: Given δ, update G according to the ADMM algorithm;
[0068] First, calculate the augmented Lagrangian function of the loss function in step A2:
[0069]
[0070] Among them, Y 1 and Y 2 are two additional variables used to decompose the box and sphere constraints on G; Z 1 ∈R N , Z 2 ∈R N , z 3 ∈R,(ρ 1 ,ρ 2 ,ρ 3 ) is a positive penalty parameter, and It is an indicator function. When the independent variable value is true, the function value is 0; when the independent variable value is false, the function value is +∞. It follows the regular process of the ADMM algorithm to update the original variable and the dual variable.
[0071] Update Y 1 :
[0072]
[0073] Since the objective function in the above formula is a convex function, the box-type constraint S b It is also a convex function, and the optimal solution is:
[0074]
[0075] in, a∈R n Represents the projection on the box constraint, R n is a set of n-dimensional real vectors;
[0076] Next, update Y 2 :
[0077]
[0078] Y 2 The optimal solution is:
[0079]
[0080] in, b∈R n Indicates that the projection is on l 2 On the sphere constraint;
[0081] Then, update G using gradient descent:
[0082]
[0083]
[0084] Among them, η G Represents the learning rate for updating G;
[0085] Finally, update the dual variable:
[0086] Z 1 ←Z 1 +ρ 1 (GZ 1 );
[0087] Z 2 ←Z 2 +ρ 2 (GZ 2 );
[0088] z 3 ←z 3 +ρ 3 (GZ 3 );
[0089] Step A5: Repeat steps A3-A4 until the loss function converges.
[0090] This embodiment constrains the disturbance intensity and uses perceptual color difference instead Norm constraint perturbation intensity; the specific implementation includes the following sub-steps:
[0091] Step B1: Calculate the perceived color difference between the perturbed image and the original image. The calculation formula is as follows:
[0092]
[0093] Where x is the image, r is the perturbation calculated in each iteration; ΔL, ΔC, and ΔH represent the distances between pixels in the three channels of brightness L, saturation C, and hue H in the CIELCH color space, respectively; S L , S C , S H are the weight functions of brightness, saturation and hue, respectively, R T is the interaction term between saturation difference and hue difference, which is used to improve the performance of blue. They are determined through a large number of experiments to simulate human perception of color; k L , k C , k H There are three constant parameters, and their values are defined according to different measurement objects or color quality requirements. Generally, they can be set to 1. The training data set is classified according to the corresponding label type.
[0094] Step B2: Use the perceptual color difference to constrain the perturbation intensity and obtain a new loss function:
[0095] min δ,G ΔE 00 (x+r,x)+λ 1 L(f(x+δ⊙G),y t ),st1 T G=k,G∈{0,1} N ;
[0096] The loss function is iteratively optimized according to the method in steps A1-A5 until the loss function converges.
[0097] Step 2: Smoothly shear the perturbed image to obtain the final perturbed image;
[0098] The specific implementation includes the following sub-steps:
[0099] Step 2.1: When the range of x+r exceeds the valid range, calculate the mask m separately 0 and m 1 as an indicator of pixels that exceed validity limits;
[0100] m 0 =I 0 (-(x+r));
[0101] m 1 =I 0 ((x+r)-1);
[0102] Where x is the image, r is the perturbation calculated in each iteration; I 0 is an indicator function that outputs 1 for elements greater than zero;
[0103] Step 2.2: Combined with the neighborhood correlation of the perturbation, a low-pass filter g is used to propagate the out-of-bounds error to the neighborhood perturbation, that is:
[0104] m 0 ←m 0 *g;
[0105] m 1 ←m 1 *g;
[0106] Step 2.3: Adjust the perturbation r using the step size ∈ and the maximum value of the out-of-bounds error, that is:
[0107] r←r-∈max(x+r-1)m 1 +∈min(x+r)m 0 ;
[0108] Step 2.4: Repeat steps 2.1-2.3 until all pixels in x+r are within the valid range of the input domain.
[0109] The present invention includes the determination of disturbance position, the constraint of disturbance intensity and the smooth shearing of disturbance image. In the process of determining the disturbance position, the disturbance of a single pixel is decomposed into two features, intensity and position, so as to transform the sparse adversarial attack problem into a mixed integer programming problem. The disturbance position is determined by jointly optimizing the continuous disturbance intensity and the binary selection factor of the disturbance. In the process of constraining the disturbance intensity, the perceptual color difference is used instead of l pThe strength of the norm-constrained perturbation is enhanced by generating additional perturbations while ensuring the imperceptibility of the perturbation. In the process of smoothly shearing the perturbed image, a smooth shearing function is used instead of a traditional shearing function to shear the perturbed image, so that the generated adversarial perturbation is smoother. By adding adversarial perturbations to the user's face image, the present invention can effectively protect the face image from being recognized by an unauthorized face recognition model while ensuring that the perturbation is imperceptible, thereby protecting the privacy of the face identity information.
[0110] It should be understood that the above description of the preferred embodiment is relatively detailed and cannot be regarded as limiting the scope of patent protection of the present invention. Under the enlightenment of the present invention, ordinary technicians in this field can also make substitutions or modifications without departing from the scope of protection of the claims of the present invention, which all fall within the scope of protection of the present invention. The scope of protection requested for the present invention shall be based on the attached claims.
Claims
1. An anti-face recognition method based on adversarial attack, It is characterized in that The following steps are involved: Step 1: Add perturbations to the original image, including determining the perturbation position of the sparse adversarial attack and constraining the perturbation intensity; The perturbation position of the sparse adversarial attack is determined, and the specific implementation includes the following sub-steps: Step A1: Decompose the perturbation of a single pixel into two features: perturbation intensity and perturbation position. Use the dot product between a continuous perturbation intensity vector δ and a binary selection factor G to represent the perturbation r, thereby converting the sparse adversarial attack problem into a mixed integer programming problem. Step A2: Replace the binary constraint on the binary selection factor G with a box constraint and an l 2 Spherical constraint, using two additional variables Y 1 and Y 2 Decompose the box and sphere constraints on G; Step A3: Initialize G = 1, keep G unchanged, and update δ by gradient descent method; Step A4: Keep δ unchanged, add dual variables to transform the loss function into augmented Lagrangian form, and first update Y by calculating the optimal solution 1 and Y 2 , then update G by gradient descent, and finally update the dual variable; Step A5: Repeat steps A4 and A5 until the loss function converges, and the position corresponding to the convergence is the perturbation position; The constraint disturbance strength is specifically implemented by the following sub-steps: Step B1: Calculate the perceived color difference between the perturbed image and the original image; Step B2: Use perceptual color difference instead of norm constraint as the regularization term of the loss function, and optimize the intensity of the disturbance through back propagation until the loss function converges. The disturbance intensity corresponding to the convergence is the disturbance intensity added to the disturbance position; Step 2: Smoothly shear the perturbed image to obtain the final perturbed image; The specific implementation includes the following sub-steps: Step 2.1: When the range of x+r exceeds the valid range, calculate the mask m separately 0 and m 1 As an indicator of pixels that exceed the validity limit; where x is the image and r is the perturbation calculated in each iteration; Step 2.2: Combined with the neighborhood correlation of the perturbation, a low-pass filter g is used to propagate the out-of-bounds error to the neighborhood perturbation; Step 2.3: Adjust the perturbation r using the step size ∈ and the maximum value of the out-of-bounds error; Step 2.4: Repeat steps 2.1-2.3 until all pixels in x+r are within the valid range of the input domain.
2. The anti-face recognition method based on adversarial attack according to claim 1, It is characterized in that The perturbation position of the sparse adversarial attack described in step 1 is determined, and the specific implementation includes the following sub-steps: Step A1: Decompose the perturbation r into the dot product of a perturbation intensity vector δ and a binary selection factor G, so that the loss function of sparse adversarial attack is: Where f:x→y represents the classification model, x represents the original image, y is its true value label, f(x) represents the posterior vector; f(x+δ⊙G) represents the label obtained by inputting the perturbed image into the classification model; if y t =y, it is an untargeted attack, and the loss function L is set to the negative cross entropy loss function; if y t ≠y, it is a targeted attack, and the loss function L is set to the cross entropy loss function; p can be assigned different values according to the attacker's requirements, indicating the calculation of the perturbation l p norm; λ 1 >0 is a trade-off parameter; N is the total number of pixels in the image; cardinality constraint 1 T G = k means that only k < N pixels are perturbed; because δ is a continuous value and G is an integer, the sparse adversarial attack optimization problem is transformed into a mixed integer programming optimization problem; Step A2: Replace the binary constraints on G as follows: Where S b =[0,1] 2 is a box constraint, is a l 2 Sphere constraint; The loss function is rewritten as: Among them, Y 1 and Y 2 are two additional variables used to decompose the box and sphere constraints on G; Step A3: Given G, update δ by gradient descent, namely: Among them, η δ represents the learning rate for updating δ; Step A4: Given δ, update G according to the ADMM algorithm; First, calculate the augmented Lagrangian function of the loss function in step A2: Among them, Y 1 and Y 2 are two additional variables used to decompose the box and sphere constraints on G; Z 1 ∈R N , Z 2 ∈R N , z 3 ∈R,(ρ 1 , ρ 2 , ρ 3 ) is a positive penalty parameter; and It is an indicator function. When the independent variable value is true, the function value is 0; when the independent variable value is false, the function value is +∞. It follows the regular process of the ADMM algorithm to update the original variable and the dual variable. Update Y 1 : Since the objective function in the above formula is a convex function, the box-type constraint S b It is also a convex function, and the optimal solution is: in, Represents the projection on the box constraint, R n is a set of n-dimensional real vectors; Next, update Y 2 : Y 2 The optimal solution is: in, Indicates that the projection is on l 2 On the sphere constraint; Then, update G using gradient descent: Among them, η G Represents the learning rate for updating G; Finally, update the dual variable: WITH 1 ←From 1 +ρ 1 (GZ 1 ); WITH 2 ←From 2 +ρ 2 (GZ 2 ); With 3 ←from 3 +ρ 3 (GZ 3 ); Step A5: Repeat steps A3-A4 until the loss function converges.
3. The anti-face recognition method based on adversarial attack according to claim 1, It is characterized in that In step 1, use perceptual color difference instead of l p Norm constraint perturbation intensity; the specific implementation includes the following sub-steps: Step B1: Calculate the perceived color difference between the perturbed image and the original image. The calculation formula is as follows: Where x is the image, r is the perturbation calculated in each iteration; ΔL, ΔC, and ΔH represent the distances between pixels in the three channels of brightness L, saturation C, and hue H in the CIELCH color space, respectively; S L , S C , S H are the weight functions of brightness, saturation and hue, respectively, R T is the interaction term between saturation difference and hue difference, which is used to improve the performance of blue. They are all determined through experiments to simulate human perception of color; k L , k C , k H are three constant parameters, whose values are defined according to different measurement objects or color quality requirements; the training data set is classified according to the corresponding label type; Step B2: Use the perceptual color difference to constrain the perturbation intensity and obtain a new loss function: minutes δ,G DE 00 (x+r,x)+λ 1 L(f(x+δ⊙G),y t ),st1 T G=k,G∈{0,1} N ; The loss function is optimized iteratively until it converges.
4. The anti-face recognition method based on adversarial attack according to any one of claims 1 to 3, It is characterized in that The specific implementation of step 2 includes the following sub-steps: Step 2.1: When the range of x+r exceeds the valid range, calculate the mask m separately 0 and m 1 as an indicator of pixels that exceed the validity limit; m 0 =I 0 (-(x+r)); m 1 =I 0 ((x+r)-1); Where x is the image, r is the perturbation calculated in each iteration; I 0 is an indicator function that outputs 1 for elements greater than zero; Step 2.2: Combined with the neighborhood correlation of the perturbation, a low-pass filter g is used to propagate the out-of-bounds error to the neighborhood perturbation; Right now: m 0 ←m 0 *g; m 1 ←m 1 *g; Step 2.3: Adjust the perturbation r using the step size ∈ and the maximum value of the out-of-bounds error; Right now: r←r-∈max(x+r-1)m 1 +∈min(x+r)m 0 ; Step 2.4: Repeat steps 2.1-2.3 until all pixels in x+r are within the valid range of the input domain.
5. An anti-face recognition system based on adversarial attack, It is characterized in that Includes the following modules: Module 1 is used to add perturbations to the original image, including determining the perturbation position of sparse adversarial attacks and constraining the perturbation intensity; The perturbation position of the sparse adversarial attack is determined, and the specific implementation includes the following sub-steps: Step A1: Decompose the perturbation of a single pixel into two features: perturbation intensity and perturbation position. Use the dot product between a continuous perturbation intensity vector δ and a binary selection factor G to represent the perturbation r, thereby converting the sparse adversarial attack problem into a mixed integer programming problem. Step A2: Replace the binary constraint on the binary selection factor G with a box constraint and an l 2 Spherical constraint, using two additional variables Y 1 and Y 2 Decompose the box and sphere constraints on G; Step A3: Initialize G = 1, keep G unchanged, and update δ by gradient descent method; Step A4: Keep δ unchanged, add dual variables to transform the loss function into augmented Lagrangian form, and first update Y by calculating the optimal solution 1 and Y 2 , then update G by gradient descent, and finally update the dual variable; Step A5: Repeat steps A4 and A5 until the loss function converges, and the position corresponding to the convergence is the perturbation position; The constraint disturbance strength is specifically implemented by the following sub-steps: Step B1: Calculate the perceived color difference between the perturbed image and the original image; Step B2: Use perceptual color difference instead of norm constraint as the regularization term of the loss function, and optimize the intensity of the disturbance through back propagation until the loss function converges. The disturbance intensity corresponding to the convergence is the disturbance intensity added to the disturbance position; Module 2, used for smoothing and shearing the disturbed image to obtain the final disturbed image; The specific implementation includes the following sub-steps: Step 2.1: When the range of x+r exceeds the valid range, calculate the mask m separately 0 and m 1 As an indicator of pixels that exceed the validity limit; where x is the image and r is the perturbation calculated in each iteration; Step 2.2: Combined with the neighborhood correlation of the perturbation, a low-pass filter g is used to propagate the out-of-bounds error to the neighborhood perturbation; Step 2.3: Adjust the perturbation r using the step size ∈ and the maximum value of the out-of-bounds error; Step 2.4: Repeat steps 2.1-2.3 until all pixels in x+r are within the valid range of the input domain.
