Ning Ren, Xiaosong Li, Yanxia Wu*, Yan Fu
- torch == 1.0.1
- torchvision == 0.2.2_post3
- tensorboardX == 1.8
- Python 3
This repository is developed using python 3.5.2/3.6.7 on Ubuntu 16.04.5 LTS. The CUDA nad CUDNN version is 9.0 and 7.1.3 respectively. For Cifar experiments, we use one NVIDIA 3080ti GPU card for training and testing.
# To train long-tailed CIFAR-10 with imbalanced ratio of 50:
python main/train.py --cfg configs/cifar10.yaml
# To validate with the best model:
python main/valid.py --cfg configs/cifar10.yaml
# To debug with CPU mode:
python main/train.py --cfg configs/cifar10.yaml CPU_MODE TrueYou can change the experimental setting by simply modifying the parameter in the yaml file.
The annotation of a dataset is a dict consisting of two field: annotations and num_classes.
The field annotations is a list of dict with
image_id, fpath, im_height, im_width and category_id.
Here is an example.
{
'annotations': [
{
'image_id': 1,
'fpath': '/home/MMT/CIFAIR-10-LT/images/train/7477/3b60c9486db1d2ee875f11a669fbde4a.jpg',
'im_height': 600,
'im_width': 800,
'category_id': 7477
},
...
]
'num_classes': 8142
}
If you have any questions about our work, please do not hesitate to contact us by emails.