{"id":20460564,"url":"https://github.com/saroshfarhan/architectures-for-semantic-segmentation-using-deep-learning","last_synced_at":"2026-05-29T18:31:30.270Z","repository":{"id":96537270,"uuid":"118615797","full_name":"saroshfarhan/Architectures-for-Semantic-Segmentation-using-Deep-Learning","owner":"saroshfarhan","description":"Implementation of various semantic segmentation architectures in Keras using Tensorflow backend","archived":false,"fork":false,"pushed_at":"2018-01-23T08:20:36.000Z","size":14778,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-05T11:20:08.846Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":false,"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/saroshfarhan.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,"publiccode":null,"codemeta":null}},"created_at":"2018-01-23T13:42:34.000Z","updated_at":"2023-05-01T02:06:12.000Z","dependencies_parsed_at":"2023-03-13T16:30:02.461Z","dependency_job_id":null,"html_url":"https://github.com/saroshfarhan/Architectures-for-Semantic-Segmentation-using-Deep-Learning","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/saroshfarhan/Architectures-for-Semantic-Segmentation-using-Deep-Learning","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saroshfarhan%2FArchitectures-for-Semantic-Segmentation-using-Deep-Learning","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saroshfarhan%2FArchitectures-for-Semantic-Segmentation-using-Deep-Learning/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saroshfarhan%2FArchitectures-for-Semantic-Segmentation-using-Deep-Learning/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saroshfarhan%2FArchitectures-for-Semantic-Segmentation-using-Deep-Learning/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/saroshfarhan","download_url":"https://codeload.github.com/saroshfarhan/Architectures-for-Semantic-Segmentation-using-Deep-Learning/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saroshfarhan%2FArchitectures-for-Semantic-Segmentation-using-Deep-Learning/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33666290,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-29T02:00:06.066Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-11-15T12:20:00.540Z","updated_at":"2026-05-29T18:31:30.252Z","avatar_url":"https://github.com/saroshfarhan.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Architectures-for-Semantic-Segmentation-using-Deep-Learning\r\n\r\nThis repository contains the implementations of [U-Net](https://lmb.informatik.uni-freiburg.de/people/ronneber/u-net/) and [V-Net](https://arxiv.org/abs/1606.04797) in Keras using TensorFlow backend. Also, `data_prep.py` contains the code for random elastic deformations applied to the input images for data augmentation, which were specified to be of importance in both the papers.\r\n\r\n## Data\r\n\r\nThe `data` folder contains pre-processed images, converted to .tif format from 3-D volume tiff as present in the [challenge website](http://brainiac2.mit.edu/isbi_challenge/).\r\n## Architectures\r\n\r\n- ### U-Net\r\n\r\n![u-net](https://lmb.informatik.uni-freiburg.de/people/ronneber/u-net/u-net-architecture.png)\r\n\r\n**Highlights**\r\n\r\n- Encoder-decoder architecture as proposed in [Fully Convolutional Networks for Semantic Segmentation\r\n](https://arxiv.org/abs/1605.06211)\r\n\r\n- Each stage in the encoder part has 2 3x3 conv layers followed by a MaxPooling layer, which performs the downsampling operation.\r\n- Number of filters double in each subsequent stage of the encoder part.\r\n- In the decoder part, transpose convolution is used for upsampling and high-level features of the corresponding stage in the encoder part are concatenated at the beginning of each stage.\r\n- The last layer uses 1x1 convolutions to give the final segmentation map.\r\n- Extensive use of data augmentation, specially random elastic transformations.\r\n\r\n- ### V-Net\r\n\r\n![v-net](http://mattmacy.io/vnet.pytorch/images/diagram.png)\r\n\r\n**Highlights**\r\n\r\n- Similar architecture to U-Net, but with residual connections (https://arxiv.org/abs/1512.03385) between the input and output of each stage.\r\n\r\n- Downsampling performed by strided convolution instead of MaxPooling.\r\n- Varying number of convolutional layers in each stage.\r\n- PReLU used as the activation. \r\n\r\nAlthough the original papers don't specify, I have always found **Batch Normalization** to speed up the training process and hence, the implementation includes that. Also, **Dropout** is applied between the convolutional layers.\r\n\r\n## Running the model\r\n\r\nFirst, prepare the augmented images by running:\r\n\r\n```bash\r\npython data_prep.py\r\n```\r\nThen, run the script corresponding to the architecture. E.g. for training U-Net, run the following:\r\n```bash\r\npython run_unet.py\r\n```\r\n\r\n## Dependencies\r\n\r\n- TensorFlow\r\n- Keras\r\n- Numpy\r\n- OpenCV\r\n\r\nInstall them using [pip](https://pypi.python.org/pypi/pip).\r\n\r\n## Contributing\r\nFeel free to create a Pull Request to add other semantic segmentation architectures and/or benchmark results or various datasets. If you are a beginner, you can refer [this](https://opensource.guide/how-to-contribute/) for getting started.\r\n\r\n## Support\r\nIf you found this useful, please consider starring(★) the repo so that it can reach a broader audience.\r\n\r\n## References\r\n\r\nThe pre-processed images and most part of `data_prep.py` were taken from [here](https://github.com/zhixuhao/unet).\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaroshfarhan%2Farchitectures-for-semantic-segmentation-using-deep-learning","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsaroshfarhan%2Farchitectures-for-semantic-segmentation-using-deep-learning","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaroshfarhan%2Farchitectures-for-semantic-segmentation-using-deep-learning/lists"}