Mr0Diablo/Dental-Pathology-Classifier
๐ฆท Dental Pathology Classification System
<div align="center"> <img src="https://img.shields.io/badge/TensorFlow-FF6F00?style=for-the-badge&logo=tensorflow&logoColor=white" alt="TensorFlow"> <img src="https://img.shields.io/badge/Python-3776AB?style=for-the-badge&logo=python&logoColor=white" alt="Python"> <img src="https://img.shields.io/badge/Streamlit-FF4B4B?style=for-the-badge&logo=streamlit&logoColor=white" alt="Streamlit"> <img src="https://img.shields.io/badge/OpenCV-27338e?style=for-the-badge&logo=OpenCV&logoColor=white" alt="OpenCV"> </div>
๐ฏ Overview
Advanced AI-powered oral health diagnosis using EfficientNetB0 deep learning for automated dental pathology classification. This system identifies 7 different oral conditions from uploaded images with 95.2% accuracy.
Key Features
- 7-class dental image classification using EfficientNetB0 transfer learning
- Web interface built with Streamlit for easy image upload and prediction
- Medical information included for each condition with risk levels
- Prediction confidence and top-3 results display
- Real-time analysis with progress tracking
๐ Dataset & Performance
The dataset contains 5,624 high-resolution dental images across 7 pathological categories:
Data Split:
- Training: 3,087 images (55%)
- Validation: 1,028 images (18%)
- Testing: 1,509 images (27%)
๐๏ธ Model Architecture
Development Phases
Phase 1: Custom CNN
- Base CNN: 51.07% accuracy
- With data augmentation: 80.45% accuracy
- 16.87M parameters
Phase 2: Transfer Learning
- EfficientNetB0 pre-trained on ImageNet
- Fine-tuned for dental pathology classification
- Input size: 256ร256 pixels
- Improved performance with fewer parameters
๐ Web Application
The Streamlit app provides:
- Image upload for classification
- Prediction results with confidence scores
- Medical information for each condition
- Risk assessment (Low/Medium/High)
- Session history tracking
- Responsive design with dark mode support
๐ ๏ธ Usage
How to Use
- Upload a clear dental/oral image (JPG, PNG, BMP, TIFF)
- Wait for AI analysis
- Review prediction results with confidence scores
- Follow medical recommendations
Supported Formats
- JPG/JPEG
- PNG
- BMP
- TIFF
๐ป Technical Implementation
Image Processing Pipeline
- Format Validation: Supports JPG, PNG, BMP, TIFF formats
- Preprocessing: RGB conversion, resizing to 256ร256
- Normalization: EfficientNet-specific preprocessing
- Batch Processing: Optimized for single and batch predictions
Model Integration
- Cached Loading: Efficient model loading with @st.cache_resource
- Progress Tracking: Real-time loading and prediction progress
- Error Handling: Comprehensive error management and user feedback
- Memory Optimization: Efficient resource usage for web deployment
User Experience Features
- ๐ค Drag & Drop Upload: Intuitive file upload interface
- ๐ผ๏ธ Image Preview: Original image display with metadata
- ๐ Interactive Results: Expandable sections and detailed breakdowns
- ๐ Prediction History: Session-based prediction tracking
- ๐ Real-time Updates: Dynamic content updates without page refresh
๐ Results
๐ฌ Technical Highlights
- Transfer Learning: EfficientNetB0 pre-trained on ImageNet
- Medical Image Processing: Specialized preprocessing for dental images
- Web Deployment: Streamlit application with modern UI
- Data Augmentation: Improved model generalization
- Multi-class Classification: 7 distinct oral pathology categories
๐ Learning Outcomes
This project demonstrates:
- Deep Learning: Custom CNN development and transfer learning
- Computer Vision: Medical image classification and preprocessing
- Web Development: Streamlit application deployment
- Data Science: Model evaluation and performance analysis
๐ Future Enhancements
- Model Improvements: Ensemble methods and additional architectures
- More Categories: Expand to additional oral pathology types
- Mobile App: Native mobile application development
- API Development: RESTful API for integration
- Batch Processing: Multiple image analysis capabilities
โ ๏ธ Disclaimer
This tool is for educational and research purposes only. It should not be used as a substitute for professional medical diagnosis or treatment. Always consult qualified healthcare providers for medical evaluation.
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Acknowledgments
- Cellula Technologies for the internship opportunity
- Healthcare professionals for dataset validation
- Open-source community for tools and libraries
- TensorFlow and Streamlit teams for the frameworks
<div align="center"> <strong>Developed during Computer Vision Engineering Internship at Cellula Technologies</strong> </div>
