Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/3neutronstar/GuidedMixup
Official PyTorch implementation of "GuidedMixup An Efficient Mixup Strategy Guided by Saliency Maps" (AAAI'23 Oral)
https://github.com/3neutronstar/GuidedMixup
Last synced: 3 months ago
JSON representation
Official PyTorch implementation of "GuidedMixup An Efficient Mixup Strategy Guided by Saliency Maps" (AAAI'23 Oral)
- Host: GitHub
- URL: https://github.com/3neutronstar/GuidedMixup
- Owner: 3neutronstar
- License: gpl-3.0
- Created: 2023-09-25T13:37:48.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-07-09T14:31:16.000Z (4 months ago)
- Last Synced: 2024-07-09T18:32:43.619Z (4 months ago)
- Language: Python
- Size: 1.66 MB
- Stars: 3
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- Awesome-Mixup - [Code
README
# GuidedMixup
Official PyTorch implementation of "GuidedMixup: An Efficient Mixup Strategy Guided by Saliency Maps" (AAAI'23, Oral) ([paper](https://arxiv.org/abs/2306.16612))![Image](./assets/method.png)
## Requirements
To install requirements:
```setup
pip install -r requirements.txt
```Install pairing Algorithm:
```setup
python setup.py build_ext --inplace
```## Training
-----
We provide the code for training the neural network above general classification datasets from [PuzzleMix](https://github.com/snu-mllab/PuzzleMix).### Cifar-100
- To reproduce **Guided-SR with PreActResNet18 for 1200 epochs**, run:
```
python main.py --dataset cifar100 --data_dir [data_path] --root_dir [save_path] --labels_per_class 500 --arch preactresnet18 --learning_rate 0.1 --momentum 0.9 --decay 0.0001 --epochs 1200 --schedule 400 800 --gammas 0.1 0.1 --train mixup --guided True --condition greedy --mix_prob 0.5 --guided_type sr
```- To reproduce **Guided-AP with PreActResNet18 for 1200 epochs**, run:
```
python main.py --dataset cifar100 --data_dir [data_path] --root_dir [save_path] --labels_per_class 500 --arch preactresnet18 --learning_rate 0.1 --momentum 0.9 --decay 0.0001 --epochs 1200 --schedule 400 800 --gammas 0.1 0.1 --train mixup --guided True --condition greedy --mix_prob 0.8 --guided_type ap
```### Tiny-ImageNet
- To reproduce **Guided-SR with PreActResNet18 for 1200 epochs**, run:
```
python main.py --dataset tiny-imagenet-200 --data_dir [data_path] --root_dir [save_path] --labels_per_class 500 --arch preactresnet18 --learning_rate 0.2 --momentum 0.9 --decay 0.0001 --epochs 1200 --schedule 600 900 --gammas 0.1 0.1 --train mixup --guided True --condition greedy --mix_prob 0.5 --guided_type sr
```- To reproduce **Guided-AP with PreActResNet18 for 1200 epochs**, run:
```
python main.py --dataset tiny-imagenet-200 --data_dir [data_path] --root_dir [save_path] --labels_per_class 500 --arch preactresnet18 --learning_rate 0.2 --momentum 0.9 --decay 0.0001 --epochs 1200 --schedule 600 900 --gammas 0.1 0.1 --train mixup --guided True --condition greedy --mix_prob 0.8 --guided_type ap --clean_lam 1.0
```## Citing this Work and this Implementation
```
@inproceedings{kang2023guidedmixup,
title={GuidedMixup: an efficient mixup strategy guided by saliency maps},
author={Kang, Minsoo and Kim, Suhyun},
booktitle={Proceedings of the AAAI Conference on Artificial Intelligence},
volume={37},
number={1},
pages={1096--1104},
year={2023}
}
```