Giter Club home page Giter Club logo

h2t's Introduction

Feature Fusion from Head to Tail for Long-Tailed Visual Recognition

Paper overview License Slides Slides Poster

This repo contains the sample code for our AAAI 2024: Feature Fusion from Head to Tail for Long-Tailed Visual Recognition. The core code is in methods.py: H2T.

To do list:

  • Camera-ready version including the appendix of the paper is updated ! [link]
  • Slides and the poster are released. [Slides (pptx), Slides (pdf), Poster]
  • CE loss for CIFAR-100-LT is realsed.
  • Code for other datasets and baseline methods are some what messy πŸ˜†πŸ˜†πŸ˜†. Detailed running instructions and the orignized code for more datasets and baselines will be released latter. (This repository reserves some interfaces for other loss functions and backbones, which have not yet been integrated into the training and configuration files.)

Training

Stage-1:

(e.g. CIFAR100-LT, imbalance ratio = 100, CrossEntropy Loss, MixUp, training from scratch)

python train_stage1.py --cfg ./config/cifar100_imb001_stage1_ce_mixup

Stage-2:

(e.g. CIFAR100-LT, imbalance ratio = 100, CrossEntropy Loss, H2T)

python train_stage2.py --cfg ./config/cifar100_imb001_stage2_ce_H2T.yaml resume /path/to/checkpoint/stage1

The saved folder (including logs, code, and checkpoints) is organized as follows.

H2T
β”œβ”€β”€ saved
β”‚   β”œβ”€β”€ modelname_date
β”‚   β”‚   β”œβ”€β”€ ckps
β”‚   β”‚   β”‚   β”œβ”€β”€ current.pth.tar
β”‚   β”‚   β”‚   └── model_best.pth.tar
β”‚   β”‚   └── logs
β”‚   β”‚       └── modelname.txt
β”‚   β”‚   └── codes
β”‚   β”‚       └── relevant code without data
β”‚   ...   

Evaluation

To evaluate a trained model, run:

(e.g. CIFAR100-LT, imbalance ratio = 100, CrossEntropy Loss, Stage-1)

python eval-modified.py --cfg ./config/cifar100_imb001_stage1_ce_mixup resume /path/to/checkpoint/stage1

(e.g. CIFAR100-LT, imbalance ratio = 100, CrossEntropy Loss, Stage-2)

python eval.py --cfg ./config/cifar100_imb001_stage2_ce_H2T.yaml resume /path/to/checkpoint/stage2

Results and Models

1) CIFAR-10-LT and CIFAR-100-LT

  • Stage-1 (CE with mixup):
Dataset Top-1 Accuracy Model
CIFAR-100-LT IF=50 45.40% link
CIFAR-100-LT IF=100 39.55% link
CIFAR-100-LT IF=200 36.01% link
  • Stage-2 (CE with H2T):
Dataset Top-1 Accuracy Model
CIFAR-100-LT IF=50 52.95% link
CIFAR-100-LT IF=100 47.80% link
CIFAR-100-LT IF=200 43.95% link

Note: I reran Stage-2 with the config from this respository and got slightly better results than in the AAAI paper.

Misc

If you find our paper and repo useful, please cite our paper:

@inproceedings{li2024feature,
  title={Feature Fusion from Head to Tail for Long-Tailed Visual Recognition},
  author={Li, Mengke and Zhikai, HU and Lu, Yang and Lan, Weichao and Cheung, Yiu-ming and Huang, Hui},
  booktitle={Proceedings of the AAAI Conference on Artificial Intelligence},
  volume={38},
  number={12},
  pages={13581--13589},
  year={2024}
}

Acknowledgment

We refer to the code architecture from MisLAS. Many thanks to the authors.

h2t's People

Contributors

keke921 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

jasonyanglu

h2t's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.