UV-Attack: Physical-World Adversarial Attacks for Person Detection via Dynamic-NeRF-based UV Mapping
This is the repository for the ICLR2025 paper UV-Attack: Physical-World Adversarial Attacks for Person Detection via Dynamic-NeRF-based UV Mapping
The person is from ZJU-MOCAP dataset.
conda env create -f environment.yml
conda activate boho
The data and checkpoints are shared by Google Drive. You need to download it and place the latest.pth in the ./UV_Volumes/data/trained_model/UVvolume_ZJU/zju377 directory of this project. If you want to evaluate the checkpoints, you can follow the instructions in the section of Evaluation. We also provided a pretrained texture stacks under data/texture_stacks.
If you are going to use yolov3, you need to download its weights by running
./arch/weights/download_weights.sh
We use the pretrained miniSD version, which is fintuned on the 256*256 images. We put it under the ./pretrained_model/miniSD.ckpt folder.
In addition, if use GMM sampling (by set --use_GMM as True in the diffusion_model_patch_generator_uv_volumes.py), you should put the SPIN to the root folder and put the SMPL model to the ./SPIN/data/ folder. If set use_GMM as False, we will sample from exist poses.
If you want to test the ASR on other person in ZJU-mocap datasets, you can train UV-Volume model from scratch.
3.1 Download the zju_mocap dataset and put the dataset under the rootfolder, like
- rootfolder/
- zju_comap/
- CoreView_377/
- CoreView_387/
- ...
- zju_comap/
Train the UV-Volumes through
cd ./UV_Volumes
python3 train_net.py --cfg_file configs/zju_mocap_exp/377.yaml
exp_name zju377 resume True output_depth True
Then the texture stacks will be put under the ./UV_Volumes/data/evaluate/UVvolume_ZJU/zju377 folder.
We provide the command to optimize Boho for different target detectors.
We use the background data collected from the AdvCaT. Some test images are put under the data folder.
python src/diffusion_model_patch_generator_uv_volumes.py --arc rcnn --prompt "one horse" --pattern_mode "repeat" --checkpoints 0 --lr 0.005 --device cuda:0 --do_classifier_free_guidance False --use_GMM True
python src/diffusion_model_patch_generator_uv_volumes.py --arc yolov3 --prompt "two bears" --pattern_mode "repeat" --lr 0.01 --device cuda:0 --do_classifier_free_guidance False --checkpoints 0 --use_GMM True
We provide the command to evaluate BohoAttack and visualize the result. For example, to evaluate the pattern saved in directory 'results/rcnn' targeting on test_arch = ["rcnn", "mask_rcnn", "regina", "ssd", "yolov35" , "detr", "yolov8", "fcos"] , run
python src/diffusion_model_patch_generator_uv_volumes.py --mode test
python src/diffusion_model_patch_generator_uv_volumes.py --mode video
Our code is built based on UV-Volumes and Adv-CaT.
@inproceedings{
li2025uvattack,
title={{UV}-Attack: Physical-World Adversarial Attacks for Person Detection via Dynamic-Ne{RF}-based {UV} Mapping},
author={Yanjie Li and Kaisheng Liang and Bin Xiao},
booktitle={The Thirteenth International Conference on Learning Representations},
year={2025},
url={https://openreview.net/forum?id=pqeWzZTrZY}
}