GithubHelp home page GithubHelp logo

haishen-ll / the-essence-of-lt-rocognition Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 15.29 MB

This is the code for the paper "Investigate the Essence of Long-Tailed Recognition from a Unified Perspective".

Python 100.00%

the-essence-of-lt-rocognition's Introduction

This is the code for the paper "Investigate the Essence of Long-Tailed Recognition from a Unified Perspective".

This repository contains the implementation code for paper:
Investigate the Essence of Long-Tailed Recognition from a Unified Perspective
Lei Liu, and Li Liu
[arXiv]

If you find this code or idea useful, please consider citing our work:

@article{liu2021investigate,
  title={Investigate the Essence of Long-Tailed Recognition from a Unified Perspective},
  author={Liu, Lei and Liu, Li},
  journal={arXiv preprint arXiv:2107.03758},
  year={2021}
}

Overview

In this work, we show theoretically and empirically that, both sample number (imbalanced distribution) and category similarity (similar data) should be responsible for the performance dropping for imbalanced (long-tailed) recognition, and interpret representative and classifier learning from a unified perspective.

Toy Example: Toy example is to show that sample number is not the unique influence factor of long-tailed recognition.

Editor Editor

A Unified Perspective for Long-Tailed Learning: In this section, through a simple theoretical model, we first make an intuition on how category similarity influences the classifier estimation via similar samples. With theoretical results, we skillful design verification experiments to confirm the negative effect of similar samples on performance dropping.

Editor Editor

Understanding the Learning for Long-Tailed Recognition: Self-supervised pre-training is to help model learn discriminative features for the similar data.

Installation

Prerequisites

  • Download CIFAR. Original data will be converted by imbalance_cifar.py.
  • Download ImageNet & iNaturalist 2018 dataset, and place them in your data_path. Long-tailed version will be created using train/val splits (.txt files) in corresponding subfolders under imagenet_inat/data/
  • Change the data_root in imagenet_inat/main.py accordingly for ImageNet-LT & iNaturalist 2018

Dependencies

  • PyTorch (= 1.2)

Code Overview

Main Files

Main Arguments

  • --dataset: name of chosen long-tailed dataset
  • --imb_factor: imbalance factor (inverse value of imbalance ratio \rho in the paper)
  • --imb_factor_unlabel: imbalance factor for unlabeled data (inverse value of unlabel imbalance ratio \rho_U)
  • --pretrained_model: path to self-supervised pre-trained models
  • --resume: path to resume checkpoint (also for evaluation)

Getting Started

Toy Example Learning

data sourcing

CIFAR-10-LT: CIFAR-10 unlabeled data is prepared following this repo using the 80M TinyImages.

Setting

To conduct the Toy Example (case 1), first is to fix the sample number for the 10-th class, while the sample number for each top-9 class is manually increased from 100 to 5,000 with the step of 100.

To conduct the Toy Example (case 2), first is to fix the sample number for each top-9 class, while the sample number for the 10-th class is manually decreased from 5,000 to 100 with the step of 100.

Main Results

The results are shown in the following tables.

Editor Editor

Simulation Experiment

Setting

To demonstrate this theoretical finding experimentally, we skillfully construct some virtual similar samples with the help of mixup.

Main Results

The results are shown in the following table.

Editor

Self-Supervised pretraining

Setting

This part is refer to [Rethinking the Value of Labels for Improving Class-Imbalanced Learning]

Main Results

The results are shown in the following table.

Editor

Different Architectures

Main Results

Editor

Contact

If you have any questions, feel free to contact us through email ([email protected]) or Github issues.

the-essence-of-lt-rocognition's People

Contributors

haishen-ll avatar

Stargazers

Penalty_kl avatar Ming Li avatar

Watchers

 avatar

the-essence-of-lt-rocognition's Issues

Could you please kindly share the parameters used in T-SNE?

Hi @LeiLiu-byte , thanks for your contribution, I tried to reproduce the T-SNE results reported in your paper, but failed, could you please share the parameters used? and which T-SNE library is used?

And when can you release the Appendix?

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.