Home

Awesome

DirMixE

This repository is the official code for the paper Harnessing Hierarchical Label Distribution Variations in Test Agnostic Long-tail Recognition (ICML 2024).

PWCPWCPWCPWC

Paper Title: Harnessing Hierarchical Label Distribution Variations in Test Agnostic Long-tail Recognition.

Author: Zhiyong Yang, Qianqian Xu*, Zitai Wang, Sicong Li, Boyu Han, Shilong Bao, Xiaochun Cao, Qingming Huang*

key_idea

Installation

git clone https://github.com/scongl/DirMixE.git
pip install -r requirements.txt

Datasets

Four bechmark datasets

data
├── CIFAR-10
│   └── cifar-10-batches-py
├── CIFAR-100
│   └── cifar-100-python
├── ImageNet_LT
│   ├── test
│   ├── train
│   └── val
└── iNaturalist
    ├── test2018
    └── train_val2018

Txt files

data_txt
├── ImageNet_LT
│   ├── ImageNet_LT_backward10.txt
│   ├── ImageNet_LT_backward25.txt
│   ├── ImageNet_LT_backward2.txt
│   ├── ImageNet_LT_backward50.txt
│   ├── ImageNet_LT_backward5.txt
│   ├── ImageNet_LT_forward10.txt
│   ├── ImageNet_LT_forward25.txt
│   ├── ImageNet_LT_forward2.txt
│   ├── ImageNet_LT_forward50.txt
│   ├── ImageNet_LT_forward5.txt
│   ├── ImageNet_LT_test.txt
│   ├── ImageNet_LT_train.txt
│   ├── ImageNet_LT_uniform.txt
│   └── ImageNet_LT_val.txt
└── iNaturalist18
    ├── iNaturalist18_backward2.txt
    ├── iNaturalist18_backward3.txt
    ├── iNaturalist18_forward2.txt
    ├── iNaturalist18_forward3.txt
    ├── iNaturalist18_train.txt
    ├── iNaturalist18_uniform.txt
    └── iNaturalist18_val.txt

Script

CIFAR10-LT

Training

python train.py -c configs/train/cifar10.json 

Evaluate

python test_train_cifar_dirmixe.py -c configs/test/test_cifar10.json -r checkpoint_path
python test_train_cifar_sade.py -c configs/test/test_cifar10.json -r checkpoint_path

CIFAR100-LT

Training

python train.py -c configs/train/cifar100.json 

Evaluate

python test_train_cifar_dirmixe.py -c configs/test/test_cifar100.json -r checkpoint_path
python test_train_cifar_sade.py -c configs/test/test_cifar100.json -r checkpoint_path

ImageNet-LT

Training

python train.py -c configs/train/imagenet.json 

Evaluate

python test_train_cifar_dirmixe.py -c configs/test/test_imagenet.json -r checkpoint_path
python test_train_cifar_sade.py -c configs/test/test_imagenet.json -r checkpoint_path

iNaturalist

Training

python train.py -c configs/train/inaturalist.json

Evaluate

python test_train_cifar_dirmixe.py -c configs/test/test_inaturalist.json -r checkpoint_path
python test_train_cifar_sade.py -c configs/test/test_inaturalist.json -r checkpoint_path

Citation

If you find our work inspiring or use our codebase in your research, please cite our work.

@inproceedings{yang2024harnessing,
    title={Harnessing Hierarchical Label Distribution Variations in Test Agnostic Long-tail Recognition}, 
    author={Zhiyong Yang and Qianqian Xu and Zitai Wang and Sicong Li and Boyu Han and Shilong Bao and Xiaochun Cao and Qingming Huang},
    booktitle={International Conference on Machine Learning},
    year={2024}
}

Acknowledgements

Our codes are based on the repository SADE.