Home

Awesome

<div align="center"> <!-- <h1>Adversarial AutoMixup</h1> --> <h2><a href="https://arxiv.org/abs/2312.11954">Adversarial AutoMixup (ICLR 2024 spotlight)</a></h2>

Huafeng Qin<sup>1,*,†</sup>, Xin Jin<sup>1,*</sup>, Yun Jiang<sup>1</sup>, Mounim A. El-Yacoubi<sup>2</sup>, Xinbo Gao<sup>3</sup>

<sup>1</sup>Chongqing Technology and Business University

<sup>2</sup>Telecom SudParis, Institut Polytechnique de Paris

<sup>3</sup>Chongqing University of Posts and Telecommunications

<sup>*</sup> Equal Contribution <sup></sup> Corresponding Author

</div> <p align="center"> <a href="https://arxiv.org/abs/2312.11954" alt="arXiv"> <img src="https://img.shields.io/badge/arXiv-2312.11954-b31b1b.svg?style=flat" /></a> <a href="https://github.com/JinXins/Adversarial-AutoMixup/blob/main/LICENSE" alt="license"> <img src="https://img.shields.io/badge/license-Apache--2.0-%23B7A800" /></a> <a herf="" alt="Github stars"> <img src="https://img.shields.io/github/stars/JinXins/Adversarial-AutoMixup?color=blue" /></a> </p> <p align="center"> <img src="https://github.com/JinXins/Adversarial-AutoMixup/assets/124172716/c8b2f194-41b1-4117-8965-68c9c20d3c83" width=75% height=75% class="center"> </p>

We propose AdAutoMix, an adversarial automatic mixup augmentation approach that generates challenging samples to train a robust classifier for image classification, by alternatively optimizing the classifier and the mixup sample generator. AdAutoMix comprises two modules, a mixed example generator, and a target classifier. The mixed sample generator aims to produce hard mixed examples to challenge the target classifier while the target classifier’s aim is to learn robust features from hard mixed examples to improve generalization. To prevent the collapse of the inherent meanings of images, we further introduce an exponential moving average (EMA) teacher and cosine similarity to train AdAutoMix in an end-to-end way.

Mixed Images of Various Mixup-based Approaches.

<p align="center"> <img src="https://github.com/JinXins/Adversarial-AutoMixup/assets/124172716/ab30bb40-cc57-455e-98f1-436d9e16aafe" width=75% height=75% class="center"> </p>

📬 You can contact me by email: 158398730@qq.com or WeChat: xinxinxinxin_j.

If you are interested in palm or finger vein research, please contact us!


🛠 Installation

💥News! ! !💥
2024-01-18: you can clone Openmixup training "AdAutoMix"[ICLR 2024].
2023-12-19: We update some analysis tools code such as: Calibration, FGSM calibration_fgsm.py and Occlusion Robustness occlusion_robustness.py experiments, also we support a mix augmentation method "SnapMix"[AAAI 2021].
Big thanks to Siyuan Li(@Lupin1998).

🔧How to install?🔧
In fact, you can add our python file in OpenMixup.
There, you can see how to use it and the environment required. What you need to do is add or replace our files by folder inside OpenMixup, and then add the function names of the files in the __init__.py file.
You also can download or find other Mixup methods in OpenMixup("https://github.com/Westlake-AI/openmixup")
Thanks contributors: Siyuan Li(@Lupin1998), Zichen Liu(@pon7) and Zedong Wang(@Jacky1128).


Here are the commands to install OpenMixup

conda create -n openmixup python=3.8 pytorch=1.12 cudatoolkit=11.3 torchvision -c pytorch -y
conda activate openmixup
pip install openmim
mim install mmcv-full
git clone https://github.com/Westlake-AI/openmixup.git
cd openmixup
python setup.py develop

Here are the commands to git clone AdAutoMixup

git clone https://github.com/JinXins/Adversarial-AutoMixup.git

📊 Experiments

CIFAR-100

NamealphaConferenceResNet18ResNeXt50Swin-TinyConvNeXt-T
Vanilla-78.0481.0978.4178.70
MixUp1.0ICLR201879.1282.1076.7881.13
CutMix0.2ICCV201978.1778.3280.6482.46
SaliencyMix0.2ICLR202179.1278.7780.4082.82
FMix0.2ArXiv79.6979.0280.7281.79
ResizeMix1.0CVMJ202380.0180.3580.1682.53
PuzzleMix1.0ICML202081.1382.8580.3382.29
AutoMix2.0ECCV202282.0483.6482.6783.30
AdAutoMix1.0ICLR202482.3284.2284.3383.54

Tiny-ImageNet & ImageNet-1K(denote *)

NamealphaConferenceResNet18ResNeXt50ResNet18*ResNet34*ResNet50*
Vanilla-61.6865.0470.0473.8576.83
MixUp1.0ICLR201863.8666.3669.9873.9777.12
CutMix0.2ICCV201965.5366.4768.9573.5877.17
SaliencyMix0.2ICLR202164.4066.5569.1673.5677.14
FMix0.2ArXiv63.4765.0869.9674.0877.19
ResizeMix1.0CVMJ202363.1765.8769.5073.8877.42
PuzzleMix1.0ICML202065.8167.8370.1274.2677.54
AutoMix2.0ECCV202267.3370.7270.5074.5277.91
AdAutoMix1.0ICLR202469.1972.8970.8674.8278.04

CUB-200, FGVC-Aircraft and Standford Cars

NamealphaConfrenceCUB R18CUB R50FGVC R18FGVC RX50Cars R18Cars RX50
Vanilla-77.6882.3880.2385.186.3290.15
MixUp1.0ICLR201878.3982.9879.5285.1886.2790.81
CutMix0.2ICCV201978.4083.1778.8484.5587.4891.22
ManifoldMixup2.0ICML201979.7683.7680.6886.685.8890.20
SaliencyMix0.2ICLR202177.9582.0280.0284.3186.4890.60
FMix0.2ArXiv77.2883.3479.3686.2387.5590.90
ResizeMix1.0CVMJ202378.583.4178.184.0888.1791.36
PuzzleMix1.0ICML202078.6383.8380.7686.2387.7891.29
AutoMix2.0ECCV202279.8783.8881.3786.7288.8991.38
AdAutoMix1.0ICLR202480.8884.5781.7387.1689.1991.59

If you want see more results, please check this Experiments.md.


😉 Citation

If you feel that our work has contributed to your research, please cite it, 🥰 and please don`t forget to cite OpenMixup if you use this project ! 🤗 Thanks.

@inproceedings{iclr2024adautomix,
      title={Adversarial AutoMixup},
      author={Huafeng Qin and Xin Jin and Yun Jiang and Mounim A. El-Yacoubi and Xinbo Gao},
      booktitle={International Conference on Learning Representations},
      year={2024},
}

@article{li2022openmixup,
  title = {OpenMixup: A Comprehensive Mixup Benchmark for Visual Classification},
  author = {Siyuan Li and Zedong Wang and Zicheng Liu and Di Wu and Cheng Tan and Stan Z. Li},
  journal = {ArXiv},
  year = {2022},
  volume = {abs/2209.04851}
}


📝 Interest

  If you are interested in vein research (palm veins, finger veins, etc.), why not contact us and we will be happy to discuss the research or questions with you.
  Of course, we're also trying to research how we can use AI to predict and detect diseases, potentially Alzheimer's, Parkinson's, etc., but of course, this is new research for us, so we're still figuring it out.

  Email: 158398730@qq.com