This repository contains the source code of CIRKD (Cross-Image Relational Knowledge Distillation for Semantic Segmentation).
Ubuntu 18.04 LTS
Python 3.8 (Anaconda is recommended)
CUDA 11.1
PyTorch 1.8.0
NCCL for CUDA 11.1
Backbones pretrained on ImageNet:
All models are trained over 8 * NVIDIA GeForce RTX 3090
Role | Network | Method | Val mIoU | test mIoU | Pretrained | train script |
---|---|---|---|---|---|---|
Teacher | DeepLabV3-ResNet101 | - | 78.07 | 77.46 | Google Drive | sh |
Student | DeepLabV3-ResNet18 | Baseline | 74.21 | 73.45 | - | sh |
Student | DeepLabV3-ResNet18 | CIRKD | 76.38 | 75.05 | Google Drive | sh |
Student | DeepLabV3-ResNet18* | Baseline | 65.17 | 65.47 | - | sh |
Student | DeepLabV3-ResNet18* | CIRKD | 68.18 | 68.22 | Google Drive | sh |
Student | DeepLabV3-MobileNetV2 | Baseline | 73.12 | 72.36 | - | sh |
Student | DeepLabV3-MobileNetV2 | CIRKD | 75.42 | 74.03 | Google Drive | sh |
Student | PSPNet-ResNet18 | Baseline | 72.55 | 72.29 | - | sh |
Student | PSPNet-ResNet18 | CIRKD | 74.73 | 74.05 | Google Drive | sh |
*denotes that we do not initialize the backbone with ImageNet pre-trained weights.
python -m torch.distributed.launch --nproc_per_node=8 eval.py \
--model deeplabv3 \
--backbone resnet101 \
--data [your dataset path]/cityscapes/ \
--save-dir [your directory path to store log files] \
--gpu-id 0,1,2,3,4,5,6,7 \
--pretrained [your checkpoint path]/deeplabv3_resnet101_citys_best_model.pth
python -m torch.distributed.launch --nproc_per_node=4 test.py \
--model deeplabv3 \
--backbone resnet101 \
--data [your dataset path]/cityscapes/ \
--save-dir [your directory path to store resulting images] \
--gpu-id 0,1,2,3 \
--save-pred \
--pretrained [your checkpoint path]/deeplabv3_resnet101_citys_best_model.pth
You can submit the resulting images to the Cityscapes test server.
@inproceedings{yang2022cross,
title={Cross-Image Relational Knowledge Distillation for Semantic Segmentation},
author={Chuanguang Yang, Helong Zhou, Zhulin An, Xue Jiang, Yongjun Xu, Qian Zhang},
booktitle={IEEE/CVF Conference on Computer Vision and Pattern Recognition},
year={2022}
}