Home

Awesome

Continual Detection Transformer for Incremental Object Detection

LICENSE Python PyTorch

[Paper] [Project Page]

This repository contains the PyTorch implementation for the CVPR 2023 Paper "Continual Detection Transformer for Incremental Object Detection" by Yaoyao Liu, Bernt Schiele, Andrea Vedaldi, and Christian Rupprecht.

This is the preliminary code. If you have any questions on this repository or the related paper, feel free to create an issue or send me an email.

Installation and Datasets

This code is based on Deformable DETR. You may follow the instructions in https://github.com/fundamentalvision/Deformable-DETR to install packages and prepare datasets for this project.

Requirements

Compiling CUDA Operators

cd ./models/ops
sh ./make.sh
# unit test (should see all checking is True)
python test.py

Dataset Preparation

Please download COCO 2017 dataset and organize them as following:

code_root/
└── data/
    └── coco/
        ├── train2017/
        ├── val2017/
        └── annotations/
        	├── instances_train2017.json
        	└── instances_val2017.json

Performance

Incremental object detection results (%) on COCO 2017. In the A+B setup, in the first phase, we observe a fraction $\frac{A}{A+B}$ of the training samples with A categories annotated. Then, in the second phase, we observe the remaining $\frac{B}{A+B}$ of the training samples, where B new categories are annotated.

SettingDetection Baseline$AP$${AP}_{50}$${AP}_{75}$${AP}_{S}$${AP}_{M}$${AP}_{L}$
70+10Deformable DETR40.157.843.723.243.252.1
40+40Deformable DETR37.555.140.320.940.850.7

Checkpoints

You may download the checkpoints here: [link]. The experiment setting is COCO 2017, 70+10. Please put the phase-0 checkpoint, phase_0.pth, in the base directory before running the code. The current version will automatically load the phase-0 checkpoint to speed up the experiments. This is because phase 0 is not an incremental learning phase. It is the same as the standard Deformable DETR.

Running Experiments

Run the following script to start the experiment for COCO 2017, 70+10:

bash run.sh

If you need to run experiments for the 40+40 setting, you may need to change the code in multiple files, e.g., main.py and datasets/pycocotools.py. Please refer to this branch for the 40+40 experiments: https://github.com/yaoyao-liu/CL-DETR/tree/40_40

Citation

Please cite our paper if it is helpful to your work:

@inproceedings{Liu2023CLDETR,
  author       = {Yaoyao Liu and
                  Bernt Schiele and
                  Andrea Vedaldi and
                  Christian Rupprecht},
  title        = {Continual Detection Transformer for Incremental Object Detection},
  booktitle    = {{IEEE/CVF} Conference on Computer Vision and Pattern Recognition,
                  {CVPR} 2023, Vancouver, BC, Canada, June 17-24, 2023},
  pages        = {23799--23808},
  publisher    = {{IEEE}},
  year         = {2023}
}

Acknowledgement

Our implementation uses the source code from the following repository: