Skip to content
/ DLSA Public

The code accompanying our ECCV'22 papers: Constructing Balance from Imbalance for Long-tailed Image Recognition

License

Notifications You must be signed in to change notification settings

silicx/DLSA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DLSA

This is the code accompanying our ECCV'22 papers: Constructing Balance from Imbalance for Long-tailed Image Recognition

Overview

Prerequisites

Packages: Install using pip install -r requirements.txt

Features: Train backbone models with Decouple[2], and PaCo[3] and extract features for train and test sets. The features should be stored as features_train.h5 or features_test.h5 with structure:

{
    "features": numpy.ndarray, shape = (num_sample, feature_dim),
    "labels": numpy.ndarray, shape = (num_sample, ),
}

Please put the pretrained models and files in folder features and organize it as:

features
├── imagenet
│   ├── ce
│   │   ├── feature_test.h5
│   │   ├── feature_train.h5
│   │   └── final_model_checkpoint.pth
│   ├── cbs/...
│   └── paco/...
├── places
│   ├── ce/...
│   └── paco/...
└── inat
    └── paco/...

The pretrained feature and models will be released later.

Training

For example, to train a DLSA on PaCo+BSM model on ImageNet-LT, run:

python train_dlsa.py --cfg config/cls/ImgNet_PaCo_R50_bsm.yaml

Acknowledgement

The code, data and pretrianed models are partly based on OLTR[1], Decouple[2], PaCo[3] and normalizing_flows.

Reference

[1] Large-Scale Long-Tailed Recognition in an Open World

[2] Decoupling Representation and Classifier for Long-Tailed Recognition

[3] Parametric Contrastive Learning

About

The code accompanying our ECCV'22 papers: Constructing Balance from Imbalance for Long-tailed Image Recognition

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages