The key code of our work "Enhanced Long-Tailed Recognition With Contrastive CutMix Augmentation".
Dataset | Epoch | Imbalance Factor | Top-1 Acc. | Log |
---|---|---|---|---|
CIFAR-100-LT | 200 | 100 | 53.16 | read |
CIFAR-100-LT | 200 | 50 | 57.40 | read |
CIFAR-100-LT | 200 | 10 | 64.53 | read |
CIFAR-10-LT | 200 | 100 | 86.07 | read |
CIFAR-10-LT | 200 | 50 | 88.00 | read |
CIFAR-10-LT | 200 | 10 | 91.42 | read |
CIFAR-100-LT | 400 | 100 | 55.06 | read |
Dataset | Model | Epoch | Top-1 Acc. | Log |
---|---|---|---|---|
ImageNet-LT | ResNet-50 | 100 | 58.49 | read |
ImageNet-LT | ResNeXt-50 | 90 | 59.76 | read |
ImageNet-LT | ResNeXt-50 | 180 | 60.37 | read |
CIFAR-10 and CIFAR-100 can be automatically downloaded by torchvision. Details of other datasets can be found in our paper.
Before you start traning the model, you would better to notice this parameter:
--data you_dataset_path
--device_id Multi-GPU_ID
or --gpu GPU_ID
Before you start testing the model, you should set:
--resume you_model.path.tar
--reload True
We provide the implementation and the bash file on the path ./run_files
.
You can easily run the code just like this:\
bash cifar10_imb10.sh
bash cifar10_imb50.sh
bash cifar10_imb100.sh
bash cifar100_imb10.sh
bash cifar100_imb50.sh
bash cifar100_imb100_400.sh
bash imagenet_resnet_100.sh
bash imagenet_resnext_90.sh
bash imagenet_resnext_180.sh
bash inaturalist_resnet_100.sh
If you need to modify the hyperparameters, please refer to the contents of the main program file main.py and the bash file.
Furthermore, we run our bash file on CIFAR-100-LT and CIFAR-10-LT at 100 imbalance factor for 200 epochs, and provide two log files from running this code twice run1.log
and run2.log
. The results are shown in the following table:
Runs | Dataset | Top-1 Acc. |
---|---|---|
1 | CIFAR-100-LT | 53.15% |
2 | CIFAR-10-LT | 85.94% |
These results are nearly the same as our reported top-1 accuracy on CIFAR-100-LT of 53.16% and CIFAR-10-LT of 86.07%.
Please cite ConCutMix in your publications if it helps your research:
@article{pan2024enhanced,
title={Enhanced Long-Tailed Recognition with Contrastive CutMix Augmentation},
author={Pan, Haolin and Guo, Yong and Yu, Mianjie and Chen, Jian},
journal={IEEE Transactions on Image Processing},
year={2024},
publisher={IEEE}
}