fiveai / MoCaE

The official implementation of "MoCaE: Mixture of Calibrated Experts Significantly Improves Accuracy in Object Detection"
https://arxiv.org/abs/2309.14976
Other
19 stars 2 forks source link

MoCaE: Mixture of Calibrated Experts Significantly Improves Accuracy in Object Detection

arXiv PWC PWC PWC

The official implementation of "MoCaE: Mixture of Calibrated Experts Significantly Improves Accuracy in Object Detection".

MoCaE: Mixture of Calibrated Experts Significantly Improves Accuracy in Object Detection
Kemal Oksuz, Selim Kuzucu, Tom Joy, Puneet K. Dokania

Introduction

Combining the strengths of many existing predictors to obtain a Mixture of Experts which is superior to its individual components is an effective way to improve the performance without having to develop new architectures or train a model from scratch. With this repository, we aim to provide the means to construct an effective Mixture of Experts of object detectors through calibration.

Using this repository, you can

Coming Soon:

Specification of Dependencies

Reproducing Object Detection Results

1. Reproducing Object Detection Results in Table 3

python tools/test_ensemble.py configs/calibration/single_models/rs_r50_fpn_straug_3x_minicoco.py --eval bbox
python tools/test_ensemble.py configs/calibration/single_models/atss_r50_fpn_straug_3x_minicoco.py --eval bbox
python tools/test_ensemble.py configs/calibration/single_models/paa_r50_fpn_straug_3x_minicoco.py --eval bbox

and obtain the following results:

('bbox_mAP', 0.424), ('bbox_mAP_50', 0.621), ('bbox_mAP_75', 0.462), ('bbox_mAP_s', 0.268), ('bbox_mAP_m', 0.463), ('bbox_mAP_l', 0.569)

('bbox_mAP', 0.431), ('bbox_mAP_50', 0.615), ('bbox_mAP_75', 0.471), ('bbox_mAP_s', 0.278), ('bbox_mAP_m', 0.475), ('bbox_mAP_l', 0.542)

('bbox_mAP', 0.432), ('bbox_mAP_50', 0.608), ('bbox_mAP_75', 0.471), ('bbox_mAP_s', 0.27), ('bbox_mAP_m', 0.47), ('bbox_mAP_l', 0.576)

('bbox_mAP', 0.455), ('bbox_mAP_50', 0.632), ('bbox_mAP_75', 0.5), ('bbox_mAP_s', 0.297), ('bbox_mAP_m', 0.497), ('bbox_mAP_l', 0.593)

('bbox_mAP', 0.434), ('bbox_mAP_50', 0.625), ('bbox_mAP_75', 0.471), ('bbox_mAP_s', 0.273), ('bbox_mAP_m', 0.473), ('bbox_mAP_l', 0.58)

('bbox_mAP', 0.434), ('bbox_mAP_50', 0.63), ('bbox_mAP_75', 0.477), ('bbox_mAP_s', 0.28), ('bbox_mAP_m', 0.475), ('bbox_mAP_l', 0.57)

2. Calibrating the Object Detectors

Please run the following command,

python tools/analysis_tools/model_calibration.py model_name

where model_name can be any directory name in the calibration directory that you downloaded and unzipped. As an example, if you run

python tools/analysis_tools/model_calibration.py rs_rcnn

you will find the calibrator under calibration/rs_rcnn/calibrators directory and get the following results:

uncalibrated test set error:

ECE =  0.3645087488831893

ACE= 0.2929792825104798

MCE= 0.45415657187482583

calibrated test set error:

ECE =  0.03191429508521918

ACE= 0.08949849505398023

MCE= 0.3724112771554677

Here, we obtain the calibrators with 500 images following how we obtain MoEs. Hence the results for calibrated test error very slightly differ from Table A.12 reporting LaECE using 2.5K images for calibration. As an example, LaECE after calibration here is 3.19 instead of 3.15 in Table A.12. Note that, the uncalibrated test error remains the same as 36.45.

Reproducing Rotated Object Detection Results

mocae_rotated_object_detection
├── rotated_lsk
│   ├── calibrators
│   │   ├── IR_class_agnostic_finaldets_ms.pkl
├── rotated_rtmdet
│   ├── calibrators
│   │   ├── IR_class_agnostic_finaldets_ms.pkl
├── work_dirs
│   ├── lsk
│   │   ├── Task1
│   │   │   ├── Task1.zip
│   │   │   ├── ...
│   ├── rtmdet
│   │   ├── Task1
│   │   │   ├── Task1.zip
│   │   │   ├── ...
│   ├── vanilla_moe
│   │   ├── Task1/
│   ├── mocae
│   │   ├── Task1/
├── val_images.npy
├── test_images.npy

1. Reproducing Rotated Object Detection Results in Table 6

2. Calibrating the Rotated Object Detectors - Coming Soon

How to Cite

Please cite the paper if you benefit from our paper or the repository:

@misc{oksuz2024mocae,
      title={MoCaE: Mixture of Calibrated Experts Significantly Improves Object Detection}, 
      author={Kemal Oksuz and Selim Kuzucu and Tom Joy and Puneet K. Dokania},
      year={2024},
      eprint={2309.14976},
      archivePrefix={arXiv},
      primaryClass={cs.CV}
}