Inspiration

Endoscopic images contain details that can be difficult to distinguish, especially when a polyp occupies only a small part of the image. We wanted to explore how deep learning could highlight these regions and make medical image segmentation easier to study

What it does

Our Polyp Detection Model identifies candidate polyp regions in still endoscopic images. It generates segmentation masks and bounding boxes, displays predictions alongside the original image, and exports annotated images and structured results. It includes an English desktop interface and batch processing tools. The project is a research prototype, not a clinical diagnostic tool

How we built it

We built the project in Python using PyTorch and a compact U-Net architecture. We used 1,000 images and masks from Kvasir-SEG, splitting them into 800 training, 100 validation, and 100 test images. We trained the model from scratch for 40 epochs using weighted binary cross-entropy and Dice loss. Data augmentation and oversampling of images with small polyp regions helped address training imbalance. We built the desktop interface with Tkinter and used AI-assisted coding during development

Challenges we ran into

Small polyps, unclear boundaries, and false-positive predictions were major challenges. Resizing images to 160 × 160 pixels also reduced fine detail. The dataset lacked reliable patient identifiers and normal-image controls, limiting our evaluation. We tested the core inference and export workflow, but full interactive testing of the desktop interface remains unfinished

Accomplishments that we're proud of

We completed a reproducible workflow covering data preparation, training, evaluation, and result export. On 100 held-out test images, our model achieved a mean Dice score of 0.6813 and a mean IoU of 0.5600. We packaged the trained model, source code, annotations, experiment logs, and documentation, and passed eight core automated tests. Our report presents both successful predictions and failure cases to give an honest picture of the model’s performance

What we learned

We learned how preprocessing, annotation quality, class imbalance, and evaluation design affect segmentation performance. We also learned that segmentation overlap scores are different from diagnostic accuracy. A model evaluated only on images containing polyps cannot establish performance on normal examinations. Reproducible experiments and clearly stated limitations are essential when presenting medical AI research.

What's next for Polyp detection model

We plan to explore higher-resolution inputs and pretrained encoders, add normal and hard-negative images, and evaluate the model on external datasets. Further work includes patient-level validation where identifiers are available, cross-validation, and interactive desktop testing. Video analysis and additional lesion categories are longer-term goals that will require suitable annotated data and further validation

Built With

Share this project:

Updates

Submission history