Code for the XXX 2026 paper "Multiform Attack for Transferable Cross-Modal Person Re-Identification".
Please reproduce the software environment using the configuration files provided in this repository. The recommended entry point is environment.yml. Additional dependency and installation information is available in:
requirements.txtrequirements-pip.txtENVIRONMENT_SETUP.mdenvironment-summary.mdsetup_environment.sh
The recorded environment uses Python 3.9, PyTorch 1.12, torchvision 0.13, CUDA 11.3, and FAISS GPU 1.7.3. Please follow the supplied configuration as closely as possible. Changes to Python, CUDA, PyTorch, torchvision, FAISS, NumPy, or related library versions may alter numerical behavior, model loading, data processing, and final evaluation results. An environment that differs from the supplied configuration may therefore produce results inconsistent with the reported reproduction.
A typical setup is:
conda env create -f environment.yml
conda activate ma-attackAlternatively, consult ENVIRONMENT_SETUP.md before using the pip requirement files.
The experiments use Market-1501 (transformed into CnMix), Sketch-ReID, SYSU-MM01, RegDB, and related cross-modality data. After downloading the datasets, organize them under a common data root and update the example paths in the processing scripts before running them.
A processed dataset archive is available from BaiduYun (Password: kwwu).
CnMix_process.pyconstructs CnMix-style images from Market-1501. It probabilistically generates grayscale images and RGB combinations containing grayscale or sketch channels while preserving the source directory organization.cross-modal_dataset_to_market_format.pyconverts images from identity/camera subdirectories into a flat Market-1501-style naming scheme such asPID_camera_sequence_01.jpg.deal_SYSU_testset_ID.pyreads the SYSU test identity list and moves the corresponding identity directories into the designated test split.testset_to_query.pysamples part of each identity's test images and moves them into a separate query directory, providing a simple query/gallery organization for evaluation.
These scripts contain example local paths and may move or copy files. Review and replace all input/output paths, keep an untouched copy of the raw datasets, and verify the generated identity and camera labels before training.
Other dataset-specific conversion support is also provided, including convert_llcm_to_market.py for converting LLCM into the project-compatible layout.
Pretrained ReID models are available from BaiduYun (Password: k4np).
Download the required checkpoints and update the checkpoint paths passed to the attack program.
See run.sh for example commands. Before execution, replace the placeholder data and checkpoint paths with the corresponding locations on your machine.
bash run.sh- Cross-modality perturbation synergy attack for person re-identification
- Person re-identification method based on color attack and joint defence
If you find this code useful in your research, please consider citing:
@inproceedings{gong2026ma,
title={Multiform Attack for Transferable Cross-Modal Person Re-Identification},
author={Yunpeng Gong, Can Yang, Qingyuan Zeng, Dejun Xu, Zhiming Luo, Zhenzhong Wang, Min Jiang },
journal={Advances in Neural Information Processing Systems},
volume={XX},
pages={XXX},
year={2026}
}@inproceedings{colorAttack2022,
title={Person re-identification method based on color attack and joint defence},
author={Gong, Yunpeng and Huang, Liqing and Chen, Lifei},
booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
pages={4313--4322},
year={2022}
}
@article{gong2024cross,
title={Cross-modality perturbation synergy attack for person re-identification},
author={Gong, Yunpeng and Zhong, Zhun and Qu, Yansong and Luo, Zhiming and Ji, Rongrong and Jiang, Min},
journal={Advances in Neural Information Processing Systems},
volume={37},
pages={23352--23377},
year={2024}
}
Email: fmonkey625@gmail.com