{"id":19647457,"url":"https://github.com/mohazamani/gastrointestinal-polyp-segmentation","last_synced_at":"2026-06-20T08:31:17.414Z","repository":{"id":258179263,"uuid":"804242767","full_name":"MohaZamani/Gastrointestinal-Polyp-Segmentation","owner":"MohaZamani","description":"Polyp segmentation on the Kvasir-SEG dataset using deep learning models like UNet, UNet++, PSPNet, and DeepLabV3Plus with ResNet50 and MobileNetV2 encoders.","archived":false,"fork":false,"pushed_at":"2024-10-18T10:10:37.000Z","size":18665,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-27T00:24:07.222Z","etag":null,"topics":["ai","cnn","computer-vision","convolutional-neural-networks","deep-lab-v3-plus","encoder-decoder-architecture","image-segmentation","kvasir-seg","mobile-net-v2","pspnet","pytorch","resnet-50","unet-image-segmentation","unet-plusplus","vision"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","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/MohaZamani.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":"2024-05-22T08:17:35.000Z","updated_at":"2024-10-28T11:29:15.000Z","dependencies_parsed_at":"2024-10-18T23:50:50.680Z","dependency_job_id":null,"html_url":"https://github.com/MohaZamani/Gastrointestinal-Polyp-Segmentation","commit_stats":null,"previous_names":["mohazamani/kvasir-seg","mohazamani/gastrointestinal-polyp-segmentation"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MohaZamani/Gastrointestinal-Polyp-Segmentation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MohaZamani%2FGastrointestinal-Polyp-Segmentation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MohaZamani%2FGastrointestinal-Polyp-Segmentation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MohaZamani%2FGastrointestinal-Polyp-Segmentation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MohaZamani%2FGastrointestinal-Polyp-Segmentation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MohaZamani","download_url":"https://codeload.github.com/MohaZamani/Gastrointestinal-Polyp-Segmentation/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MohaZamani%2FGastrointestinal-Polyp-Segmentation/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271027687,"owners_count":24687082,"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","status":"online","status_checked_at":"2025-08-18T02:00:08.743Z","response_time":89,"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":["ai","cnn","computer-vision","convolutional-neural-networks","deep-lab-v3-plus","encoder-decoder-architecture","image-segmentation","kvasir-seg","mobile-net-v2","pspnet","pytorch","resnet-50","unet-image-segmentation","unet-plusplus","vision"],"created_at":"2024-11-11T14:44:14.660Z","updated_at":"2026-06-20T08:31:17.378Z","avatar_url":"https://github.com/MohaZamani.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Gastrointestinal Polyp Segmentation Using Encoder-Decoder Networks\n\nThis project applies image segmentation techniques to identify and delineate polyps from gastrointestinal tract images using deep learning models. We experiment with various encoder-decoder architectures like UNet, UNet++, DeepLabV3Plus, and PSPNet, employing MobileNetV2 and ResNet50 as encoders. The goal is to achieve high accuracy in polyp segmentation, as polyps are precursors to colorectal cancer.\n\n## Table of Contents\n\n- [Project Overview](#project-overview)\n- [Dataset](#dataset)\n- [Models Implemented](#models-implemented)\n- [How to Run](#how-to-run)\n- [Results](#results)\n- [References](#references)\n\n## Project Overview\n\nColorectal cancer is a leading cause of cancer-related deaths. Early detection and removal of polyps can help prevent it. In this project, we leverage convolutional neural networks (CNNs) with advanced encoder-decoder architectures to improve polyp segmentation accuracy. The models are trained and evaluated on the **Kvasir-SEG** dataset, which contains 1000 polyp images and corresponding masks. We experiment with different models, fine-tuning them to maximize performance, and combining them to achieve state-of-the-art results.\n\n## Dataset\n\n- **Name**: Kvasir-SEG\n- **Size**: 46.2 MB\n- **Content**: 1000 polyp images with corresponding ground truth masks\n- **Resolution**: Varies from 332x487 to 1920x1072 pixels\n- **Format**: JPEG for images and JSON for bounding box coordinates\n- **Link**: [Kvasir-SEG Dataset](https://datasets.simula.no/kvasir-seg/)\n\n## Models Implemented\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://gitpoint.co/\"\u003e\n    \u003cimg alt=\"GitPoint\" src=\"./Report/Figs/encoder-decoder.png\" width=\"450\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\nWe implemented and experimented with the following models:\n\n1. **UNet** with ResNet50 and MobileNetV2 encoders\n2. **UNet++** with ResNet50 and MobileNetV2 encoders\n3. **PSPNet** with ResNet50 and MobileNetV2 encoders\n4. **DeepLabV3Plus** with ResNet50 and MobileNetV2 encoders\n\nTransfer learning was utilized to accelerate model training by leveraging pre-trained weights from the ImageNet dataset.\n\n## How to Run\n\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/MohaZamani/Gastrointestinal-Polyp-Segmentation.git\n   ```\n2. Install the necessary dependencies:\n   ```bash\n   pip install -r requirements.txt\n   ```\n3. Run the Jupyter notebook:\n   ```bash\n   jupyter notebook\n   ```\n4. Open and run `main.ipynb` to train and evaluate the models on the Kvasir-SEG dataset. Follow the steps inside the notebook to preprocess the data, train the models, and visualize the results.\n\n## Results\n\nThe models were evaluated using the following metrics:\n\n- **Dice Score**: Measures the overlap between the predicted segmentation and the ground truth.\n- **IOU (Intersection over Union)**: Measures how well the predicted segments match the ground truth.\n- **Dice Loss**: Used as a loss function, complementary to the Dice Score.\n\n### Performance Results:\n\n- **UNet with ResNet50**: IoU = 0.9261, Dice Score = 0.9163\n- **UNet++ with ResNet50**: IoU = 0.9229, Dice Score = 0.9495\n- **PSPNet with ResNet50**: IoU = 0.8652, Dice Score = 0.9187\n- **DeepLabV3Plus with ResNet50**: IoU = 0.9064, Dice Score = 0.9316\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://gitpoint.co/\"\u003e\n    \u003cimg alt=\"GitPoint\" src=\"./Report/Figs/example.png\" width=\"800\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\nVisualizations of training and test performance can be found in the results section of the [report](./Report/Report.pdf).\n\n## References\n\n1. Galdran, A., Carneiro, G., \u0026 González Ballester, M. A. (2021). _Double Encoder-Decoder Networks for Gastrointestinal Polyp Segmentation_.\n2. Ronneberger, O., Fischer, P., \u0026 Brox, T. (2015). _U-Net: Convolutional Networks for Biomedical Image Segmentation_.\n3. Chen, L. C., Zhu, Y., Papandreou, G., Schroff, F., \u0026 Adam, H. (2018). _Encoder-Decoder with Atrous Separable Convolution for Semantic Image Segmentation_.\n4. Zhao, H., Shi, J., Qi, X., Wang, X., \u0026 Jia, J. (2017). _Pyramid Scene Parsing Network_.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohazamani%2Fgastrointestinal-polyp-segmentation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmohazamani%2Fgastrointestinal-polyp-segmentation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohazamani%2Fgastrointestinal-polyp-segmentation/lists"}