Loading…
Colorectal cancer is the third most common cancer worldwide. Most cases begin as small polyps — yet up to 25% of polyps are missed during colonoscopy due to human fatigue, poor visibility, and camera angle.
This project applies Attention U-Net, a deep learning architecture that uses attention gates to focus on relevant polyp regions, trained on the CVC-ClinicDB dataset.
The goal: an AI assistant that flags regions for clinicians to review — not replacing doctors, but giving them a reliable second opinion.
From raw colonoscopy image to segmentation mask in under 3 seconds.
Drag and drop a colonoscopy image (JPG, PNG, or TIF). The image is sent securely to the backend API.
The backend resizes the image to 256×256 pixels and normalises pixel values to [0, 1] for the model.
The model runs a forward pass. Attention gates highlight relevant polyp regions, and the decoder outputs a probability map.
Pixels above 0.5 probability are classified as polyp. The binary mask is converted to an image and returned.
The polyp region is highlighted in amber on the original image. Coverage percentage and pixel count are calculated.
Original, mask, and overlay are shown side by side. Coverage % helps gauge polyp size relative to the frame.
Trained on CVC-ClinicDB with binary cross-entropy + Dice loss.
Upload any colonoscopy image and the Attention U-Net will segment the polyp region in seconds.
Drop your colonoscopy image
JPG, PNG, TIF · Max 20 MB
⚡ First request may take 60–90 s as the model loads on HuggingFace Spaces.
Results will appear here
Upload a colonoscopy image and click Analyse to see the segmentation mask and overlay.
Full-stack ML deployment — from trained model to live web app, entirely free.