Home

Awesome

Improving Object Detection by Label Assignment Distillation

This is the official implementation of the WACV 2022 paper Improving Object Detection by Label Assignment Distillation. We provide the code for Label Assignement Distillation (LAD), training logs and several model checkpoints.

What's New

Table of Contents

  1. Introduction
  2. Installation
  3. Usage
  4. Experiments
  5. Citation

Introduction

This is the official repository for the paper Improving Object Detection by Label Assignment Distillation.

Soft Label Distillation concept (a)Label Assignment Distillation concept (b)
Probabilistic Anchor Assignment (PAA)Label Assignment Distillation (LAD) based on PAA


Installation

conda create -n lad python=3.7 -y
conda activate lad
conda install pytorch=1.7.0 torchvision cudatoolkit=10.2 -c pytorch -y
pip install openmim future tensorboard sklearn timm==0.3.4
mim install mmcv-full==1.2.5
mim install mmdet==2.10.0
pip install -e ./

Usage

Train the model

#!/usr/bin/env bash
set -e
export GPUS=2
export CUDA_VISIBLE_DEVICES=0,2

CFG="configs/lad/paa_lad_r50_r101p1x_1x_coco.py"
WORKDIR="/checkpoints/lad/paa_lad_r50_r101p1x_1x_coco"

mim train mmdet $CFG --work-dir $WORKDIR \
    --gpus=$GPUS --launcher pytorch --seed 0 --deterministic

Test the model

#!/usr/bin/env bash
set -e
export GPUS=2
export CUDA_VISIBLE_DEVICES=0,2

CFG="configs/paa/paa_lad_r50_r101p1x_1x_coco.py"
CKPT="/checkpoints/lad/paa_lad_r50_r101p1x_1x_coco/epoch_12.pth"

mim test mmdet $CFG --checkpoint $CKPT --gpus $GPUS --launcher pytorch --eval bbox

Experiments

1. A Pilot Study - Preliminary Comparison.

Table 2: Compare the performance of the student PAA-R50 using Soft-Label, Label Assignment Distillation (LAD) and their combination (SoLAD) on COCO validation set.

MethodTeacherStudentgammamAPImproveConfigDownload
BaselineNonePAA-R50 (baseline)240.4-configmodel | log
Soft-Label-KL lossPAA-R101PAA-R500.541.3+0.9configmodel | log
LAD (ours)PAA-R101PAA-R50241.6+1.2configmodel | log
SoLAD(ours)PAA-R101PAA-R500.542.4+2.0configmodel | log

2. A Pilot Study - Does LAD need a bigger teacher network?

Table 3: Compare Soft-Label and Label Assignment Distillation (LAD) on COCO validation set. Teacher and student use ResNet50 and ResNet101 backbone, respectively. 2× denotes the 2× training schedule.

MethodTeacherStudentmAPImproveConfigDownload
BaselineNonePAA-R5040.4-configmodel | log
Baseline (1x)NonePAA-R10142.6-configmodel | log
Baseline (2x)NonePAA-R10143.5+0.9configmodel | log
Soft-LabelPAA-R50PAA-R10140.4-2.2configmodel | log
LAD (our)PAA-R50PAA-R10143.3+0.7configmodel | log

3. Compare with State-ot-the-art Label Assignment methods

We use the PAA-R50 3x pretrained with multi-scale on COCO as the initial teacher. The teacher was evaluated with 43:3AP on the minval set. We train our network with the COP branch, and the post-processing steps are similar to PAA.

MethodAPAP50AP75APsAPmAPlDownload
FCOS41.560.745.024.444.851.6
NoisyAnchor41.861.144.923.444.952.9
FreeAnchor43.162.246.424.546.154.8
SAPD43.563.646.524.946.854.6
MAL43.661.847.125.046.955.8
ATSS43.662.147.426.147.053.6
AutoAssign44.564.348.425.947.455.0
PAA44.863.348.726.548.856.3
OTA45.363.549.326.948.856.1
IQDet45.163.449.326.748.556.6
CoLAD (ours)46.064.450.627.949.957.3config | model | log

4. Appendix - Ablation Study of Conditional Objectness Prediction (COP)

Table 1 - Appendix: Compare different auxiliary predictions: IoU, Implicit Object prediction (IOP), and Conditional Objectness prediction (COP), with ResNet-18 and ResNet-50 backbones. Experiments on COCO validate set.

IoUIOPCOPResNet-18ResNet-50
:heavy_check_mark:35.8 (config | model | log)40.4 (config | model | log)
:heavy_check_mark::heavy_check_mark:36.7 (config | model | log)41.6 (config | model | log)
:heavy_check_mark::heavy_check_mark:36.9 (config | model | log)41.6 (config | model | log)
:heavy_check_mark:36.6 (config | model | log)41.1 (config | model | log)
:heavy_check_mark:36.9 (config | model | log)41.2 (config | model | log)

Citation

Please cite the paper in your publications if it helps your research:

@misc{nguyen2021improving,
      title={Improving Object Detection by Label Assignment Distillation}, 
      author={Chuong H. Nguyen and Thuy C. Nguyen and Tuan N. Tang and Nam L. H. Phan},
      year={2021},
      eprint={2108.10520},
      archivePrefix={arXiv},
      primaryClass={cs.CV}
}