Official implementation of CVPR2020 Paper "Cooling-Shrinking Attack"
The official implementation for CVPR2020 Paper Cooling-Shrinking Attack: Blinding the tracker with imperceptible noises
Demos for Cooling-Shrinking Attack.
Please cite our work as follows, if you find it helpful to your research. :)
@inproceedings{CSA-CVPR2020,
author = {Bin Yan and Dong Wang and Huchuan Lu and Xiaoyun Yang},
title = {{Cooling-Shrinking Attack: Blinding} the Tracker with Imperceptible Noises},
booktitle = {CVPR},
year = {2020}
}
This code has been tested on the following environment:
NVIDIA RTX-2080Ti
Ubuntu 16.04
CUDA 10.0
git clone https://github.com/MasterBin-IIAU/CSA.git
cd <Project_name>
conda create -n CSA python=3.6
source activate CSA
conda install pytorch=1.0.0 torchvision cuda100 -c pytorch
pip install -r requirements.txt
conda install pillow=6.1
python Unified_GOT10K_process.py
Step1: Add pix2pix and pysot to environment variables
sudo gedit ~/.bashrc
# add the following two lines to the end
export PYTHONPATH=<CSA_PATH>:$PYTHONPATH
export PYTHONPATH=<CSA_PATH>/pysot:$PYTHONPATH
export PYTHONPATH=<CSA_PATH>/pix2pix:$PYTHONPATH
# close the file
source ~/.bashrc
step2: Set another paths
Option1: Use Default Settings
Train a generator for attacking search regions (Cooling+Shrinking)
python train1.py # See visualization in http://localhost:8097/
Train a generator for attacking search regions (Only Cooling)
python train0.py # See visualization in http://localhost:8096/
Option2: Change Settings
If you want to train other models (like the generator for attacking the template),
you can change the lines 23 and 24 in pix2pix/options/base_option0.py (or base_option1.py).
In specific, modify the default values to 'G_template_L2_500' (or 'G_template_L2_500_regress').
Then run python train0.py
or python train1.py
Option3: Train Your Own Models
Step1: Create a new python file under pix2pix/models.
You can copy a file that belongs to this folder, then develop based on it.
Note that the class name must match the filename.
Step2: Change default values and train (Do as instructions in Option2)
open common_path.py
, choose the dataset and siamese model to use.
open GAN_utils_xx.py
, choose the generator model to use.
cd pysot/tools
run experiments about attcking search regions
python run_search_adv0.py # or run_search_adv1.py
run experiments about attacking the template
python run_template_adv0.py # or run_template_adv1.py
run experiments about attacking both search regions and the template
python run_template_search_adv0.py # or run_template_search_adv1.py