Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/megengine/icd
This is the official implementation of the paper "Instance-conditional Knowledge Distillation for Object Detection", based on MegEngine and Pytorch.
https://github.com/megengine/icd
knowledge-distillation megengine object-detection pytorch
Last synced: 2 days ago
JSON representation
This is the official implementation of the paper "Instance-conditional Knowledge Distillation for Object Detection", based on MegEngine and Pytorch.
- Host: GitHub
- URL: https://github.com/megengine/icd
- Owner: MegEngine
- License: other
- Created: 2021-11-09T10:36:15.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-08-07T03:17:12.000Z (over 2 years ago)
- Last Synced: 2023-03-03T22:03:39.865Z (over 1 year ago)
- Topics: knowledge-distillation, megengine, object-detection, pytorch
- Language: Python
- Homepage:
- Size: 4.28 MB
- Stars: 49
- Watchers: 4
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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](./megengine_release/README.md) and [Pytorch](./pytorch_release/README.md). Go to the desired subfolders for more information and guidance!
> [**Instance-Conditional Knowledge Distillation for Object Detection**](https://arxiv.org/abs/2110.12724),
> Zijian Kang, Peizhen Zhang, Xiangyu Zhang, Jian Sun, Nanning Zheng
> In Proc. of Advances in Neural Information Processing Systems (NeurIPS), 2021
> [[arXiv](https://arxiv.org/abs/2110.12724)][[Citation](#citation)][[OpenReview](https://openreview.net/forum?id=k7aeAz4Vbb)]## Usage
You can find two implementations for [MegEngine](./megengine_release/README.md) and [Pytorch](./pytorch_release/README.md) 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](https://github.com/MegEngine/Models) and [Detectron2](https://github.com/facebookresearch/detectron2). We also refer to [Pytorch](https://github.com/pytorch/pytorch), [DETR](https://github.com/facebookresearch/detr) and [AdelaiDet](https://github.com/aim-uofa/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}
}
```