This repository is the official PyTorch implementation of the paper: Improving Transferable Targeted Attacks with Feature Tuning Mixup (CVPR 2025).
This repository has been tested with Python 3.7.11, PyTorch 1.10.2, CUDA 11.3, Torchvision 0.11.3, and timm 0.5.4.
The pre-trained models are collected from torchvision and timm. They will be downloaded automatically.
Download the NIPS 2017 ImageNet-compatible dataset from this link.
Place the downloaded 1000 images in the data/images/ folder. The corresponding image information is already provided in the data/ folder.
Run the following commands to obtain results similar to the paper.
FTM attack on ResNet50:
python main.py --model_name ResNet50 --save_dir ./exp/ResNet50/ftm --evalFTM-E attack on ResNet50:
python main.py --model_name ResNet50 --save_dir ./exp/ResNet50/ftm_e --ensemble_size 2 --evalAdversarial images and evaluation results will be saved in the exp/ folder. Check the scripts/ folder for more usage examples.
If you find this repository useful, please cite our paper:
@inproceedings{liang2025improving,
title={Improving Transferable Targeted Attacks with Feature Tuning Mixup},
author={Liang, Kaisheng and Dai, Xuelong and Li, Yanjie and Wang, Dong and Xiao, Bin},
booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
year={2025}
}This repository is built upon the repository of CFM. We thank the authors for making their code publicly available.