{"id":13497200,"url":"https://github.com/xiaoyufenfei/Efficient-Segmentation-Networks","last_synced_at":"2025-03-28T21:32:04.648Z","repository":{"id":37617118,"uuid":"213285753","full_name":"xiaoyufenfei/Efficient-Segmentation-Networks","owner":"xiaoyufenfei","description":"Lightweight models for real-time semantic segmentationon PyTorch (include SQNet, LinkNet, SegNet, UNet, ENet, ERFNet, EDANet, ESPNet, ESPNetv2, LEDNet, ESNet, FSSNet, CGNet, DABNet, Fast-SCNN, ContextNet, FPENet, etc.)","archived":false,"fork":false,"pushed_at":"2024-07-25T10:16:24.000Z","size":1174,"stargazers_count":914,"open_issues_count":21,"forks_count":164,"subscribers_count":20,"default_branch":"master","last_synced_at":"2024-10-31T13:34:15.894Z","etag":null,"topics":["camvid","cityscapes","computer-vision","driving-scene-understanding","efficient-segmentation-networks","image-segmentation","lightweight-semantic-segmentation","neural-networks","pytorch","real-time-semantic-segmentation","scene-understanding","segmentation","semantic-segmentation","semantic-segmentation-models"],"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/xiaoyufenfei.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-10-07T03:16:07.000Z","updated_at":"2024-10-29T17:34:32.000Z","dependencies_parsed_at":"2024-10-31T13:31:47.124Z","dependency_job_id":"df3d8a96-b511-4ca1-81ff-e66d7e2de40a","html_url":"https://github.com/xiaoyufenfei/Efficient-Segmentation-Networks","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/xiaoyufenfei%2FEfficient-Segmentation-Networks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiaoyufenfei%2FEfficient-Segmentation-Networks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiaoyufenfei%2FEfficient-Segmentation-Networks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiaoyufenfei%2FEfficient-Segmentation-Networks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xiaoyufenfei","download_url":"https://codeload.github.com/xiaoyufenfei/Efficient-Segmentation-Networks/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246105292,"owners_count":20724289,"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","computer-vision","driving-scene-understanding","efficient-segmentation-networks","image-segmentation","lightweight-semantic-segmentation","neural-networks","pytorch","real-time-semantic-segmentation","scene-understanding","segmentation","semantic-segmentation","semantic-segmentation-models"],"created_at":"2024-07-31T20:00:26.464Z","updated_at":"2025-03-28T21:32:04.216Z","avatar_url":"https://github.com/xiaoyufenfei.png","language":"Python","funding_links":[],"categories":["SemanticSeg","⚡ Real-time \u0026 Mobile Segmentation"],"sub_categories":["📚 Comprehensive Repositories"],"readme":"## Efficient-Segmentation-Networks\n[![python-image]][python-url]\n[![pytorch-image]][pytorch-url]\n\nThis project aims at providing an easy-to-use, modifiable reference implementation for real-time semantic segmentation models using PyTorch.\n\n\u003cp align=\"center\"\u003e\u003cimg width=\"100%\" src=\"docs/image-1.png\" /\u003e\u003c/p\u003e\n---\n\n### Table of Contents:\n- \u003ca href='#Requirements'\u003eRequirements\u003c/a\u003e\n- \u003ca href='#Models'\u003eModels\u003c/a\u003e\n- \u003ca href='#Dataset-Setting'\u003eDataset Setting\u003c/a\u003e\n- \u003ca href='#Usage'\u003eUsage\u003c/a\u003e\n- \u003ca href='#Contact'\u003eContact\u003c/a\u003e\n\n### Requirements\n\n [**PyTorch**](https://pytorch.org/) and [**Torchvision**](https://pytorch.org/) needs to be installed before running the scripts,  PyTorch v1.1 or later is supported. \n\n```bash\npip3 install -r requirements.txt\n```\n\n### Models\n\nThe project supports these semantic segmentation models as follows:\n- (**SQNet**) Speeding up Semantic Segmentation for Autonomous Driving [[Paper]](https://openreview.net/pdf?id=S1uHiFyyg)\n- (**LinkNet**)  Exploiting Encoder Representations for Efficient Semantic Segmentation [[Paper]](https://arxiv.org/pdf/1707.03718.pdf)\n- (**SegNet**)  A Deep Convolutional Encoder-Decoder Architecture for Image Segmentation [[Paper]](https://arxiv.org/pdf/1511.00561.pdf)\n- (**UNet**)  Convolutional Networks for Biomedical Image Segmentation [[Paper]](https://arxiv.org/pdf/1505.04597.pdf)\n- (**ENet**)  A Deep Neural Network Architecture for Real-Time Semantic Segmentation [[Paper]](https://arxiv.org/pdf/1606.02147.pdf)\n- (**ERFNet**)  Efficient ConvNet for Real-time Semantic Segmentation [[Paper]](http://www.robesafe.uah.es/personal/eduardo.romera/pdfs/Romera17iv.pdf)\n- (**EDANet**)  Efficient Dense Modules of Asymmetric Convolution for Real-Time Segmentation [[Paper]](https://arxiv.org/ftp/arxiv/papers/1809/1809.06323.pdf)\n- (**ESPNet**)  Efficient Spatial Pyramid of Dilated  Convolutions for Semantic Segmentation [[Paper]](https://arxiv.org/pdf/1803.06815v2.pdf)\n- (**ESPNetv2**)  A Light-weight, Power Efficient, and General Purpose ConvNet [[Paper]](https://arxiv.org/pdf/1811.11431.pdf)\n- (**LEDNet**)  A Lightweight Encoder-Decoder Network for Real-Time Semantic Segmentation [[Paper]](https://arxiv.org/pdf/1905.02423v3.pdf)\n- (**FSSNet**)  Fast Semantic Segmentation for Scene Perception [[Paper]](https://ieeexplore.ieee.org/stamp/stamp.jsp?tp=\u0026arnumber=8392426)\n- (**ESNet**)  An Efficient Symmetric Network for Real-time Semantic Segmentation [[Paper]](https://arxiv.org/pdf/1906.09826v1.pdf)\n- (**CGNet**)  A Light-weight Context Guided Network for Semantic Segmentation [[Paper]](https://arxiv.org/pdf/1811.08201.pdf)\n- (**Fast-SCNN**)  Fast Semantic Segmentation Network [[Paper]](https://arxiv.org/pdf/1902.04502.pdf)\n- (**DABNet**)  Depth-wise Asymmetric Bottleneck for Real-time Semantic Segmentation [[Paper]](https://arxiv.org/pdf/1907.11357.pdf)\n- (**ContextNet**)  Exploring Context and Detail  for Semantic Segmentation in Real-time [[Paper]](https://arxiv.org/pdf/1805.04554.pdf)\n- (**FPENet**) Feature Pyramid Encoding Network for Real-time Semantic Segmentation [[Paper]](https://arxiv.org/pdf/1909.08599v1.pdf)\n- ...\n\n#### Losses\n\n The project supports these loss functions: \n\n\u003e 1. Weighted Cross Entropy\n\u003e 2. Weighted Cross Entropy with Label Smooth\n\u003e 3. Focal Loss\n\u003e 4. Ohem Cross Entropy\n\u003e 5. [LovaszSoftmax](https://github.com/bermanmaxim/LovaszSoftmax)\n\u003e 6. [SegLoss-List](https://github.com/JunMa11/SegLoss)\n\u003e 7. ...\n\n#### Optimizers\n\n The project supports these optimizers: \n\n\u003e 1. SGD\n\u003e 2. Adam \n\u003e 3. AdamW \n\u003e 4. [RAdam](https://github.com/LiyuanLucasLiu/RAdam)\n\u003e 5. RAdam + Lookahead\n\u003e 6. ...\n\n#### Activations\n\n\u003e 1. ReLu\n\u003e 2. PReLU\n\u003e 3. ReLU6\n\u003e 4. Swish\n\u003e 5. [Mish](https://github.com/digantamisra98/Mish) : A Self Regularized Non-Monotonic Neural Activation Function\n\u003e 6. ...\n\n#### Learning Rate Scheduler\n\nThe project supports these LR_Schedulers: \n\n\u003e 1. Poly decay\n\u003e 2. Warmup Poly  \n\u003e 3. ...\n\n#### Normalization methods\n\n\u003e 1. [In-Place Activated BatchNorm](https://github.com/mapillary/inplace_abn)\n\u003e 2. [Switchable Normalization](https://github.com/switchablenorms/Switchable-Normalization)\n\u003e 3. [Weight Standardization](https://github.com/joe-siyuan-qiao/WeightStandardization)\n\u003e 4. ...\n\n#### Enhancing Semantic Feature Learning Method\n\n\u003e 1. [Attention Family](https://github.com/implus/PytorchInsight)\n\u003e 2. [NAS Family](https://github.com/D-X-Y/NAS-Projects)\n\u003e 3. ...\n\n#### Some useful Tools\n\n\u003e 1. [pytorch-OpCounter](https://github.com/Lyken17/pytorch-OpCounter)\n\u003e 2. [flops-counter.pytorch](https://github.com/sovrasov/flops-counter.pytorch) \n\u003e 3. [Netron](https://github.com/lutzroeder/Netron) : Visualizer for neural network models, On line URL: [Netron](https://lutzroeder.github.io/netron/)\n\u003e 4. [Falshtorch](https://github.com/MisaOgura/flashtorch): Visualization toolkit for neural networks in PyTorch !\n\u003e 5. [Bag of Tricks for Image Classification with Convolutional Neural Networks](https://github.com/weiaicunzai/Bag_of_Tricks_for_Image_Classification_with_Convolutional_Neural_Networks)\n\u003e 6. ...\n\n### Dataset-Setting\n\nThis project has been tailored to suit the [Cityscapes](https://www.cityscapes-dataset.com/) and  [CamVid](http://mi.eng.cam.ac.uk/research/projects/VideoRec/CamVid/)  datasets. The folds of your dataset need satisfy the following structures: \n\n```\n|-- dataset\n|  |-- camvid\n|  |  |-- train\n|  |  |-- trainannot\n|  |  |-- val\n|  |  |-- valannot\n|  |  |-- test\n|  |  |-- testannot\n|  |  |-- ...\n|  |-- cityscapes\n|  |  |-- leftImg8bit\n|  |  |  |-- train\n|  |  |  |-- val\n|  |  |  |-- test\n|  |  |-- gtFine\n|  |  |  |-- train\n|  |  |  |-- val\n|  |  |  |-- test\n|  |  |-- ...\n```\n\n- You can download [**cityscapes**](https://www.cityscapes-dataset.com/)  dataset from [here](https://www.cityscapes-dataset.com/downloads/). Note: please download [leftImg8bit_trainvaltest.zip(11GB)](https://www.cityscapes-dataset.com/file-handling/?packageID=4) and [gtFine_trainvaltest(241MB)](https://www.cityscapes-dataset.com/file-handling/?packageID=1).\n- You can download [**camvid**](http://mi.eng.cam.ac.uk/research/projects/VideoRec/CamVid/) dataset from [here](https://github.com/alexgkendall/SegNet-Tutorial/tree/master/CamVid).\n- The **Cityscapes dataset scripts** for inspection, preparation, and evaluation can download from [here](https://github.com/mcordts/cityscapesScripts).\n\n### Usage\n\n#### Clone this Repo\n\n```\ngit clone https://github.com/xiaoyufenfei/Efficient-Segmentation-Networks\ncd Efficient-Segmentation-Networks\n```\n\nCurrently, the code supports [Python 3](https://www.python.org/)\n\n Torch dependencies: \n\n- [PyTorch](https://pytorch.org/) (\u003e=1.1.0)\n- torchvision(\u003e=0.3.0)\n\nData dependencies:\n\n- [Cityscapes](https://www.cityscapes-dataset.com/) + [scripts](https://github.com/mcordts/cityscapesScripts)\n\nDownload Cityscapes and run the script `createTrainIdLabelImgs.py` to create annotations based on the training labels. Make sure that the folder is named *cityscapes*\n\n##### Training\n- For Cityscapes / CamVid\n\n1. training on **train** set\n\n```\npython train.py  --help\n```\n\n2. training on **train+val** set\n\n```\npython train.py --help\n```\n\n##### Testing\n- For Cityscapes / CamVid\n\n```\npython test.py --help\n```\n\n##### Predicting\n- For Cityscapes\n\n```\npython predict.py --help\n```\n\n##### Evaluating\n- For Cityscapes\n\n```\ncd tools\npython trainID2labelID.py \n```\n\n### Contact\n\nIf you think this work useful, please give me a star! And if you find any errors or have any suggestions, please contact me.\n\n**GitHub:** `xiaoyufenfei`\n**Email:** `wangy314159@163.com`\n\n### Refer to this Rep\n\nYou are encouraged to cite the following papers if this work helps your research.\n\n```bash\n@misc{Efficient-Segmentation-Networks,\n  author = {Yu Wang},\n  title = {Efficient-Segmentation-Networks Pytorch Implementation},\n  year = {2019},\n  publisher = {GitHub},\n  journal = {GitHub repository},\n  howpublished = {\\url{https://github.com/xiaoyufenfei/Efficient-Segmentation-Networks}},\n  commit = {master}\n}\n```\n\n### License\n\nThis project is released under the MIT License. See [LICENSE](https://github.com/xiaoyufenfei/Efficient-Segmentation-Networks/blob/master/LICENSE) for additional details.\n\n\n\n\n[python-image]: https://img.shields.io/badge/Python-3.x-ff69b4.svg\n[python-url]: https://www.python.org/\n[pytorch-image]: https://img.shields.io/badge/PyTorch-1.1-2BAF2B.svg\n[pytorch-url]: https://pytorch.org/\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxiaoyufenfei%2FEfficient-Segmentation-Networks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxiaoyufenfei%2FEfficient-Segmentation-Networks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxiaoyufenfei%2FEfficient-Segmentation-Networks/lists"}