Skip to content

tydpan/NorCal

Repository files navigation

NorCal

Normalization Calibration (NorCal) for Long-Tailed Object Detection and Instance Segmentation

On Model Calibration for Long-Tailed Object Detection and Instance Segmentation.

Advances in Neural Information Processing Systems (NeurIPS), 2021.

Tai-Yu Pan*, Cheng Zhang*, Yandong Li, Hexiang Hu, Dong Xuan, Soravit Changpinyo, Boqing Gong, Wei-Lun Chao.

Introduction

Vanilla models for object detection and instance segmentation suffer from the heavy bias toward detecting frequent objects in the long-tailed setting. Existing methods address this issue mostly during training, e.g., by re-sampling or re-weighting.

In this paper, we investigate a largely overlooked approach -- post-processing calibration of confidence scores. We propose NorCal, Normalized Calibration for long-tailed object detection and instance segmentation, a simple and straightforward recipe that reweighs the predicted scores of each class by its training sample size. We show that separately handling the background class and normalizing the scores over classes for each proposal are keys to achieving superior performance. On the LVIS dataset, NorCal can effectively improve nearly all the baseline models not only on rare classes but also on common and frequent classes. Finally, we conduct extensive analysis and ablation studies to offer insights into various modeling choices and mechanisms of our approach.

Installation

Install Detectron2 following the instructions.

Evaluation

Model evaluation can be done similarly:

cd /path/to/detectron2/projects/NorCal
python train_net.py --config-file configs/lvis_v0.5_mask_rcnn_R_50_FPN.yaml --eval-only MODEL.WEIGHTS /path/to/model_checkpoint TEST.CALIBRATION.GAMMA gamma

Citation

Please cite with the following bibtex if you find it useful.

@inproceedings{pan2021norcal,
  title={On Model Calibration for Long-Tailed Object Detection and Instance Segmentation},
  author={Pan, Tai-Yu and Zhang, Cheng and Li, Yandong and Hu, Hexiang and Xuan, Dong and Changpinyo, Soravit and Gong, Boqing and Chao, Wei-Lun},
  booktitle = {NeurIPS},
  year={2021}
}

About

No description, website, or topics provided.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published