--- title: Polyp Detection AI emoji: 🏥 colorFrom: blue colorTo: red sdk: gradio sdk_version: 5.34.2 app_file: app.py pinned: false license: mit --- # 🏥 AI-Powered Polyp Detection System An intelligent medical imaging system that uses deep learning to detect colorectal polyps in colonoscopy images. ## 🎯 Features - **Real-time polyp detection** using U-Net deep learning architecture - **Visual segmentation** with overlay highlighting detected regions - **Quantitative analysis** providing polyp coverage percentages - **Medical-grade interface** designed for healthcare applications - **Adjustable sensitivity** with detection threshold controls ## 🔬 Model Details - **Model Repository:** [ibrahim313/unet-adam-diceloss](https://huggingface.co/ibrahim313/unet-adam-diceloss) - **Architecture:** U-Net with 32 base channels - **Training Dataset:** Kvasir-SEG (1000 polyp images) - **Framework:** PyTorch - **Input Size:** 384×384 pixels - **Output:** Binary segmentation mask ## 📊 Performance The model achieves excellent performance on the Kvasir-SEG dataset: - High sensitivity for polyp detection - Clinically relevant segmentation accuracy - Robust performance across various image qualities ## 🚀 Usage 1. Upload a colonoscopy image 2. Adjust detection threshold if needed (0.1 - 0.9) 3. Click "🔍 Analyze for Polyps" 4. Review the results and segmentation overlay ## 🔧 Technical Implementation - **Deep Learning:** U-Net encoder-decoder architecture - **Preprocessing:** Albumentations (resize, normalize) - **Inference:** PyTorch with CPU optimization - **Interface:** Gradio for user-friendly interaction - **Deployment:** Hugging Face Spaces ## ⚠️ Medical Disclaimer This AI system is intended for **research and educational purposes only**. It should not be used as a substitute for professional medical diagnosis. Always consult qualified healthcare professionals for clinical decisions. ## 📝 Model Information The underlying model was trained using: - **Loss Function:** Dice Loss - **Optimizer:** Adam - **Training Epochs:** 100 - **Validation Strategy:** Train/Validation/Test split ## 🤝 Contributing This project is open for improvements and contributions. Feel free to: - Report issues or bugs - Suggest enhancements - Share feedback on medical accuracy - Contribute to model improvements ## 📞 Contact For questions or medical AI collaboration opportunities, please reach out through Hugging Face. --- *Built with ❤️ for advancing medical AI research*