Abstract
Physical adversarial patches printed on clothing can enable individuals to evade person detectors, but most existing methods prioritize attack effectiveness over stealthiness, resulting in aesthetically unpleasing patches. While generative adversarial networks and diffusion models can produce more natural-looking patches, they often fail to balance stealthiness with attack effectiveness and lack flexibility for user customization. To address these limitations, we propose BadPatch, a novel diffusion-based framework for generating customizable and naturalistic adversarial patches. Our approach allows users to start from a reference image (rather than random noise) and incorporates masks to create patches of various shapes, not limited to squares. To preserve the original semantics during the diffusion process, we employ Null-text inversion to map random noise samples to a single input image and generate patches through Incomplete Diffusion Optimization (IDO). Our method achieves attack performance comparable to state-of-the-art non-naturalistic patches while maintaining a natural appearance. Using BadPatch, we construct AdvT-shirt-1K, the first physical adversarial T-shirt dataset comprising over a thousand images captured in diverse scenarios.
Introduction
Physical adversarial attacks, such as printing specific patterns on clothing to deceive surveillance systems, have long faced a critical trade-off between effectiveness and stealthiness. Traditional patches, like those generated by AdvYOLO, typically resemble digital noise or abstract geometric patterns. While these are effective at confusing neural networks, they are highly conspicuous to human observers, making them impractical for real-world use.
Previous attempts to create "natural" patches often resulted in weaker attacks or lacked the ability for users to specify the visual content. The BadPatch framework addresses these challenges by leveraging the generative power of Stable Diffusion to create patches that look like ordinary custom graphics—such as a cat or a landscape—while remaining highly effective at evading AI object detectors.
Methodology
BadPatch utilizes several technical innovations to balance visual fidelity with adversarial strength:
- Null-Text Inversion: Instead of starting from random noise, the framework uses a reference image. Null-text inversion maps this image into the latent space of the diffusion model, ensuring the final adversarial patch retains the semantic essence of the original design.
- Incomplete Diffusion Optimization (IDO): The researchers discovered a "sweet spot" in the diffusion trajectory. By optimizing the patch at an intermediate timestamp (specifically $T/2$, or 25 steps), they can insert adversarial features without destroying the image's natural appearance. Full denoising often results in a loss of visual quality when adversarial constraints are applied.
- IoU-Detection Loss: To stabilize training against object detectors, which often produce flickering bounding box predictions, BadPatch introduces a loss based on Intersection over Union (IoU). This accounts for multiple potential detection boxes simultaneously, leading to more robust convergence.
- Target Mask Control: Unlike standard square patches, BadPatch supports irregular shapes through the use of masks, allowing the adversarial "art" to blend seamlessly into the garment's design.
Experimental Results and the AdvT-shirt-1K Dataset
The effectiveness of BadPatch was evaluated across several benchmarks, including the INRIA Person Dataset and COCO. On YOLOv4-tiny, BadPatch achieved an Attack Success Rate (ASR) of approximately 79%, significantly outperforming previous naturalistic methods like NPAP, which reached only ~26%.
A major contribution of this work is the creation of AdvT-shirt-1K, the first physical adversarial T-shirt dataset. It consists of 1,131 annotated images featuring 20 participants wearing 9 different adversarial designs. These images were captured in diverse, complex environments to prove the viability of the attack in the physical world.
Conclusion
BadPatch demonstrates that adversarial attacks can be both stealthy and effective by treating the attack as a customizable design choice. While the iterative optimization process is computationally intensive and can eventually lead to visual artifacts if over-optimized, the framework represents a significant step forward in physical adversarial research. Furthermore, the AdvT-shirt-1K dataset provides a valuable resource for the community to develop more robust defense mechanisms and improve the resilience of future object detection models.
Summary updated