Back

ScopeAI

Real-time polyp detection for colonoscopy using YOLOv8 - built to run on modest hardware for rural clinics.

Cover image of ScopeAI

Project Overview

This project started as simple curiosity about medical imaging. I wasn't planning to build anything serious, but the more I explored it, the more interesting it became - so I kept going. Most AI solutions for healthcare require expensive GPUs and infrastructure that smaller clinics and rural hospitals just can't access. I wanted to build a polyp detection tool that could run on regular laptops while maintaining clinical-grade accuracy.

ScopeAI detects polyps in colonoscopy images in real-time, helping doctors catch early signs of colorectal cancer. The system uses YOLOv8n (the nano version), achieving 95.5 mAP50 accuracy with 6ms inference time. The interface focuses on clinical workflows - clean, intuitive, and designed for quick results with detailed reports and analysis history.

Tech Stack

This project uses two complementary systems. The frontend runs on Next.js because it handles user interfaces beautifully and provides all the modern React features I wanted. For AI inference, I needed Python's ecosystem - Flask manages the API, and Ultralytics YOLOv8 handles the polyp detection.

The dual-server setup has Next.js managing user experience on port 3000 while Flask handles AI processing on port 5328. SQLite tracks user data and analysis history because straightforward solutions work well here. YOLOv8n processes images efficiently - small enough to run anywhere while maintaining clinical accuracy.

Next.js
Flask
Python
SQLite

Personal Growth

ScopeAI changed how I approach building software. Working with medical data means accuracy and reliability are critically important - you can't just ship fast and fix later. I learned to balance model performance with practical deployment constraints.

Moving from patch-based CNNs to YOLOv8 gave me hands-on experience with different computer vision approaches. The sliding window method taught me fundamentals, while YOLOv8 showed me what modern object detection can accomplish. This project taught me that effective solutions often prioritize real-world usability over theoretical complexity.

Want to get in touch?
Or just say Hi?

Drop me a line at rathnayaka3548@gmail.com . If you ever come to Colombo, let's meet up for coffee. Let's work together to bring ideas to life!