Code Monkey home page Code Monkey logo

codes-for-intra-kd's Introduction

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.