Skip to content

hunto/MasKD

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Masked Distillation with Receptive Tokens (MasKD)

Official implementation of paper "Masked Distillation with Receptive Tokens" (MasKD), ICLR 2023.

By Tao Huang*, Yuan Zhang*, Shan You, Fei Wang, Chen Qian, Jian Cao, Chang Xu.

🔥 MasKD: better and more general feature distillation method for dense prediction tasks (e.g., detection and segmentation).

mask

Updates

March 04, 2023

Configs for KD are available in mmrazor folders and student checkpoints are provided.

May 30, 2022

Code for mask learning and KD is available in mmdetection and mmrazor folders.

Reproducing our results

Train students with pretrained masks

We provide the learned pretrained mask tokens in our experiments at release.

This repo uses MMRazor as the knowledge distillation toolkit. For environment setup, please see mmrazor/README.md.

Train student:

cd mmrazor
sh tools/mmdet/dist_train_mmdet.sh ${CONFIG} 8 ${WORK_DIR}

Example for reproducing our cascade_mask_rcnn_x101-fpn_r50 result:

sh tools/mmdet/dist_train_mmdet.sh configs/distill/maskd/cascade_mask_rcnn_x101-fpn_x50_coco.py 8 work_dirs/maskd_cmr_x101-fpn_x50

Results

Learning masks

You can train your own mask tokens with the code provided in mmdetection folder. Please check mmdetection/README.md for detailed instructions.

Semantic segmentation

For semantic segmentation, please see segmentation folder.

License

This project is released under the Apache 2.0 license.

Citation

@inproceedings{
huang2023masked,
title={Masked Distillation with Receptive Tokens},
author={Tao Huang and Yuan Zhang and Shan You and Fei Wang and Chen Qian and Jian Cao and Chang Xu},
booktitle={The Eleventh International Conference on Learning Representations },
year={2023},
url={https://openreview.net/forum?id=mWRngkvIki3}
}