Skip to content
/ ICD Public

This is the official implementation of the paper "Instance-conditional Knowledge Distillation for Object Detection", based on MegEngine and Pytorch.

License

Notifications You must be signed in to change notification settings

MegEngine/ICD

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Instance-Conditional Knowledge Distillation for Object Detection

This is the official implementation of the paper "Instance-Conditional Knowledge Distillation for Object Detection", based on MegEngine and Pytorch. Go to the desired subfolders for more information and guidance!

Instance-Conditional Knowledge Distillation for Object Detection,
Zijian Kang, Peizhen Zhang, Xiangyu Zhang, Jian Sun, Nanning Zheng
In Proc. of Advances in Neural Information Processing Systems (NeurIPS), 2021
[arXiv][Citation][OpenReview]

Usage

You can find two implementations for MegEngine and Pytorch under two sub-folders. We use the latter one to report the performance in the paper. Switch to the subfolder for more information.

Try it in a few lines :

Take the detectron2 implementation as an example, you can train your model in a few lines:

cd pytorch_release

# Install dependancies
pip install pip --upgrade
pip install -r requirements.txt
pip install https://github.com/facebookresearch/detectron2/archive/refs/tags/v0.5.tar.gz
pip install 'git+https://github.com/aim-uofa/AdelaiDet.git@7bf9d87'

# Prepare dataset according to https://github.com/facebookresearch/detectron2/tree/main/datasets

# Train and distill a retinanet detector with ICD
python3 train_distill.py --num-gpus 8 --resume --config-file configs/Distillation-ICD/retinanet_R_50_R101_icd_FPN_1x.yaml OUTPUT_DIR output/icd_retinanet

Performance

For object detection in MS-COCO:

Model Baseline (BoxAP) + Ours (BoxAP)
Faster R-CNN 37.9 40.9 (+3.0)
Retinanet 37.4 40.7 (+3.3)
FCOS 39.4 42.9 (+3.5)

For instance-segmentation in MS-COCO:

Model Baseline (BoxAP) + Ours (BoxAP) Baseline (MaskAP) + Ours (MaskAP)
Mask R-CNN 38.6 41.2 (+2.6) 35.2 37.4 (+2.2)
SOLOv2 - - 34.6 38.5 (+3.9)
CondInst 39.7 43.7 (+4.0) 35.7 39.1 (+3.4)

Acknowledgement

Some files are modified from MegEngine Models and Detectron2. We also refer to Pytorch, DETR and AdelaiDet for some implementations.

License

This repo is licensed under the Apache License, Version 2.0 (the "License").

Citation

You can use the following BibTeX entry for citation in your research.

@inproceedings{icd_neurips2021,
 author = {Kang, Zijian and Zhang, Peizhen and Zhang, Xiangyu and Sun, Jian and Zheng, Nanning},
 booktitle = {Advances in Neural Information Processing Systems},
 editor = {M. Ranzato and A. Beygelzimer and Y. Dauphin and P.S. Liang and J. Wortman Vaughan},
 pages = {16468--16480},
 publisher = {Curran Associates, Inc.},
 title = {Instance-Conditional Knowledge Distillation for Object Detection},
 url = {https://proceedings.neurips.cc/paper/2021/file/892c91e0a653ba19df81a90f89d99bcd-Paper.pdf},
 volume = {34},
 year = {2021}
}

About

This is the official implementation of the paper "Instance-conditional Knowledge Distillation for Object Detection", based on MegEngine and Pytorch.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages