Visual physical attack method for generating confrontation samples by utilizing advertisement characteristic camouflage
By using advertising characteristics to camouflage and generate adversarial samples, it solves the problems of low attack success rate and unnatural appearance in autonomous driving scenarios, achieves efficient concealment and flexibility in the physical world, and solves the problem of single attack method in existing technologies. and easily traceable issues.
Patent Information
- Application Number
- CN202410344412.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-25
- Publication Date
- 2024-10-01
AI Technical Summary
Existing physical attack methods have a low attack success rate in autonomous driving scenarios, their appearance is unnatural and easily arouse suspicion, and their attack methods are single and easy to track.
Adversarial samples are generated by camouflaging advertising characteristics. By constructing an advertising carrier model, the virtual simulation platform is used to render the adversarial samples, embed them in physical scene images, and update the adversarial samples through training to make them aggressive, and finally implement the attack in the physical environment.
It improves the attack success rate of adversarial samples, achieves concealment and invisibility in the physical world, can flexibly carry out physical attacks, and reduces the risk of being detected and tracked.
Smart Images

Figure CN118736264A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to computer vision, deep learning and adversarial samples, and belongs to the technical field of adversarial sample applications, and in particular to a visual physical attack method for generating adversarial samples by disguising advertising characteristics. Background Art
[0002] Deep neural networks (DNNs) have demonstrated outstanding performance in various fields such as image classification, object detection, speech recognition, autonomous driving, and face recognition. However, they have also been shown to be vulnerable to adversarial examples. Adversarial examples refer to carefully designed input data that may appear the same or slightly different from normal data in the human eye, but can deceive machine learning models and cause them to make incorrect judgments or classifications. These samples are usually generated by adding tiny but intentional perturbations to the original data, which are small enough that human observers may not notice the difference, but can cause machine learning models to make mistakes. The process of using these adversarial examples to test or attack machine learning systems is called adversarial attacks, and the goal is to reveal the vulnerabilities of the model or directly deceive the model, causing it to make outputs that are inconsistent with the actual situation. Although the existence of adversarial examples poses a serious threat to the security of DNNs, they can also provide valuable insights into revealing model flaws and help develop more powerful models. Due to the widespread use of DNNs in image-related applications, adversarial examples have attracted the attention of researchers. In addition, adversarial examples also have the same adversarial characteristics for traditional machine learning models (such as support vector machine models and perceptron models).
[0003] In the field of adversarial attacks, attacks can be divided into digital attacks and physical attacks according to the implementation environment and method of the attack. Among them, digital attacks deceive machine learning models by adding subtle perturbations to the digital representation of data. Although this perturbation is difficult to detect by the human eye, it is enough to cause the model to make incorrect predictions or classifications. Physical attacks occur in the real world and mislead the perception system by modifying the appearance of physical objects, such as sticking special stickers on traffic signs so that the visual system of self-driving cars will misidentify them. Physical attacks need to consider the complexity of the real environment, such as factors such as lighting, viewing angle and distance, and are therefore usually more challenging than digital attacks. At present, mainstream research focuses on digital attacks, which are difficult to transfer to the real world because they do not consider physical constraints (for example, invariance to different environmental conditions, such as viewpoint and lighting). The present invention focuses on more challenging and practical physical attacks, and designs a clever way of changing data that can be integrated into the real world, which can successfully attack machine learning models without being easily detected.
[0004] As autonomous driving technology continues to develop and mature, physical attacks have been extensively experimented and applied in autonomous driving scenarios to test and improve the robustness of technologies such as automatic perception and recognition in autonomous driving scenarios. Autonomous driving technology is an important technological innovation in the field of computer science and engineering in recent years. It aims to enable vehicles to drive safely without human intervention through computer vision and perception technology. Computer vision plays a key role in this. By processing data captured by on-board sensors (such as cameras, lidar, radar, etc.), vehicles can identify important elements such as roads, vehicles, and pedestrians. This visual perception can not only improve driving safety, but also improve traffic efficiency and driving experience. With the vigorous development of deep learning technology, including its outstanding performance in computer vision tasks such as image classification, object detection, and semantic segmentation, autonomous driving technology has also increasingly relied on deep learning algorithms such as DNNs to achieve accurate perception and understanding of surrounding scenes. However, as mentioned earlier, while DNNs perform well in the field of computer vision, they are also vulnerable to adversarial attacks. These attacks may cause autonomous driving systems to make wrong decisions, thereby causing safety hazards.
[0005] In fact, although there have been a lot of research works on physical attacks, there are still the following problems and challenges:
[0006] First, there is a lack of reasonable and effective attack scenarios. For example, some adversarial attacks paste adversarial textures on cars to avoid detection, but this modification is impractical in real scenarios.
[0007] Second, visually suspicious appearance that easily attracts people’s attention. For example, wearing clothes with adversarial samples makes the detector unable to recognize pedestrians, but this disguise looks strange and unnatural.
[0008] Third, the attack is less traceable and cannot be flexibly restarted and paused. For example, once you put on clothes with adversarial camouflage, you will continue to attack, which can be easily tracked by the victim.
[0009] In short, existing adversarial methods face practical challenges such as difficulty in attacking successfully and easy to be detected. Summary of the invention
[0010] In order to overcome the shortcomings of the above-mentioned prior art, the purpose of the present invention is to provide a visual physical attack method that utilizes advertising characteristics to disguise and generate adversarial samples, so as to solve the problems of low success rate of adversarial camouflage attacks, unnatural appearance that easily arouses people's suspicion, and a single and fixed setting of adversarial camouflage in the physical scene that makes it easy to be discovered or tracked.
[0011] In order to achieve the above object, the technical solution adopted by the present invention is:
[0012] A visual physical attack method for generating adversarial samples by disguising advertisement characteristics comprises the following steps:
[0013] Step 1: Build an advertising carrier model for carrying adversarial samples, define and initialize adversarial samples in the form of 2D images;
[0014] Step 2, using a renderer of a virtual simulation platform to render the adversarial sample to the advertising carrier model, and using a neural network renderer to render the advertising carrier model and the surface thereof presenting the advertisement, to obtain a 2D visualization image under given viewing angle parameters of a simulated real scene;
[0015] Step 3, embedding the 2D visualization image into different physical scene images, and then sending the image to the target detector of the intelligent recognition device to generate a target detection result;
[0016] Step 4: Calculate the loss of the target detection result and the expected recognition result, train and update the adversarial sample according to the training paradigm of adversarial sample generation, so that the adversarial sample gradually becomes aggressive, and obtain the final adversarial sample;
[0017] Step 5: Use the final adversarial sample to perform a physical attack.
[0018] In one embodiment, the step 1 uses 3D modeling software to model a carrier of the advertising logo to obtain a 3D advertising carrier model that is ready to carry out a physical attack in the physical world, determines the surface of the advertising carrier model that is to present the advertisement, randomly generates a 2D image of the same size as the surface, and randomly initializes its color value, thereby obtaining an initialized adversarial sample.
[0019] In one embodiment, in step 1, during the generation of adversarial samples, an advertising logo template of the same size as the adversarial sample is used to define the content modification loss constrained by the advertising logo, that is, the content modification within the semantic structure of the advertising logo body is controlled, and the content modification outside the structure is released, thereby utilizing the diverse characteristics of the advertising logo to generate adversarial samples; finally, by superimposing and fusing the adversarial sample and the advertising logo of the corresponding size, an adversarial sample of the advertising logo style that can be applied to physical scenes to carry out physical attacks is obtained.
[0020] In one embodiment, the step 2 is to obtain a 2D visualization image under given viewing angle parameters of a simulated real scene, and the method is as follows:
[0021] Use 3D modeling software to initialize the adversarial sample I in Rendering onto the surface of the advertisement carrier model presenting the advertisement, obtaining an initialized 3D adversarial texture T in , T in =I in ∪Tothers , T other For the 3D texture of the advertising carrier model except the surface presenting the advertisement, a neural network renderer function F is constructed to generate an image I of the initialized advertising carrier model in a 2D perspective, and the brightness of the image I is adjusted to simulate different lighting environments, thereby obtaining 2D visualization images of different perspectives, where I = F (T in ,M,θ), where M is the advertising carrier model and θ is the given viewing angle parameter of the simulated real scene, including the distance x between M and the camera, the yaw angle of M around its own coordinate system, and the pitch angle of the camera around its own coordinate system.
[0022] In one embodiment, in step 3, the 2D visualization image is embedded into different physical scene images as input images of the object detector, and the method is as follows:
[0023] First, define K scenarios that require physical attacks;
[0024] Secondly, randomly select one of the K scenes and the 2D visualization image I, superimpose the scene view X and I to obtain the input image of the target detector, that is, the adversarial sample scene graph X adv .
[0025] In one embodiment, X and I are superimposed and synthesized. Specifically, the background part of the 2D visualization image I is replaced with X, and the advertisement carrier part is retained.
[0026] In the 2D visualization image I, there is an advertisement carrier part and a background part. The background part is replaced by the X part, and the advertisement carrier part is retained.
[0027] In one embodiment, the step 4 is to update the adversarial texture T by training. in Perform adversarial sample updates as follows:
[0028] Step 4.1, construct a training data set;
[0029] The training dataset includes an adversarial sample training dataset and an advertisement-constrained Logo dataset, which are denoted as and in represents the i-th adversarial sample scene graph, Y i express The position of the target to be detected and the category of the target to be detected, θ i express The corresponding viewing angle parameter, N represents the number of adversarial sample scene graphs, Lg i represents the i-th advertising logo image under different sizes, different positions and different stretching deformations, and n represents the number of advertising logo images;
[0030] Step 4.2, adversarial training;
[0031] Will The target detector of the input intelligent recognition device generates the target detection result, the target detection result and the expected recognition result are used to calculate the loss, and the initialized adversarial texture T is updated by gradient backpropagation according to the training paradigm generated by the adversarial sample. in , making the adversarial sample gradually more aggressive, and obtaining the final adversarial sample.
[0032] In one embodiment, in the adversarial training, the training objective function is the following loss function:
[0033] L=βL cls +γL obj +μL iou +τL s +L c
[0034] Among them, L cls is the classification loss, L obj is the target box loss, L iou is the intersection-over-union loss, L c is the advertisement identification structure constraint loss, L s To smooth the loss, β, γ, μ, and τ are the weight parameters used to adjust the corresponding loss terms;
[0035] Classification loss L cls The calculation of is as follows:
[0036]
[0037] Among them, GS represents the grid size of the feature map, B is the number of prediction boxes per grid, It means that if there is an object at the (i, j) position in the bounding box, it is 1, otherwise it is 0, and classes represents a one-hot encoded vector; p i (k) represents the true probability of object category k at the i-th grid, Represents the probability that the detector predicts that the category is k at the i-th grid;
[0038] Target box loss L obj The calculation of is as follows:
[0039]
[0040] Among them, c i is the IoU between the predicted bounding box and the true bounding box, is the confidence of the prediction box;
[0041] Intersection-over-combination loss Liou The calculation of is as follows:
[0042]
[0043] Among them, b i and Represent the position parameters of the true bounding box and the predicted bounding box respectively;
[0044] Advertisement logo structure constraint loss L c The calculation of is as follows:
[0045]
[0046] Among them, T m is a 3D texture matrix mask defined by the logo dataset of the advertising constraint. During the training process, an advertising logo is randomly selected each time. m The part with a value of 1 in the ad ID indicates the non-ad ID structure area in the ad ID, and the part with a value of 0 indicates the ad ID structure area. represents the multiplication of the elements of the corresponding bit, η represents the modification degree of the non-advertising identification structure area, which is set to 1 to 0.8; T adv T in Updates during training;
[0047] Smoothing loss L s The calculation of is as follows:
[0048] L s =∑(x i,j -x i+1,j ) 2 +(x i,j -x i,j+1 ) 2
[0049] Among them, x i,j Represents the pixel value at position (i, j) in the image.
[0050] In one embodiment, the updated T adv Rendering I adv Afterwards, I adv Input it into the target detector to be attacked, get the loss pair and back propagate it, and update T again adv , after training, we get the final T adv Afterwards, the ad is imported into the advertisement carrier model using 3D modeling software, and then the ad surface is rendered to obtain the adversarial sample plane map P adv , that is, the final adversarial sample, T adv The training update formula is as follows:
[0051] I adv=F(T adv , M, θ), which means that T adv Map into 2D form and generate images of different perspectives of adversarial samples in real scenes;
[0052] Loss = L(D(F(T adv , M, θ))), represents the calculation process of the loss function, the result obtained by D(·) is the output result of the target detector, and L(·) represents the total loss;
[0053] Indicates the loss result Loss to T adv Find the gradient and then update T adv .
[0054] In one embodiment, the method of performing physical attack in step 5 is as follows:
[0055] Step 5.1, from D logo Randomly find an advertising logo image and compare it with the adversarial sample plane graph P adv Pixel superposition is performed according to the set pixel ratio to obtain P′ adv , namely AdvSign logo;
[0056] Step 5.2, P′ adv Attach to a carrier;
[0057] Step 5.3: The target detector of the intelligent recognition device attaches P′ adv vector for identification.
[0058] Compared with the prior art, the present invention utilizes the artistic characteristics of advertising to disguise and generate specific adversarial samples, thereby achieving visual physical attacks. The adversarial samples have a higher attack success rate and can solve the problems of poor concealment and concealment and poor balance in the existing application of adversarial samples to the physical world. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] Figure 1 Two shopping bags are shown with artistic effect.
[0060] Figure 2 This is an attack scenario in an embodiment of the present invention.
[0061] Figure 3 This is a flow chart of the physical attack method proposed in the present invention for generating adversarial samples using the artistic characteristics of advertisements.
[0062] Figure 4 The logo images of the embodiments of the present invention at different sizes, positions and different stretching deformations are shown.
[0063] Figure 5The present invention describes the training process after initializing the adversarial texture.
[0064] Figure 6 It describes how the present invention combines the generated adversarial sample plane graph with the carrier and implements a physical attack.
[0065] Figure 7 This is a diagram of the effect of the adversarial samples generated by the present invention in a real physical scenario. DETAILED DESCRIPTION
[0066] The embodiments of the present invention are described in detail below with reference to the accompanying drawings and examples.
[0067] The present invention makes full use of the characteristics of advertising logos that are widely present in real physical scenes, including autonomous driving, with a large degree of artistic freedom, and realizes a visual physical attack method that uses advertising characteristics to disguise and generate adversarial samples. On the one hand, this method uses the diversity of the content presented in advertising logos to meet the goals of successful attacks and being difficult to detect. In other words, the content of the advertising logo is significantly modified while retaining the theme meaning of the advertising logo to generate adversarial samples with a higher attack success rate. At the same time, because people mainly pay attention to the theme content of the advertising logo and are easy to accept the diversity of its specific pictures, the sensitivity to content tampering is reduced. On the other hand, through the characteristics that are widely present in real physical scenes, adversarial sample advertising logos that can be actually deployed in physical scenes are simulated based on digital simulation environments to achieve physical attacks.
[0068] For example, advertising art logos play a key role in promoting brands and usually contain specific subject content information about the brand, such as exclusive logos or scene texts. In addition, it can be applied in many places and in various styles, such as signs of shops on the street, or attached to boxes or shopping bags. The content of advertising art can present strong artistic effects and specific meanings through some specific structural forms (such as scene text structures such as "KFC" and "ONLY"), while people pay less attention to the actual content within the structure (such as the texture within a thick brushstroke). Figure 1 As shown in the figure, the shopping bag on the left has some simple text logos, while the content on the shopping bag on the right has a strong artistic effect, but people generally pay attention to the logo part of the shopping bag rather than the surrounding patterns. Therefore, while ensuring the basic structural form (such as the main text and pattern corresponding to a specific brand in the advertising art pattern) to express a specific meaning, the large area of texture content within the structure can be modified to facilitate the counterattack without arousing people's suspicion.
[0069] Therefore, the present invention creates adversarial sample advertisements that can be deployed in real environments by simulating the characteristics of digital environments and real physical scenes. These adversarial samples can be integrated into various common advertising carriers, such as street signs, shopping bags, and packaged advertisements, providing attackers with concealment and untraceability when carrying out attacks. Considering that advertising art is rich in content and diverse in form, the present invention focuses on the physical scene of autonomous driving as an example to explain how to use the characteristics of advertising art to achieve a flexible and highly available method for generating physical attack adversarial samples.
[0070] Figure 2 The present invention takes the autonomous driving scenario as an example, and shows a diagram of the use of the adversarial sample for physical attack. As shown in the figure, the present invention assumes that the autonomous driving car has been installed with an autonomous driving visual perception system implemented by computer vision, and the shopping paper bag held by the lady in the figure is attached with an adversarial sample disguised as a specific advertising logo trained by the present invention. The advertising content presented on the paper bag is intuitively an advertising logo represented by a specific artistic pattern (such as KFC), but its actual presentation screen is a specific adversarial sample obtained through training, which can make the autonomous driving system detect it as a stop sign (Stop Sign), thereby causing the autonomous driving car to stop. The advantage of this physical attack method is that it can flexibly and silently complete physical attacks in real scenarios. In the present invention, this adversarial sample applied to the advertising logo and attached to a specific advertising carrier is called an adversarial advertising sign (AdvSign). AdvSign can be flexibly applied to various physical scenarios with advertising signs. For example, it can be mistakenly detected as a specific traffic sign (such as a "stop sign" or "speed limit sign") by the object detector in the autonomous driving scenario; in the video surveillance scenario, it can be used as a car body advertisement so that the monitoring system cannot recognize the car.
[0071] In order to enable AdvSign to present a natural form in the real physical world and achieve effective attacks, the present invention uses digital simulation environment and adversarial sample generation technology to model their deformable characteristics and integrate the mapping of the external physical environment during the training process. In order to make the generated adversarial camouflage more visually natural, the present invention imposes additional optimization constraints to make the generated camouflage visually similar to the real-world advertising logo. In addition, the generated camouflage is attached to different advertising carriers, such as advertising bags, advertising signs, car bodies, etc., which improves the flexibility of adversarial attacks.
[0072] Specifically, the present invention designs an end-to-end method for counteracting camouflage generation and realizing physical attacks in the form of advertising logos, focusing on solving the problems of low success rate of counteracting camouflage attacks, unnatural appearance that easily arouses people's suspicion, and counteracting camouflage that is set in a single and fixed physical scene and is easily discovered or tracked.
[0073] The specific process is as follows Figure 3 As shown, first define and initialize the adversarial sample in the form of a 2D image, and the advertising carrier model used to carry the adversarial sample, that is, the basic 3D model (such as a cuboid) of the simulated advertising logo carrier (such as a shopping bag, a car body, etc.). Secondly, after the initialized adversarial sample is rendered to the advertising carrier model using the renderer of the virtual simulation platform, a 2D visualization image under given simulated real scene viewing parameters (different angles, different viewing angles, and different distances, etc.) is obtained. Subsequently, the 2D visualization image is embedded into different physical scene images, and then sent to the target detector of the intelligent recognition device (such as an autonomous driving car) to generate the target detection result (including the position of the target detection frame, the probability of identifying a specific category, etc.). Next, the target detection result and the expected recognition result are calculated for the loss, and the adversarial sample is trained and updated according to the training paradigm for adversarial sample generation (for example, the FGSM algorithm based on the gradient ascent algorithm, etc.), so that the adversarial sample gradually becomes aggressive, and the final adversarial sample is obtained. Finally, the final adversarial sample is used to carry out a physical attack.
[0074] In addition, in the process of generating adversarial samples, the present invention also defines the content modification loss of the advertorial logo constraint by using an advertorial logo template of the same size as the advertorial sample, that is, controlling the content modification within the semantic structure of the main body of the advertorial logo (for example, the outline of the letters in the KFC logo), but appropriately releasing the content modification outside the structure, thereby utilizing the diverse characteristics of the advertorial logo to generate adversarial samples. Finally, by superimposing and fusing adversarial samples and advertorial logos of corresponding sizes, advertorial samples of the advertorial logo style that can be applied to physical scenes to implement physical attacks are obtained, which are called AdvSign logos.
[0075] The specific steps are as follows:
[0076] Step 1. Initialize the adversarial sample. The present invention needs to construct an initialized adversarial sample as the starting point of training, and the method can be described as follows.
[0077] First, the advertising logo carrier is modeled and the surface to which the advertising logo will be attached is selected.
[0078] The advertising logo needs to be attached to some advertising carrier in the end. Therefore, the present invention first uses 3D modeling software to model a carrier of the advertising logo (such as a paper bag, backpack, car, billboard, store sign, etc.) to obtain a 3D advertising carrier model M that is ready to be physically attacked in the physical world. Because the advertising carrier model M usually has many faces, it is necessary to select a specific face in M as the face to which the advertising logo is attached, that is, it is necessary to determine the face of the advertising carrier model on which the advertisement is to be presented.
[0079] Second, the adversarial camouflage samples are initialized.
[0080] After generating the advertising carrier model, the next step is to generate an initialized adversarial ad sample attached to the carrier. The adversarial ad sample is usually a 2D visual image that needs to be rendered to the face of the advertising carrier model M where the advertisement is to be presented. After determining the advertising carrier model and the face where the advertisement logo is to be presented, the size of the adversarial sample to be rendered to the model is determined, i.e., the size of the face where the advertisement is to be presented. A 2D image of the same size as the face is randomly generated, and its color value is randomly initialized, thereby obtaining an initialized adversarial sample, denoted as I in .
[0081] Step 2. Rendering of adversarial samples to be tested under different viewing angles. This step uses a virtual simulation platform to render the initialized adversarial samples onto the advertising carrier model, and uses a neural network renderer to obtain a 2D visualization image under given simulated real-world scene viewing parameters (different angles, different viewing angles, and different distances, etc.). The specific method is as follows:
[0082] Use 3D modeling software to initialize the adversarial sample I in Rendering onto the advertisement carrier model M presenting the advertisement surface, obtaining the initialized 3D adversarial texture T in , (T in In the subsequent training process, it is updated to T adv ), that is, T in =I in ∪T other , T oth It is the 3D texture of the advertising carrier model except the surface presenting the advertisement. Therefore, T in It is a 3D texture composed of the face of the advertising carrier model M showing the advertising logo and other faces. Given the simulated real scene perspective parameters θ (different perspectives, including the distance x between M and the camera, the yaw angle of M around its own coordinate system, and the pitch angle of the camera around its own coordinate system), the advertising carrier model M and the adversarial sample I in , construct a neural network renderer function F to generate the image I of the initialized advertising carrier model in 2D perspective, that is, I = F (T in, M, θ). At the same time, the brightness of image I is adjusted to simulate different lighting environments, thereby generating 2D visualization images of given adversarial samples under multiple different viewing angles. In fact, the present invention randomly generates several sets of θ parameters within a given range (for example, x is from 1 meter to 8 meters, the yaw of M around its own coordinate system is from 0° to 45°, and the pitch angle of the camera around its own coordinate system is from 0° to 45°).
[0083] Step 3. Embed the adversarial samples from different perspectives into different physical scene images as input images of the target detector as follows:
[0084] First, define K scenarios where physical attacks are required (such as different streets, different corridors, etc.).
[0085] Secondly, randomly select one of the K scenes and in , M, θ) to generate a 2D visualization image I, and the scene view X and I are superimposed to obtain the input image of the target detector, that is, the adversarial sample scene graph X adv In other words, the initialized advertising carrier model (M, T in ) is “embedded” into the scene image X. After “embedding”, the adversarial sample scene image X in different scenes is finally obtained. adv .
[0086] The 2D visualization image I includes an advertisement carrier part and a background part. In this embodiment, X and I are superimposed and synthesized, and the specific method is: the background part in the 2D visualization image I is replaced by X, and the advertisement carrier part is retained.
[0087] Step 4. Training updates the adversarial texture T in The present invention updates the adversarial texture T by training in Perform adversarial sample updates as follows:
[0088] First, construct a training dataset.
[0089] The training data set of the present invention includes an adversarial sample training data set and an advertisement-constrained Logo data set. As there is no ready-made data set for adversarial sample training data set, the present invention needs to construct a data set by itself. The data set contains various scene images (i.e., adversarial sample scene images X adv ), each adversarial sample scene graph X advThe corresponding viewing angle parameter θ, the position of the target to be detected and the category of the target to be detected. According to the application scenario of the present invention, the target to be detected refers to the advertising logo embedded in the scene image, and the category of the target to be detected refers to the specific target category with targeted attack (such as stop sign and speed limit sign in traffic scene) in the adversarial sample generation. The present invention records the constructed training data set as in represents the i-th adversarial sample scene graph, Y i express The position of the target to be detected and the category of the target to be detected, θ i express The corresponding viewing angle parameter, N represents the number of adversarial sample scene graphs. In fact, the training dataset D is constructed by repeating step 3 N times to randomly select scene images and adversarial samples and their viewing angle parameters.
[0090] For the Logo dataset with advertising constraints, in order to make the generated adversarial disguised samples look like a certain brand or type of advertising art logo in the real world, and thus utilize the characteristics of advertising logos to achieve adversarial samples with higher attack success rate and stronger disguise, the present invention defines an advertising logo that is used to synthesize with conventional adversarial samples to generate advertising disguised adversarial samples. The specific definition is: Among them, Lg i represents the i-th advertising logo image under different sizes, different positions and different stretching deformations, and n represents the number of advertising logo images, such as Figure 4 shown.
[0091] The present invention uses a random artistic pattern of an advertising logo as an initialization advertising logo pattern to counteract camouflage. ad The advertising logo art pattern is usually a basic pattern that allows people to recognize a brand or advertisement at first sight, for example, a logo or art pattern of a specific brand, a brand represented by an artistic font, etc. In fact, when randomly selecting an advertising logo pattern I ad Finally, the present invention will increase the robustness of adversarial samples through operations such as random cropping, rotation and scaling. Figure 4 It shows 2D logo images of various sizes, positions and stretching deformations. Figure 1 It is used to construct the advertising logo structure constraint loss L c , and the second is to synthesize with the last generated adversarial sample to obtain AdvSign.
[0092] Second, adversarial training.
[0093] Will Input the target detector of the intelligent recognition device (such as an autonomous vehicle) to generate the target detection result (including the position of the target detection box, the probability of identifying a specific category, etc.). The target detection result and the expected recognition result are used to calculate the loss, and the initial adversarial texture T is updated through gradient backpropagation according to the training paradigm generated by the adversarial sample. in , making the adversarial sample gradually more aggressive, and obtaining the final adversarial sample.
[0094] Among them, the present invention defines a loss function composed of the sum of three types of loss functions as a training objective function.
[0095] 1) The first loss is the adversarial loss for target detection, which is mainly the loss type commonly used by the YOLO model for detection, including the classification loss L cls , target box loss L obj and intersection loss L iou .
[0096] Classification loss L cls It is defined as the difference between the probability of a detected specific area being identified as a specific category and the expected value. In the present invention, the expected model identifies the demarcated advertising logo area as a given traffic sign (such as Stop Sign). Classification loss L cls The calculation of is as follows:
[0097]
[0098] Among them, GS represents the grid size of the feature map, B is the number of prediction boxes per grid, It means that if there is an object at the (i, j) position in the bounding box, it is 1, otherwise it is 0, and classes represents a one-hot encoded vector; p i (k) represents the true probability of object category k at the i-th grid, It represents the probability that the detector predicts that the class is k at the i-th grid.
[0099] Target box loss L obj In the present invention, it is defined as the square difference between the predicted bounding box confidence and the IoU (Intersection over Union) between the predicted bounding box and the true bounding box, and the calculation formula is as follows:
[0100]
[0101] Among them, c i is the IoU between the predicted bounding box and the true bounding box, is the confidence of the predicted box.
[0102] By minimizing the intersection-over-union loss L iouThe present invention can enhance the ability of the detector to accurately detect the position of the target object, and the intersection-to-joint ratio loss L iou The calculation of is as follows:
[0103]
[0104] Among them, b i and Represent the position parameters of the true bounding box and the predicted bounding box respectively.
[0105] 2) The second loss is the ad logo structure constraint loss L c That is, the pixel value change of the adversarial sample in the given ad logo structure area is constrained to be as small as possible, and the changes in the remaining areas and background areas are changed according to the traditional adversarial sample generation method. Ad logo structure constraint loss L c The calculation of is as follows:
[0106]
[0107] Among them, T m is a 3D texture matrix mask, which is used to distinguish the advertising logo area from the non-advertising logo area. It is defined by the constructed advertising-constrained Logo dataset. During the training process, an advertising logo is randomly selected from the Logo dataset each time, where T m The part with a value of 1 in the ad ID indicates the non-ad ID structure area in the ad ID, and the part with a value of 0 indicates the ad ID structure area. Indicates the multiplication of the elements of the corresponding position. η indicates the degree of modification of the non-advertising logo structure area. Generally, η is set to 1 to 0.8, indicating that the degree of modification of the non-advertising logo structure area is relatively large; T adv T in Updates during training.
[0108] 3) The third loss is the smoothing loss L s , the smoothness loss can eliminate the abnormal noise of the image, making the adversarial texture smoother and more natural, and the smoothness loss L s The calculation of is as follows:
[0109] L s =∑(x i,j -x i+1,j ) 2 +(x i,j -x i,j+1 ) 2
[0110] Among them, x i,j Represents the pixel value at position (i, j) in the image.
[0111] Therefore, the final loss function L in adversarial training, i.e., the training objective function, is defined as:
[0112] L=βL cls +γL obj +μL iou +τL s +L c
[0113] Among them, β, γ, μ, and τ are weight parameters used to adjust the corresponding loss terms.
[0114] Figure 5 Describes the training process, the present invention will update the adversarial texture T adv Rendering I adv Afterwards, I adv Input it into the target detector to be attacked, get the loss pair and back propagate it, and update T again adv , so T adv Specifically, the following formula describes the calculation process of the loss result, that is, T adv The training update formula is as follows.
[0115] I adv =F(T adv , M, θ), which means that T adv Map into 2D form and generate images of different perspectives of adversarial samples in real scenes;
[0116] Loss = L(D(F(T adv , M, θ))), represents the calculation process of the loss function, first mapping, then input into the target detector, and finally calculating the loss function. The result obtained by D(·) is the output result of the target detector, and L(·) represents the total loss;
[0117] Indicates the loss result Loss to T adv Find the gradient and then update T adv .
[0118] After training, we get the final T adv Afterwards, use 3D modeling software to import it into the advertising carrier model M, and then use 3D modeling software to render the surface presenting the advertisement to obtain the adversarial sample plane map P adv , which is the final adversarial example.
[0119] Step 5. Perform a physical attack as follows:
[0120] First, the adversarial sample and the ad logo are superimposed and fused. Specifically, from D logo Randomly find an advertising logo image and compare it with the adversarial sample plane graph P adv Pixel superposition is performed according to the set pixel ratio to obtain P′adv , that is, get the AdvSign logo.
[0121] Secondly, attach the scene in the plane diagram simulation training process to a carrier, that is, P′ adv Attached to a carrier. adv Print it out, then find a carrier of the appropriate size and attach the image to the carrier. Figure 6 It describes how to attach a plan view to a paper bag. The present invention can also attach the plan view to a vehicle body or a street sign.
[0122] Finally, to implement the physical adversarial attack, the target detector of the intelligent recognition device attaches P′ adv vector for identification.
[0123] Taking a paper bag as an example, the carrier of the present invention is to carry the paper bag and stand on the roadside and walk (such as Figure 7 Specifically, hold a paper bag with an adversarial sample in your hand, and then stand at a place close to the road to ensure that the camera of the autonomous driving car can capture it. The passing autonomous driving car will recognize the paper bag as a specific traffic sign (such as a stop sign) at a certain moment. The recognition result will affect the autonomous driving system's judgment of the road surface, thereby causing safety hazards. Figure 7 The attack effect of the adversarial samples generated by the present invention on the target detection model YOLO-V5 in different scenes (different streets, different lighting conditions) and different perspectives (the paper bag has the front and the side). It can be seen that each image has a high attack strength, so it can be concluded that the θ contained in the data in the previous training set covers most of the perspectives, and the scene images in the training set cover most of the physical scene images to be attacked, so the adversarial samples obtained by training have multi-scene and multi-perspective attack characteristics.
[0124] In a specific embodiment of the present invention, the physical attack method process is described in detail by taking the physical attack of the ad disguised adversarial sample in the autonomous driving scenario as an example, wherein the advertising logo carrier uses a paper shopping bag carried by pedestrians, the intelligent recognition device is the camera of the autonomous driving car and the target detection YOLO model in its software system, and the expected attack category is the prohibition sign Stop Sign. In other words, when a pedestrian stands on the roadside holding a paper bag printed with an advertising logo with a specific texture, the intelligent recognition system of the passing autonomous driving car will detect and recognize the paper bag area in the multi-angle picture captured by its camera as a Stop Sign, thereby driving the autonomous driving car to stop moving forward.
[0125] The main steps of the invention for generating adversarial samples using the characteristics of advertising art are: adversarial sample initialization, adversarial sample rendering to generate adversarial samples under different perspectives, embedding adversarial samples under different perspectives into different physical scene images, training and updating adversarial textures, and testing the effect of adversarial samples in physical environments. The specific description is as follows:
[0126] Step 1. Initialization of adversarial samples. The present invention models the advertising carrier model as an advertising bag model, whose length and width are 40 cm, the initialized adversarial sample is a pure black image, and the 3D modeling software is 3D MAX.
[0127] Step 2. Adversarial sample rendering generates adversarial samples from different perspectives. The present invention uses the CARLA 3D virtual simulation platform to generate physical scene images from different perspectives. In order to ensure the versatility of the generated adversarial samples, the present invention randomly selected 10 scenes in the virtual simulation environment and captured 500 images for each scene, using virtual cameras with different camera and advertising bag parameters, which are denoted as θ. Specifically, the present invention changes the camera parameters by different relative distances (from 1 meter to 8 meters), camera pitch angles (from 0 degrees to 45 degrees), and camera yaw angles (from 0 degrees to 45 degrees). In addition, the present invention changes the advertising bag parameters by using different heights (from 0 meters to 5 meters) and yaw angles (from 0 degrees to 90 degrees). Through the changes in these parameters, the present invention obtains 5000 simulated physical scene images containing a variety of parameter combinations.
[0128] Step 3. Embed adversarial samples from different perspectives into images of different physical scenes.
[0129] Step 4. Training and updating the adversarial texture. In practice, the optimizer is Adam with default parameters, the learning rate is 0.01, and the maximum number of iterations is 100. The hyperparameters include β=0.5, γ=1.0, μ=0.05, τ=0.9, η=0.9. The target detection model used in the training process is YOLO-V3. After completing all iterations, the present invention saves the adversarial texture for use in testing.
[0130] Step 5. Test the effect of adversarial samples in a physical environment. In order to ensure the robustness and generalization ability of the adversarial samples generated by the present invention, the present invention uses the most advanced model architectures for evaluation, specifically YOLO-V5, YOLO-V, YOLO-V7 and YOLO-V8. For all models, the present invention uses versions pre-trained on the COCO dataset, and all models used in the tests of the present invention are from the PaddleDetection platform. The main goal of the attack of the present invention is to deliberately cause the detector to mistakenly misclassify the adversarial samples as stop signs, thereby effectively destroying the autonomous driving system. To this end, the evaluation indicator selected by the present invention is P@0.5, which is defined as the percentage of adversarial samples that are successfully misdetected as stop signs in the test set when the IOU (intersection over union) threshold of the detection is set to 0.5.
[0131] In addition to testing on the virtual test dataset generated on the CARLA platform, in order to evaluate the effectiveness of the generated adversarial samples in real-world scenarios, the present invention conducted a series of experiments in various physical environments. First, the present invention used 3D Max software to render the textures in the 3D virtual environment into high-resolution 2D images, and then printed and pasted the images onto cardboard boxes. To capture the images, the present invention used a mobile phone. To ensure a fair comparison, the present invention took 500 images under different conditions. These conditions include three lighting settings (bright, dim, and normal), two distances (far and near), three yaw angles (0°, 45°, and 90°), and two physical scenes (campus and urban area).
[0132] The present invention provides some schematic diagrams to intuitively demonstrate the effect of the physical attack method proposed by the present invention for generating adversarial samples using the characteristics of advertising art. Figure 7 As shown in the experimental results of physical world attacks, three groups of examples show the effects of adversarial samples in different physical scenes, lighting conditions and viewing angles. It can be seen that although the adversarial samples have nothing to do with the stop sign in the human eye, they can fool the deep learning object detection model.
Claims
1. A visual physical attack method for generating adversarial samples by disguising advertising characteristics, characterized in that: The steps include: Step 1: Build an advertising carrier model for carrying adversarial samples, define and initialize adversarial samples in the form of 2D images; Step 2, using a renderer of a virtual simulation platform to render the initialized adversarial sample to the advertising carrier model, and using a neural network renderer to render the advertising carrier model and the surface thereof presenting the advertisement, to obtain a 2D visualization image under given simulated real scene viewing angle parameters; Step 3, embedding the 2D visualization image into different physical scene images, and then sending the image to the target detector of the intelligent recognition device to generate a target detection result; Step 4: Calculate the loss of the target detection result and the expected recognition result, train and update the adversarial sample according to the training paradigm of adversarial sample generation, so that the adversarial sample gradually becomes aggressive, and obtain the final adversarial sample; Step 5: Use the final adversarial sample to perform a physical attack.
2. According to claim 1, the visual physical attack method for generating adversarial samples by disguising advertisement characteristics is characterized in that: The step 1 uses 3D modeling software to model a carrier of the advertising logo, obtains a 3D advertising carrier model that is ready to implement a physical attack in the physical world, determines the surface of the advertising carrier model that is to present the advertisement, randomly generates a 2D image of the same size as the surface, and randomly initializes its color value, thereby obtaining an initialized adversarial sample.
3. According to claim 1, the visual physical attack method for generating adversarial samples by disguising advertisement characteristics is characterized in that: In the step 1, during the adversarial sample generation process, an ad logo template of the same size as the adversarial sample is used to define the content modification loss constrained by the ad logo, that is, the content modification within the semantic structure of the ad logo body is controlled, and the content modification outside the structure is released, thereby utilizing the diverse characteristics of the ad logo to generate adversarial samples; finally, by superimposing and fusing the adversarial sample and the ad logo of the corresponding size, an adversarial sample of the ad logo style that can be applied to physical scenes to carry out physical attacks is obtained.
4. According to claim 1, the visual physical attack method for generating adversarial samples by disguising advertisement characteristics is characterized in that: The step 2 is to obtain a 2D visualization image under given viewing angle parameters of a simulated real scene, as follows: Use 3D modeling software to initialize the adversarial sample I in Rendering onto the surface of the advertisement carrier model presenting the advertisement, obtaining an initialized 3D adversarial texture T in , T in =I in ∪T others , T others For the 3D texture of the advertising carrier model except the surface presenting the advertisement, a neural network renderer function F is constructed to generate an image I of the initialized advertising carrier model in a 2D perspective, and the brightness of the image I is adjusted to simulate different lighting environments, thereby obtaining 2D visualization images of different perspectives, where I = F (T in , M, θ), M is the advertising carrier model, θ is the given viewing angle parameter of the simulated real scene, including the distance x between M and the camera, the yaw angle of M around its own coordinate system, and the pitch angle of the camera around its own coordinate system.
5. According to claim 4, the visual physical attack method for generating adversarial samples by disguising advertisement characteristics is characterized in that: In step 3, the 2D visualization image is embedded into different physical scene images as input images of the target detector, and the method is as follows: First, define K scenarios that require physical attacks; Secondly, randomly select one of the K scenes and the 2D visualization image I, superimpose the scene view X and I to obtain the input image of the target detector, that is, the adversarial sample scene graph X adv .
6. The visual physical attack method for generating adversarial samples by disguising advertisement characteristics according to claim 5, characterized in that: X and I are superimposed and synthesized. The specific method is: the background part of the 2D visualization image I is replaced by X, and the advertisement carrier part is retained.
7. The visual physical attack method for generating adversarial samples by disguising advertisement characteristics according to claim 4, 5 or 6, characterized in that: In step 4, the adversarial texture T is updated through training in Perform adversarial sample updates as follows: Step 4.1, construct a training data set; The training dataset includes an adversarial sample training dataset and an advertisement-constrained Logo dataset, which are denoted as and in represents the i-th adversarial sample scene graph, Y i express The position of the target to be detected and the category of the target to be detected, θ i express The corresponding viewing angle parameter, N represents the number of adversarial sample scene graphs, Lg i represents the i-th advertising logo image under different sizes, different positions and different stretching deformations, and n represents the number of advertising logo images; Step 4.2, adversarial training; Will The target detector of the input intelligent recognition device generates the target detection result, the target detection result and the expected recognition result are used to calculate the loss, and the initialized adversarial texture T is updated by gradient backpropagation according to the training paradigm generated by the adversarial sample. in , making the adversarial sample gradually more aggressive, and obtaining the final adversarial sample.
8. The visual physical attack method for generating adversarial samples by disguising advertisement characteristics according to claim 7, characterized in that: In the adversarial training, the training objective function is the following loss function: L=βL cls +γL obj +μL iou +τL s +L c Among them, L cls is the classification loss, L obj is the target box loss, L iou is the intersection-over-union loss, L c is the advertisement identification structure constraint loss, L s To smooth the loss, β, γ, μ, and τ are the weight parameters used to adjust the corresponding loss terms; Classification loss L cls The calculation of is as follows: Among them, GS represents the grid size of the feature map, B is the number of prediction boxes per grid, It means that if there is an object at the (i, j) position in the bounding box, it is 1, otherwise it is 0, and classes represents a one-hot encoded vector; p i (k) represents the true probability of object category k at the i-th grid, Represents the probability that the detector predicts that the category is k at the i-th grid; Target box loss L obj The calculation of is as follows: Among them, c i is the IoU between the predicted bounding box and the true bounding box, is the confidence of the prediction box; Intersection-over-combination loss L iou The calculation of is as follows: Among them, b i and Represent the position parameters of the true bounding box and the predicted bounding box respectively; Advertisement logo structure constraint loss L c The calculation of is as follows: Among them, T m is a 3D texture matrix mask defined by the logo dataset of the advertising constraint. During the training process, an advertising logo is randomly selected each time. m The part with a value of 1 in the ad ID indicates the non-ad ID structure area in the ad ID, and the part with a value of 0 indicates the ad ID structure area. represents the multiplication of the elements of the corresponding bit, η represents the modification degree of the non-advertising identification structure area, which is set to 1 to 0.8; T adv T in Updates during training; Smoothing loss L s The calculation of is as follows: L s =∑(x i,j -x i+1,j ) 2 +(x i,j -x i,j+1 ) 2 Among them, x i,j Represents the pixel value at position (i, j) in the image.
9. The visual physical attack method for generating adversarial samples by disguising advertisement characteristics according to claim 8, characterized in that: The updated T adv Rendering I adv Afterwards, I adv Input it into the target detector to be attacked, get the loss pair and back propagate it, and update T again adv , after training, we get the final T adv Afterwards, the ad is imported into the advertisement carrier model using 3D modeling software, and then the ad surface is rendered to obtain the adversarial sample plane map P adv , that is, the final adversarial sample, T adv The training update formula is as follows: I adv =F(T adv , M, θ), which means that T adv Map into 2D form and generate images of different perspectives of adversarial samples in real scenes; Loss = L(D(F(T adv , M, θ))), represents the calculation process of the loss function, the result obtained by D(·) is the output result of the target detector, and L(·) represents the total loss; Indicates the loss result Loss to T adv Find the gradient and then update T adv .
10. The visual physical attack method for generating adversarial samples by disguising advertisement characteristics according to claim 9, characterized in that: In step 5, the method of performing physical attack is as follows: Step 5.1, from D logo Randomly find an advertising logo image and compare it with the adversarial sample plane graph P adv Pixel superposition is performed according to the set pixel ratio to obtain P′ adv , namely AdvSign logo; Step 5.2: P′ adv Attach to a carrier; Step 5.3: The target detector of the intelligent recognition device attaches P′ adv vector for identification.
Citation Information
Patent Citations
Method and device for generating adversarial patch for unshielded physical attack
CN115829875A
Anti-vision intelligent anti-attack texture generation method
CN115937409A
Cited By
Adversarial sample generation method and device for traffic sign recognition model
CN120411691A
Automatic driving safety test and multi-view perception defense method for camouflage traffic signs
CN121858464A
