Skip to content

Inter-Region Affinity Distillation for Road Marking Segmentation (CVPR 2020)

License

Notifications You must be signed in to change notification settings

cardwing/Codes-for-IntRA-KD

Repository files navigation

Codes for "Inter-Region Affinity Distillation for Road Marking Segmentation"

Requirements

Before start

Please follow list to put ApolloScape in the desired folder. We'll call the directory that you cloned Codes-for-IntRA-KD as `$IntRA_KD_ROOT .

Testing

  1. Obtain model predictions from trained weights:

Download the trained ResNet-101 and ERFNet, and put them in the folder trained_model.

    cd $IntRA_KD_ROOT
    sh test_pspnet_multi_scale.sh # sh test_erfnet_multi_scale.sh

The output predictions will be saved to road05_tmp by default.

  1. Transfer TrainID to ID:
    python road_npy2img.py

The outputs will be stored in road05 by default.

  1. Generate zip files:
    mkdir test
    mv road05 test/
    zip -r test.zip test

Now, just upload test.zip to ApolloScape online server. The trained ResNet-101 can achieve 46.63% mIoU and trained ERFNet can achieve 43.48% mIoU.

  1. (Optional) Produce color maps from model predictions:
    python trainId2color.py
  1. (Optional) Leverage t-SNE to visualize the feature maps:

Please use the script to perform the visualization.

Training

    cd $IntRA_KD_ROOT
    sh train_pspnet.sh # sh train_erfnet_vanilla.sh

Please make sure that you have 8 GPUs and each GPU has least 11 GB memory if you want to train ResNet-101.

Citation

If you use the codes, please cite the following publication:

@inproceedings{hou2020interregion,
  title     = {Inter-Region Affinity Distillation for Road Marking Segmentation},
  author    = {Yuenan Hou, Zheng Ma, Chunxiao Liu, Tak-Wai Hui, and Chen Change Loy},
  booktitle = {IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
  year      = {2020},
} 

Acknowledgement

This repo is built upon ERFNet-CULane-PyTorch.

Contact

If you have any problems in reproducing the results, just raise an issue in this repo.

To-Do List

  • Training codes of IntRA-KD and various baseline KD methods for ApolloScape

About

Inter-Region Affinity Distillation for Road Marking Segmentation (CVPR 2020)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published