{"id":13857056,"url":"https://github.com/oandrienko/fast-semantic-segmentation","last_synced_at":"2025-07-13T20:30:29.947Z","repository":{"id":174763516,"uuid":"122019782","full_name":"oandrienko/fast-semantic-segmentation","owner":"oandrienko","description":"ICNet and PSPNet-50 in Tensorflow for real-time semantic segmentation","archived":false,"fork":false,"pushed_at":"2019-11-05T23:31:52.000Z","size":2274,"stargazers_count":220,"open_issues_count":9,"forks_count":41,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-11-22T14:39:22.651Z","etag":null,"topics":["icnet","pspnet","semantic-segmentation","tensorflow"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oandrienko.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2018-02-19T04:41:25.000Z","updated_at":"2024-09-18T08:58:50.000Z","dependencies_parsed_at":"2023-06-26T17:31:15.569Z","dependency_job_id":null,"html_url":"https://github.com/oandrienko/fast-semantic-segmentation","commit_stats":null,"previous_names":["oandrienko/fast-semantic-segmentation"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/oandrienko/fast-semantic-segmentation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oandrienko%2Ffast-semantic-segmentation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oandrienko%2Ffast-semantic-segmentation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oandrienko%2Ffast-semantic-segmentation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oandrienko%2Ffast-semantic-segmentation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oandrienko","download_url":"https://codeload.github.com/oandrienko/fast-semantic-segmentation/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oandrienko%2Ffast-semantic-segmentation/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265199604,"owners_count":23726683,"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":["icnet","pspnet","semantic-segmentation","tensorflow"],"created_at":"2024-08-05T03:01:24.328Z","updated_at":"2025-07-13T20:30:29.544Z","avatar_url":"https://github.com/oandrienko.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"## Real-Time Semantic Segmentation in [TensorFlow](https://github.com/tensorflow/tensorflow)\n\nPerform pixel-wise semantic segmentation on high-resolution images in real-time with Image Cascade Network (ICNet), the highly optimized version of the state-of-the-art Pyramid Scene Parsing Network (PSPNet). **This project implements ICNet and PSPNet50 in Tensorflow with training support for Cityscapes.**\n\n\u003cp align = 'center'\u003e\n\u003cb\u003e\u003ci\u003eDownload pre-trained ICNet and PSPNet50 models \u003ca href=\"docs/model_zoo.md\"\u003ehere\u003c/a\u003e\u003c/i\u003e\u003c/b\u003e\n\u003c/i\u003e\n\n\n\u003cp align = 'center'\u003e\n\u003cimg src = 'docs/imgs/cityscapes_seq.gif' width = '720px'\u003e\n\u003c/p\u003e\n\n\u003cp align = 'center'\u003e\u003ci\u003e\nDeploy ICNet and preform inference at over 30fps on NVIDIA Titan Xp.\n\u003c/i\u003e\u003c/p\u003e\n\nThis implementation is based off of the original ICNet paper proposed by Hengshuang Zhao titled [ICNet for Real-Time Semantic Segmentation on High-Resolution Images](https://arxiv.org/abs/1704.08545). Some ideas were also taken from their previous PSPNet paper, [Pyramid Scene Parsing Network](https://arxiv.org/abs/1612.01105\n). The network compression implemented is based on the paper [Pruning Filters for Efficient ConvNets](https://arxiv.org/abs/1608.08710\n).\n\n### Release information\n\n#### October 14, 2018\nAn ICNet model trained in August, 2018 has been released as a pre-trained model in the Model Zoo. All the models were trained without coarse labels and are evaluated on the validation set.\n\n#### September 22, 2018\nThe baseline PSPNet50 pre-trained model files have been released publically in the Model Zoo. The accuracy of the model surpases that referenced in the ICNet paper.\n\n#### August 12, 2018\nInitial release. Project includes scripts for training ICNet, evaluating ICNet and compressing ICNet from ResNet50 weights. Also includes scripts for training PSPNet and evaluating PSPNet as a baseline.\n\n## Documentation\n\n  * \u003ca href='docs/installation.md'\u003e**Installation**: Setting up the project\u003c/a\u003e\u003cbr\u003e\n  * \u003ca href=\"docs/datasets.md\"\u003e**Dataset Format**: Creating TFRecord files for training and evaluation\u003c/a\u003e\u003cbr\u003e\n  * \u003ca href=\"docs/configs.md\"\u003e**Configs and Finetune Training**: Creating your own configuration files for training and evaluation\u003c/a\u003e\u003cbr\u003e\n  * \u003ca href=\"docs/pspnet.md\"\u003e**PSPNet50**: Walkthrough for Training PSPNet50 baseline\u003c/a\u003e\u003cbr\u003e\n  * \u003ca href=\"docs/icnet.md\"\u003e**ICNet**: Walkthrough for Training ICNet with compression\u003c/a\u003e\u003cbr\u003e\n  * \u003ca href=\"docs/model_zoo.md\"\u003e**Model Zoo**: Links to pre-trained checkpoints\u003c/a\u003e\u003cbr\u003e\n\n#### *Model Depot Inference Tutorials*\n  * \u003ca href=\"https://modeldepot.io/oandrienko/pspnet50-for-urban-scene-understanding\"\u003e**PSPNet50 Inference Notebook**\u003c/a\u003e\u003cbr\u003e\n  * \u003ca href=\"https://modeldepot.io/oandrienko/icnet-for-fast-segmentation\"\u003e**ICNet Inference Notebook**\u003c/a\u003e\u003cbr\u003e\n\n## Overview\n\n\u003cp align = 'center'\u003e\n\u003cimg src = 'docs/imgs/icnet_tensorboard.jpg' width='180x'\u003e\n\u003c/p\u003e\n\n\u003cp align = 'center'\u003e\nICNet model in Tensorboard.\n\u003c/p\u003e\n\n### Training ICNet from Classification Weights\n\nThis project has implemented the ICNet training process, allowing you to train your own model directly from *ResNet50* weights as is done in the original work. Other available implementations simply convert the Caffe model to Tensorflow, only allowing for fine-tuning from weights trained on Cityscapes.\n\nBy training ICNet on weights initialized from ImageNet, you have more flexibility in the transfer learning process. Read more about setting up this process can be found \u003ca href='docs/configs.md'\u003ehere\u003c/a\u003e. For training ICNet, follow the guide \u003ca href='docs/icnet.md'\u003ehere\u003c/a\u003e.\n\n### ICNet Network Compression\n\nIn order to achieve real-time speeds, ICNet uses a form of network compression called filter pruning. This drastically reduces the complexity of the model by removing filters from convolutional layers in the network. This project has also implemented this ICNet compression process directly in Tensorflow.\n\nThe compression is working, however which \"compression scheme\" to use is still somewhat ambiguous when reading the original ICNet paper. This is still a work in progress.\n\n### PSPNet Baseline Implementation\n\nIn order to also reproduce the baselines used in the original ICNet paper, you will also find implementations and pre-trained models for PSPNet50. Since ICNet can be thought of as a modified PSPNet, it can be useful for comparison purposes.\n\nInformtion on training or using the baseline PSPNet50 model can be found \u003ca href='docs/pspnet.md'\u003ehere\u003c/a\u003e.\n\n## Maintainers\n* Oles Andrienko, github: [oandrienko](https://github.com/oandrienko)\n\nIf you found the project, documentation and the provided pretrained models useful in your work, consider citing it with\n\n```\n@misc{fastsemseg2018,\n  author={Andrienko, Oles},\n  title={Fast Semantic Segmentation},\n  howpublished={\\url{https://github.com/oandrienko/fast-semantic-segmentation}},\n  year={2018}\n}\n```\n\n\n## Related Work\n\nThis project and some of the documentation was based on the *Tensorflow Object Detection API*. It was the initial inspiration for this project. The `third_party` directory of this project contains files from *OpenAI's Gradient Checkpointing* project by Tim Salimans and Yaroslav Bulatov. The helper modules found in `third_party/model_deploy.py` are from the Tensorflow Slim project. Finally, another open source ICNet implementation which converts the original Caffe network weights to Tensorflow was used as a reference. Find all these projects below:\n\n* [Tensorflow Object Detection API](https://github.com/tensorflow/models/tree/master/research/object_detection)\n* [Saving memory using gradient-checkpointing](https://github.com/openai/gradient-checkpointing)\n* [Tensorflow Slim](https://github.com/tensorflow/models/tree/master/research/slim)\n* [ICNet converted from Caffe using Caffe-Tensorflow](https://github.com/hellochick/ICNet-tensorflow)\n\n## Thanks\n\n* This project could not have happened without the advice (and GPU access) given by **Professor Steven Waslander** and **Ali Harakeh** from the *Waterloo Autonomous Vehicles Lab* (now the *Toronto Robotics and Artificial Intelligence Lab*).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foandrienko%2Ffast-semantic-segmentation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foandrienko%2Ffast-semantic-segmentation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foandrienko%2Ffast-semantic-segmentation/lists"}