This is the official code repository for A Simple Long-Tailed Rocognition Baseline via Vision-Language Model.
- Python3
- Pytorch(1.7.1 recommended)
- yaml
- other necessary packages
- ImageNet_LT
- Places_LT
Download the ImageNet_2014 and Places_365.
Modify the data_root in main.py to refer to your own dataset path.
python main.py --cfg ./config/ImageNet_LT/clip_A_rn50.yaml
python main.py --cfg ./config/ImageNet_LT/clip_B_rn50.yaml
python main.py --cfg ./config/ImageNet_LT/test.yaml --test
The codes is based on https://github.com/zhmiao/OpenLongTailRecognition-OLTR and motivated by https://github.com/facebookresearch/classifier-balancing.