NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Image-Level or Object-Level? A Tale of Two Resampling Strategies for Long-Tailed Detection

Nadine Chang, Zhiding Yu, Yu-Xiong Wang, Animashree Anandkumar, Sanja Fidler, José M. Álvarez

Abstract

This paper addresses the persistent challenge of long-tailed distributions in object detection, where a small number of frequent classes dominate the training data while many rare classes are under-represented. We identify the "co-occurrence trap" in traditional image-level resampling—where repeating images containing rare classes inadvertently repeats frequent classes as well. To solve this, we introduce RIO (Resampling at Image-level and Object-level). RIO utilizes a dynamic memory bank to "replay" specific rare object features, effectively balancing the training signal at the object level. Our approach significantly boosts performance on rare categories in the LVIS benchmark without the computational overhead of processing redundant image data.

The Co-occurrence Trap in Long-Tailed Detection

In real-world visual data, class distributions are naturally imbalanced. While image-level resampling (repeating images with rare classes) is effective for simple classification, it is suboptimal for object detection. Because a single image typically contains multiple objects, repeating an image to emphasize a rare class (e.g., a "gourd") also repeats the frequent classes (e.g., "teddy bears") present in that same frame. This co-occurrence ensures that frequent classes continue to dominate the training signal, leaving the "tail" of the distribution under-represented.

Comparison between standard image-level resampling and the proposed object-level resampling (RIO). Image-level resampling fails to isolate rare classes due to co-occurrence, whereas RIO uses a memory bank to specifically target rare objects.

Methodology: The RIO Strategy

The proposed RIO framework employs a two-pronged approach to achieve true balance:

  1. Object-Centric Sampling (OCS): The system maintains a dynamic, episodic memory bank that stores Region of Interest (RoI) features and bounding box locations for rare classes. During training, the model "replays" these stored features by injecting them into the current batch, allowing for precise, object-level balancing.
  2. Implicit Feature Augmentation: Since the memory bank is updated continuously, replayed features represent different "snapshots" of the model throughout training, providing a natural form of feature-level augmentation.
  3. Symbiotic Resampling: RIO combines Repeat Factor Sampling (RFS) at the image level with OCS at the object level. RFS ensures rare classes appear frequently enough to keep the memory bank "fresh," while OCS ensures the final training batch is balanced.

Experimental Results

We evaluated RIO on the LVIS (Large Vocabulary Instance Segmentation) dataset, the primary benchmark for long-tailed detection. RIO consistently outperformed state-of-the-art baselines across various backbones (ResNet-50, ResNet-101, ResNeXt-101).

Impact of RIO on class distribution. (b) shows the total instances for frequent, common, and rare categories across different methods. (d) illustrates how RIO effectively flattens the long-tail distribution compared to no resampling.

Key Performance Metrics:

  • LVIS v0.5: RIO achieved 25.7% Box AP, a significant improvement over the RFS baseline (24.3%).
  • Rare Class Boost: The most dramatic gains occurred in the "Rare" category ($AP_r$). On LVIS v0.5, RIO reached 17.2% $AP_r$, compared to 13.1% for RFS and only 8.5% for Equalization Loss (EQL).
  • LVIS v1.0: RIO maintained its lead, improving rare class AP by a staggering 36.4% relative to the RFS baseline.

Conclusion and Future Work

RIO demonstrates that shifting from image-level to object-level resampling is critical for overcoming the co-occurrence trap in long-tailed detection. While highly effective, future work may address "feature staleness" for extremely rare classes and explore extending object-centric replay to other multi-object tasks or combining it with advanced data augmentation like "Copy-Paste" to further diversify the training signal.

Summary updated

BibTeX
@inproceedings{chang2021image,
  author = {Nadine Chang and Zhiding Yu and Yu-Xiong Wang and Animashree Anandkumar and Sanja Fidler and José M. Álvarez},
  title = {{Image-Level or Object-Level? A Tale of Two Resampling Strategies for Long-Tailed Detection}},
  booktitle = {International Conference on Machine Learning},
  year = {2021},
  url = {https://openreview.net/forum?id=ranJ4x4gms},
}
Figure