This is the official implementation repository for the paper "Physical Adversarial Clothing Evades Visible-Thermal Detectors via Non-Overlapping RGB-T Pattern" in CVPR 2026.
Xiaopei Zhu, Guanning Zeng, Zhanhao Hu, Jun Zhu, Xiaolin Hu
Create a conda virtual environment and activate it:
conda create -y -n attack3d python=3.9
conda activate attack3dInstall pytorch and its basic depencies:
conda install -y -c pytorch \
pytorch==1.12.1 \
torchvision==0.13.1 \
cudatoolkit=11.3 \
numpy==1.23.5Then install other dependencies:
pip install -r requirements.txtAfter that, install mm series:
python -m pip install mmengine==0.10.5
python -m mim install "mmcv==2.0.0rc4"
python -m pip install --no-build-isolation -e ./model/mmdetectionIf you meet any issues, please consider compiling all of them from source following their document as an alternative.
Finally, compile detectron2 from source code in ./model/eccv22 following its instructions
We used CUDA-11.3 for all the experiments.
Here is an example to run attack for the earlyfusion RGB-T detector.
First, find the initial weights from this link and put it into assets/detection_ckpt/.
Then prepare the dataset. We used this dataset for our experiment. Please download this dataset to your local paths and setup the directories into configs/default.json accordingly. Note the paired RGB and thermal images should be with same filenames but in two directories.
After that, you can launch adversarial attack to the model on the dataset.
python attack.py --config configs/early.jsonWe also recommend you try enhancing some low-contrast RGB images in the original FLIR dataset using util/enhance.py before training.
The code is built on top of yolov9, mmdet, detectron2 and proben. We thank all the authors for their great work.