ScopeAI
A real-time polyp detection tool for colonoscopy images, built with YOLOv8 to run on modest hardware in everyday clinics.
- Role
- Personal project
- Year
- 2025
- Type
- Computer vision
Overview
ScopeAI looks at colonoscopy images and flags polyps in real time, drawing a box around each one with a confidence score. The goal was a tool a small clinic could actually run, not one that needs a research lab's hardware.
The problem
Catching polyps early is how colorectal cancer gets caught early, but most detection models assume a powerful GPU. That rules out the rural clinics and small hospitals that would benefit most. I wanted something accurate that runs on limited compute.
Approach
The first prototype classified image patches with a sliding-window CNN, which was slow and clumsy. I moved to YOLOv8 Nano, which detects multiple polyps directly with bounding boxes, and trained it on the Kvasir-SEG dataset of a thousand colonoscopy images. A Flask service runs the inference; a Next.js front end handles uploads and reporting.
Key features
- Real-time analysis of single images or batches, with bounding-box detection.
- Around 6ms inference per image on modest hardware.
- Downloadable reports with annotated images and confidence scores.
- User accounts and a history of past analyses.
- 95.5 mAP50 on the held-out test set.
Tech stack
A Next.js and React front end talks to a Flask and Python backend running YOLOv8 from Ultralytics, with an early TensorFlow CNN as the baseline. Data lives in SQLite, and the two servers run side by side locally.
- Next.js
- Flask
- Python
- YOLOv8
- TensorFlow
- SQLite
Outcome
ScopeAI works as a proof of concept and validated the core idea: a small, fast model can do real-time polyp detection on ordinary hardware. I wrote up how it works on the blog (opens in a new tab), and plan to open-source it.