https://github.com/mohazamani/gastrointestinal-polyp-segmentation
Polyp segmentation on the Kvasir-SEG dataset using deep learning models like UNet, UNet++, PSPNet, and DeepLabV3Plus with ResNet50 and MobileNetV2 encoders.
https://github.com/mohazamani/gastrointestinal-polyp-segmentation
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
Last synced: 2 months ago
JSON representation
Polyp segmentation on the Kvasir-SEG dataset using deep learning models like UNet, UNet++, PSPNet, and DeepLabV3Plus with ResNet50 and MobileNetV2 encoders.
- Host: GitHub
- URL: https://github.com/mohazamani/gastrointestinal-polyp-segmentation
- Owner: MohaZamani
- Created: 2024-05-22T08:17:35.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-10-18T10:10:37.000Z (6 months ago)
- Last Synced: 2025-01-09T22:19:16.365Z (4 months ago)
- 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
- Language: Jupyter Notebook
- Homepage:
- Size: 17.8 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Gastrointestinal Polyp Segmentation Using Encoder-Decoder Networks
This 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.
## Table of Contents
- [Project Overview](#project-overview)
- [Dataset](#dataset)
- [Models Implemented](#models-implemented)
- [How to Run](#how-to-run)
- [Results](#results)
- [References](#references)## Project Overview
Colorectal 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.
## Dataset
- **Name**: Kvasir-SEG
- **Size**: 46.2 MB
- **Content**: 1000 polyp images with corresponding ground truth masks
- **Resolution**: Varies from 332x487 to 1920x1072 pixels
- **Format**: JPEG for images and JSON for bounding box coordinates
- **Link**: [Kvasir-SEG Dataset](https://datasets.simula.no/kvasir-seg/)## Models Implemented
We implemented and experimented with the following models:
1. **UNet** with ResNet50 and MobileNetV2 encoders
2. **UNet++** with ResNet50 and MobileNetV2 encoders
3. **PSPNet** with ResNet50 and MobileNetV2 encoders
4. **DeepLabV3Plus** with ResNet50 and MobileNetV2 encodersTransfer learning was utilized to accelerate model training by leveraging pre-trained weights from the ImageNet dataset.
## How to Run
1. Clone the repository:
```bash
git clone https://github.com/MohaZamani/Gastrointestinal-Polyp-Segmentation.git
```
2. Install the necessary dependencies:
```bash
pip install -r requirements.txt
```
3. Run the Jupyter notebook:
```bash
jupyter notebook
```
4. 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.## Results
The models were evaluated using the following metrics:
- **Dice Score**: Measures the overlap between the predicted segmentation and the ground truth.
- **IOU (Intersection over Union)**: Measures how well the predicted segments match the ground truth.
- **Dice Loss**: Used as a loss function, complementary to the Dice Score.### Performance Results:
- **UNet with ResNet50**: IoU = 0.9261, Dice Score = 0.9163
- **UNet++ with ResNet50**: IoU = 0.9229, Dice Score = 0.9495
- **PSPNet with ResNet50**: IoU = 0.8652, Dice Score = 0.9187
- **DeepLabV3Plus with ResNet50**: IoU = 0.9064, Dice Score = 0.9316Visualizations of training and test performance can be found in the results section of the [report](./Report/Report.pdf).
## References
1. Galdran, A., Carneiro, G., & González Ballester, M. A. (2021). _Double Encoder-Decoder Networks for Gastrointestinal Polyp Segmentation_.
2. Ronneberger, O., Fischer, P., & Brox, T. (2015). _U-Net: Convolutional Networks for Biomedical Image Segmentation_.
3. Chen, L. C., Zhu, Y., Papandreou, G., Schroff, F., & Adam, H. (2018). _Encoder-Decoder with Atrous Separable Convolution for Semantic Image Segmentation_.
4. Zhao, H., Shi, J., Qi, X., Wang, X., & Jia, J. (2017). _Pyramid Scene Parsing Network_.