{"id":19178982,"url":"https://github.com/drsleep/nas-segm-pytorch","last_synced_at":"2025-04-20T03:33:05.945Z","repository":{"id":79073755,"uuid":"192142183","full_name":"DrSleep/nas-segm-pytorch","owner":"DrSleep","description":"Code for Fast Neural Architecture Search of Compact Semantic Segmentation Models via Auxiliary Cells, CVPR '19","archived":false,"fork":false,"pushed_at":"2020-06-25T00:16:52.000Z","size":21733,"stargazers_count":147,"open_issues_count":2,"forks_count":25,"subscribers_count":8,"default_branch":"master","last_synced_at":"2023-10-20T19:28:13.530Z","etag":null,"topics":["camvid","cityscapes","cvpr-2019","dense-per-pixel-tasks","depth-estimation","neural-architecture-search","pytorch","real-time","semantic-segmentation","wacv2020"],"latest_commit_sha":null,"homepage":null,"language":"Smalltalk","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DrSleep.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":"2019-06-16T02:30:36.000Z","updated_at":"2023-09-16T02:58:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"7781c094-03b7-4614-b2cd-0a3426a6ca4e","html_url":"https://github.com/DrSleep/nas-segm-pytorch","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DrSleep%2Fnas-segm-pytorch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DrSleep%2Fnas-segm-pytorch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DrSleep%2Fnas-segm-pytorch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DrSleep%2Fnas-segm-pytorch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DrSleep","download_url":"https://codeload.github.com/DrSleep/nas-segm-pytorch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223817896,"owners_count":17207947,"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":["camvid","cityscapes","cvpr-2019","dense-per-pixel-tasks","depth-estimation","neural-architecture-search","pytorch","real-time","semantic-segmentation","wacv2020"],"created_at":"2024-11-09T10:41:40.114Z","updated_at":"2024-11-09T10:41:40.733Z","avatar_url":"https://github.com/DrSleep.png","language":"Smalltalk","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Neural Architecture Search of Semantic Segmentation Models (in PyTorch)\n\n[![PWC](https://img.shields.io/endpoint.svg?url=https://paperswithcode.com/badge/fast-neural-architecture-search-of-compact/monocular-depth-estimation-on-nyu-depth-v2)](https://paperswithcode.com/sota/monocular-depth-estimation-on-nyu-depth-v2?p=fast-neural-architecture-search-of-compact)\n[![PWC](https://img.shields.io/endpoint.svg?url=https://paperswithcode.com/badge/fast-neural-architecture-search-of-compact/semantic-segmentation-on-pascal-voc-2012-val)](https://paperswithcode.com/sota/semantic-segmentation-on-pascal-voc-2012-val?p=fast-neural-architecture-search-of-compact)\n[![PWC](https://img.shields.io/endpoint.svg?url=https://paperswithcode.com/badge/template-based-automatic-search-of-compact/semantic-segmentation-on-camvid)](https://paperswithcode.com/sota/semantic-segmentation-on-camvid?p=template-based-automatic-search-of-compact)\n[![PWC](https://img.shields.io/endpoint.svg?url=https://paperswithcode.com/badge/template-based-automatic-search-of-compact/real-time-semantic-segmentation-on-cityscapes)](https://paperswithcode.com/sota/real-time-semantic-segmentation-on-cityscapes?p=template-based-automatic-search-of-compact)\n[![PWC](https://img.shields.io/endpoint.svg?url=https://paperswithcode.com/badge/template-based-automatic-search-of-compact/semantic-segmentation-on-cityscapes-val)](https://paperswithcode.com/sota/semantic-segmentation-on-cityscapes-val?p=template-based-automatic-search-of-compact)\n[![PWC](https://img.shields.io/endpoint.svg?url=https://paperswithcode.com/badge/template-based-automatic-search-of-compact/semantic-segmentation-on-cityscapes)](https://paperswithcode.com/sota/semantic-segmentation-on-cityscapes?p=template-based-automatic-search-of-compact)\n\n\nThis repository provides official models from two papers:\n1. `Fast Neural Architecture Search of Compact Semantic Segmentation Models via Auxiliary Cells`, available [here](https://arxiv.org/abs/1810.10804);\n2. `Template-Based Automatic Search of Compact Semantic Segmentation Architectures`, available [here](https://arxiv.org/abs/1904.02365).\n\nFor citations:\n```\nFast Neural Architecture Search of Compact Semantic Segmentation Models via Auxiliary Cells\nVladimir Nekrasov, Hao Chen, Chunhua Shen, Ian Reid\nCVPR, 2019\n```\nand\n\n```\nTemplate-Based Automatic Search of Compact Semantic Segmentation Architectures\nVladimir Nekrasov, Chunhua Shen, Ian Reid\nWACV, 2020\n```\n\n## Updates\n\n*22 May, 2020*: Added the search script for the WACV 2020 experiments on CityScapes.\n\n*05 April, 2020* : Added decoder design and pre-trained segmentation models from the WACV 2020 paper [\"Template-Based Automatic Search of Compact Semantic Segmentation Architectures\"](https://arxiv.org/abs/1904.02365).\n\n## Getting Started\n\nFor flawless reproduction of our results, the Ubuntu OS is recommended. The models have been tested using Python 3.6.\n\n### Dependencies\n\n```\npip3\nCython\ncv2\njupyter-notebook\nmatplotlib\nnumpy\nPillow\ntorch\u003e=1.0\ntorchvision\n```\n\n## Inference Examples\n\nFor the ease of reproduction, we have embedded all our examples inside Jupyter notebooks.\n\n### CVPR 2019 Segmentation\n\nPlease refer to results on [PASCAL VOC](./examples/inference/VOC-segm.ipynb)\n\n### CVPR 2019 Depth Estimation\n\nPlease refer to results on [NYUD-v2](./examples/inference/NYU-depth.ipynb)\n\n### WACV 2020 Segmentation CityScapes\n\nPlease refer to results on [CityScapes](./examples/inference/WACV-CS-segm.ipynb)\n\n### WACV 2020 Segmentation CamVid\n\nPlease refer to results on [CamVid](./examples/inference/WACV-CV-segm.ipynb)\n\n## Note on the runtime of WACV 2020 models\n\nIn the paper we wrongly claimed that the latency of `arch0` and `arch1` on `2048x1048` inputs were `95.7±0.721` and `145±0.215`, correspondingly (on a single `1080Ti`). These numbers were incorrect as the model was in the training regime and not in the evaluation mode (`model.eval()` in PyTorch). Below are the characteristics of the discovered architectures with correct latency:\n\n|| arch0 | arch1\n| -------- |:-------------:| -----:|\n|Number of parameters (19 output classes)|280147|268235\n|Latency, ms on 2048x1024 inputs|52.25±0.03|97.11±0.24\n|Latency, ms on 480x360 inputs|8.97±0.10|11.51±0.14\n\n\n## Search\n\nIf you would like to search for architectures yourself, please follow the instructions below:\n\n### CVPR 2019 (PASCAL VOC)\n\n#### Prepare data\n\nYou would need to have PASCAL VOC segmentation dataset expanded with annotations from BSD.\n\nAfter that, run in your terminal:\n\n```bash\nmkdir data/datasets\nln -s /path_to_voc/VOCdevkit data/datasets/\n```\n\n#### Running search\n\nWe rely on a Cython-based script for calculating mean IoU. In order to build the corresponding files, run the following:\n\n```bash\ncd src\npython helpers/setup.py build_ext --build-lib=./helpers/\n```\n\nAfter that, you can execute `./examples/search/search.sh` that will start the search process.\n\n***[!] Please note that all the hyperparameters were tuned for running the search process on 2 GPUs, each with at least 11GB of memory. In case when your setup differs, you would need to tune the hyperparameters accordingly.***\n\n#### Checking the results\n\nWe output the log-file with all information on the search process. You can easily see top-performing architectures using the following command: `python src/helpers/num_uq.py path_to_genotypes.out`\n\n### WACV 2020 (CityScapes)\n\n#### Prepare data\n\nYou would need to have the CityScapes segmentation dataset.\n\nAfter that, run in your terminal:\n\n```bash\nmkdir data/datasets\nln -s /path_to_cityscapes/cs/ data/datasets/\n```\n\n#### Running search\n\nAfter that, you can execute `./examples/search/search_wacv.sh` that will start the search process.\n\n***[!] Please note that all the hyperparameters were tuned for running the search process on 2 1080Ti GPUs. In case when your setup differs, you would need to tune the hyperparameters accordingly.***\n\n## License\n\nThis project is free to use for non-commercial purposes - see the [LICENSE](LICENSE) file for details.\n\n## Acknowledgments\n\n* University of Adelaide and Australian Centre for Robotic Vision (ACRV) for making this project happen\n* HPC Phoenix cluster at the University of Adelaide for making the training of the models possible\n* PyTorch developers\n* Yerba mate tea\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrsleep%2Fnas-segm-pytorch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdrsleep%2Fnas-segm-pytorch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrsleep%2Fnas-segm-pytorch/lists"}