Need help with OpenLongTailRecognition-OLTR?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

697 Stars 125 Forks BSD 3-Clause "New" or "Revised" License 94 Commits 5 Opened issues


Pytorch implementation for "Large-Scale Long-Tailed Recognition in an Open World" (CVPR 2019 ORAL)

Services available


Need anything else?

Contributors list

# 92,976
68 commits
# 39,851
17 commits
# 311,919
3 commits
# 346,878
2 commits

Large-Scale Long-Tailed Recognition in an Open World

[Project] [Paper] [Blog]


Open Long-Tailed Recognition (OLTR)
is the author's re-implementation of the long-tail recognizer described in:
"Large-Scale Long-Tailed Recognition in an Open World"
Ziwei Liu*Zhongqi Miao*Xiaohang ZhanJiayun WangBoqing GongStella X. Yu  (CUHK & UC Berkeley / ICSI)  in IEEE Conference on Computer Vision and Pattern Recognition (CVPR) 2019, Oral Presentation

Further information please contact Zhongqi Miao and Ziwei Liu.

Update notifications

  • 03/04/2020: We changed all valirables named
    so that the attention module can be properly trained in the second stage for Places-LT. ImageNet-LT does not have this problem since the weights are not freezed. We have updated new results using fixed code, which is still better than reported. The weights are also updated. Thanks!
  • 02/11/2020: We updated configuration files for
    dataset. The current results are a little bit higher than reported, even with updated F-measure calculation. One important thing to be considered is that we have unfrozon the model weights for the first stage training of
    , which means it is not suitable for single-GPU training in most cases (we used 4 1080ti in our implementation). However, for the second stage, since the memory and center loss do not support multi-GPUs currently, please switch back to single-GPU training. Thank you very much!
  • 01/29/2020: We updated the
    False Positive
    calculation in
    so that the numbers are normal again. The reported F-measure numbers in the paper might be a little bit higher than actual numbers for all baselines. We will update it as soon as possible. We have updated the new F-measure number in the following table. Thanks.
  • 12/19/2019: Updated modules with 'clone()' methods and set
    in ImageNet-LT stage-1 config to
    . Currently, the results for ImageNet-LT is comparable to reported numbers in the paper (a little bit better), and the reproduced results are updated below. We also found the bug in Places-LT. We will update the code and reproduced results as soon as possible.
  • 08/05/2019: Fixed a bug in
    . Update re-implemented ImageNet-LT weights at the end of this page.
  • 05/02/2019: Fixed a bug in
    so the models train properly. Update configuration file for Imagenet-LT stage 1 training so that the results from the paper can be reproduced.


Data Preparation

NOTE: Places-LT dataset have been updated since the first version. Please download again if you have the first version.

  • First, please download the ImageNet_2014 and Places_365 (256x256 version). Please also change the

  • Next, please download ImageNet-LT and Places-LT from here. Please put the downloaded files into the

    directory like this:

Download Caffe Pre-trained Models for PlacesLT Stage1 Training

  • Caffe pretrained ResNet152 weights can be downloaded from here, and save the file to

Getting Started (Training & Testing)


  • Stage 1 training:
    python --config ./config/ImageNet_LT/
  • Stage 2 training:
    python --config ./config/ImageNet_LT/
  • Close-set testing:
    python --config ./config/ImageNet_LT/ --test
  • Open-set testing (thresholding)
    python --config ./config/ImageNet_LT/ --test_open
  • Test on stage 1 model
    python --config ./config/ImageNet_LT/ --test


  • Stage 1 training (At this stage, multi-GPU might be necessary since we are finetuning a ResNet-152.):
    python --config ./config/Places_LT/
  • Stage 2 training (At this stage, only single-GPU is supported, please switch back to single-GPU training.):
    python --config ./config/Places_LT/
  • Close-set testing:
    python --config ./config/Places_LT/ --test
  • Open-set testing (thresholding)
    python --config ./config/Places_LT/ --test_open

Reproduced Benchmarks and Model Zoo (Updated on 03/05/2020)

ImageNet-LT Open-Set Setting

| Backbone | Many-Shot | Medium-Shot | Few-Shot | F-Measure | Download | | :---------: | :------------: | :-----------: | :---------: | :---------: | :----------------: | | ResNet-10 | 44.2 | 35.2 | 17.5 | 44.6 | model |

Places-LT Open-Set Setting

| Backbone | Many-Shot | Medium-Shot | Few-Shot | F-Measure | Download | | :---------: | :------------: | :-----------: | :---------: | :---------: | :----------------: | | ResNet-152 | 43.7 | 40.2 | 28.0 | 50.0 | model |


The current code was prepared using single GPU. The use of multi-GPU can cause problems except for the first stage of


License and Citation

The use of this software is released under BSD-3.

  title={Large-Scale Long-Tailed Recognition in an Open World},
  author={Liu, Ziwei and Miao, Zhongqi and Zhan, Xiaohang and Wang, Jiayun and Gong, Boqing and Yu, Stella X.},
  booktitle={IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.