{"id":18005585,"url":"https://github.com/cardwing/codes-for-intra-kd","last_synced_at":"2025-03-26T10:32:10.643Z","repository":{"id":111642221,"uuid":"244263275","full_name":"cardwing/Codes-for-IntRA-KD","owner":"cardwing","description":"Inter-Region Affinity Distillation for Road Marking Segmentation (CVPR 2020)","archived":false,"fork":false,"pushed_at":"2020-04-14T07:19:32.000Z","size":800,"stargazers_count":116,"open_issues_count":17,"forks_count":24,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-21T15:41:54.067Z","etag":null,"topics":["cnn","deep-learning","lane-detection","pytorch","road-marking-segmentation"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cardwing.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2020-03-02T02:35:14.000Z","updated_at":"2025-01-04T09:59:37.000Z","dependencies_parsed_at":"2023-05-25T00:30:41.789Z","dependency_job_id":null,"html_url":"https://github.com/cardwing/Codes-for-IntRA-KD","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cardwing%2FCodes-for-IntRA-KD","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cardwing%2FCodes-for-IntRA-KD/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cardwing%2FCodes-for-IntRA-KD/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cardwing%2FCodes-for-IntRA-KD/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cardwing","download_url":"https://codeload.github.com/cardwing/Codes-for-IntRA-KD/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245637130,"owners_count":20648097,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cnn","deep-learning","lane-detection","pytorch","road-marking-segmentation"],"created_at":"2024-10-30T00:20:42.603Z","updated_at":"2025-03-26T10:32:09.986Z","avatar_url":"https://github.com/cardwing.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Codes for [\"Inter-Region Affinity Distillation for Road Marking Segmentation\"](https://arxiv.org/abs/2004.05304)\n\n## Requirements\n- [PyTorch 0.3.0](https://pytorch.org/get-started/previous-versions/)\n- Opencv\n- cvbase\n\n## Before start\n\nPlease follow [list](./list) to put ApolloScape in the desired folder. We'll call the directory that you cloned Codes-for-IntRA-KD as `$IntRA_KD_ROOT .\n\n## Testing\n\n1. Obtain model predictions from trained weights:\n\nDownload the trained [ResNet-101](https://drive.google.com/open?id=16TJW4K69uSb_ChBlbqX33aJ7LP43dhKf) and [ERFNet](https://drive.google.com/open?id=145B-xNl89R7H9qEZ6r8TzK-KSG6jf0Dp), and put them in the folder ```trained_model```.\n```\n    cd $IntRA_KD_ROOT\n    sh test_pspnet_multi_scale.sh # sh test_erfnet_multi_scale.sh\n```\n\nThe output predictions will be saved to ```road05_tmp``` by default.\n\n2. Transfer TrainID to ID:\n```\n    python road_npy2img.py\n```\n\nThe outputs will be stored in ```road05``` by default. \n\n3. Generate zip files:\n```\n    mkdir test\n    mv road05 test/\n    zip -r test.zip test\n```\n\nNow, just upload test.zip to [ApolloScape online server](http://apolloscape.auto/submit.html). The trained ResNet-101 can achieve **46.63%** mIoU and trained ERFNet can achieve **43.48%** mIoU.\n\n\n4. (Optional) Produce color maps from model predictions:\n```\n    python trainId2color.py\n```\n\n5. (Optional) Leverage t-SNE to visualize the feature maps:\n\nPlease use the [script](https://github.com/cardwing/Codes-for-Steering-Control/blob/master/tools/draw_tsne.py) to perform the visualization.\n \n## Training\n```\n    cd $IntRA_KD_ROOT\n    sh train_pspnet.sh # sh train_erfnet_vanilla.sh\n```\n\nPlease make sure that you have 8 GPUs and each GPU has least 11 GB memory if you want to train ResNet-101.\n\n## Citation\n\nIf you use the codes, please cite the following publication:\n```\n@inproceedings{hou2020interregion,\n  title     = {Inter-Region Affinity Distillation for Road Marking Segmentation},\n  author    = {Yuenan Hou, Zheng Ma, Chunxiao Liu, Tak-Wai Hui, and Chen Change Loy},\n  booktitle = {IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},\n  year      = {2020},\n} \n```\n\n## Acknowledgement\nThis repo is built upon [ERFNet-CULane-PyTorch](https://github.com/cardwing/Codes-for-Lane-Detection).\n\n## Contact\nIf you have any problems in reproducing the results, just raise an issue in this repo.\n\n## To-Do List\n- [ ] Training codes of IntRA-KD and various baseline KD methods for ApolloScape\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcardwing%2Fcodes-for-intra-kd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcardwing%2Fcodes-for-intra-kd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcardwing%2Fcodes-for-intra-kd/lists"}