Skip to content
/ CIRKD Public
forked from winycg/CIRKD

[CVPR-2022] Official implementations of CIRKD: Cross-Image Relational Knowledge Distillation for Semantic Segmentation

Notifications You must be signed in to change notification settings

winqqx/CIRKD

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cross-Image Relational Knowledge Distillation for Semantic Segmentation

This repository contains the source code of CIRKD (Cross-Image Relational Knowledge Distillation for Semantic Segmentation).

Requirement

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:

Performance on Cityscapes

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.

Evaluate pre-trained models on Cityscapes val and test sets

Evaluate the pre-trained models on val set

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

Generate the resulting images on test set

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.

Citation

@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}
}

About

[CVPR-2022] Official implementations of CIRKD: Cross-Image Relational Knowledge Distillation for Semantic Segmentation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 97.5%
  • Shell 2.5%