EndoSightAI / app.py
dcavadia's picture
update readme
fc278cd verified
import gradio as gr
def create_demo():
title = "πŸ”¬ EndoSight AI - Development Preview"
description = """
## Advanced Gastrointestinal Polyp Detection & Analysis System
**Performance Metrics:**
- **88% mAP\\@0.5** detection accuracy
- **75.6% Dice Score** segmentation accuracy
- **35+ FPS** real-time processing
- **YOLOv8 + U-Net** dual architecture with intelligent stabilization
### πŸ₯ Clinical Capabilities
- Real-time polyp detection and localization with smooth tracking
- Precise boundary segmentation with fluid heatmap visualization
- Intelligent measurement system with anti-fluctuation technology
- Automated size classification and risk assessment
- Optimized for endoscopy workflow integration
### 🎯 Technical Highlights
- **Multi-modal AI**: Combined object detection and segmentation
- **Clinical-grade performance**: Sub-second processing times
- **Intelligent measurement**: Size, area, and morphometric analysis with temporal stabilization
- **Adaptive visualization**: Real-time heatmaps that adjust to camera movement
- **Real-time inference**: GPU-accelerated deployment ready
---
## πŸŽ₯ Live System Demonstration
**Real-time EndoSight AI in action** - showcasing automated polyp detection, intelligent segmentation, stabilized measurement analysis, and clinical classification on endoscopy footage.
"""
footer = """
---
## πŸš€ Development Status & Impact
βœ… **Model Training**: Complete with validation metrics achieved
πŸ”„ **Clinical Integration**: Active collaboration with gastroenterology clinic
πŸ“Š **Performance**: Production-ready accuracy and speed benchmarks
🎯 **Target**: Characterization of neoplastic versus non-neoplastic lesions
### 🀝 Research Collaboration
**Alumnus of**: Universidad Central de Venezuela
**Research Focus**: AI-Assisted Endoscopy & Computer-Aided Diagnosis
### πŸ“ž Professional Contact
**Technical Lead**: Daniel Cavadia
**Email**: [dan.cavadia@gmail.com](mailto:dan.cavadia@gmail.com)
---
βš•οΈ **Medical Disclaimer**: *Research prototype under clinical validation - not intended for diagnostic use.*
"""
# Create simple interface using Gradio 3.34.0 syntax
with gr.Blocks(title="EndoSight AI") as demo:
gr.Markdown(f"# {title}")
gr.Markdown(description)
# Simple video display (no fancy features in older version)
video = gr.Video(
value="demo_video.mp4",
label="EndoSight AI Real-time Detection & Segmentation with Intelligent Measurements"
)
gr.Markdown("""
### πŸ” What You're Seeing:
- **Yellow bounding boxes**: Real-time polyp detection with smooth tracking
- **Fluid heatmaps**: Dynamic segmentation visualization that adapts to movement
- **Bottom-left panels**: Stabilized measurement displays with clinical classifications
- **Size categories**: Diminutive (<5mm), Small (5-9mm), Large (β‰₯10mm) classifications
- **Risk assessment**: Low/Moderate/High risk indicators based on polyp size
- **Measurement accuracy**: Diameter and area calculations with error margins
- **Anti-fluctuation**: Intelligent system prevents measurement swings during camera movement
- **Processing metrics**: Real-time FPS and confidence indicators
- **Multi-polyp detection**: Simultaneous analysis capability with unique tracking IDs
""")
gr.Markdown(footer)
return demo
if __name__ == "__main__":
demo = create_demo()
demo.launch()