[ICCV 2021] 具有影响力平衡的损失函数用于不平衡的视觉分类
This is the official implementation of Influence-balanced Loss for Imbalanced Visual Classification in PyTorch. The code heavily relies on LDAM-DRW.
Paper | Bibtex | Video | Slides
All codes are written by Python 3.7, and 'requirements.txt' contains required Python packages. To install requirements:
pip install -r requirements.txtCreate 'data/' directory and download original data in the directory to make imbalanced versions.
imbalancec_cifar.py.imbalance_tinyimagenet.py.We provide several training examples:
python cifar_train.py --dataset cifar100 --loss_type CE --train_rule None --imb_type exp --imb_factor 0.01 --epochs 200 --num_classes 100 --gpu 0python cifar_train.py --dataset cifar100 --loss_type IB --train_rule IBReweight --imb_type exp --imb_factor 0.01 --epochs 200 --num_classes 100 --start_ib_epoch 100 --gpu 0
python cifar_train.py --dataset cifar100 --loss_type IB --train_rule CBReweight --imb_type exp --imb_factor 0.01 --epochs 200 --num_classes 100 --start_ib_epoch 100 --gpu 0
python cifar_train.py --dataset cifar100 --loss_type IBFocal --train_rule IBReweight --imb_type exp --imb_factor 0.01 --epochs 200 --num_classes 100 --start_ib_epoch 100 --gpu 0
python tinyimage_train.py --dataset tinyimagenet -a resnet18 --loss_type CE --train_rule None --imb_type exp --imb_factor 0.01 --epochs 100 --lr 0.1 --num_classes 200
python tinyimage_train.py --dataset tinyimagenet -a resnet18 --loss_type IB --train_rule IBReweight --imb_type exp --imb_factor 0.01 --epochs 100 --lr 0.1 --num_classes 200 --start_ib_epoch 50
If you find our paper and repo useful, please cite our paper
@InProceedings{Park_2021_ICCV,
author = {Park, Seulki and Lim, Jongin and Jeon, Younghan and Choi, Jin Young},
title = {Influence-Balanced Loss for Imbalanced Visual Classification},
booktitle = {Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV)},
month = {October},
year = {2021},
pages = {735-744}
}暂无开放 Issues,或尚未同步最近议题。