Dentimap / README.md
HarshithReddy01's picture
Update README.md
f2de26b verified
|
Raw
History Blame Contribute Delete
2.67 kB
---
title: Dentimap - Dental X-Ray Segmentation
colorFrom: blue
colorTo: indigo
sdk: docker
pinned: false
license: mit
app_port: 7860
---
# Dentimap 🦷
**Dental X-Ray Segmentation API** - Automated segmentation and analysis of dental structures from panoramic X-ray images using deep learning.
## Features
- **Automatic Segmentation**: Segments dental X-rays into multiple anatomical classes
- **Visual Overlay**: Colored segmentation overlaid on original X-ray for easy interpretation
- **Fast Inference**: CPU-optimized for quick predictions
- **Detailed Analytics**: Provides class distribution and pixel-level analysis
- **REST API**: Easy-to-use FastAPI backend
## Supported Formats
- JPEG/JPG
- PNG
- BMP
Maximum file size: 10 MB
## Model Architecture
- **Base Model**: U-Net with encoder-decoder architecture
- **Input Size**: 512x256 pixels
- **Output Classes**: 4 (background, teeth, dental structures, anomalies)
- **Training Dataset**: 997 training images, 125 validation, 125 test
## API Endpoints
### Health Check
```
GET /health
```
### Predict Segmentation
```
POST /api/v1/inference/predict
Content-Type: multipart/form-data
Body: file (dental X-ray image)
Returns: Segmented image with overlay (JPEG)
```
### Predict with Metadata
```
POST /api/v1/inference/predict-with-metadata
Content-Type: multipart/form-data
Body: file (dental X-ray image)
Returns: JSON with base64 encoded image, inference time, class distribution
```
## Usage
Upload a dental X-ray image to get:
1. **Segmented overlay**: Visual representation of detected dental structures
2. **Class distribution**: Percentage breakdown of each anatomical class
3. **Inference time**: Processing time for the analysis
## Technical Details
- **Framework**: FastAPI, PyTorch
- **Image Processing**: OpenCV, NumPy
- **Preprocessing**: Histogram equalization for enhanced X-ray contrast
- **Visualization**: Multi-color overlay with adjustable opacity
## Performance
| Class | F1 Score | IoU |
|-------|----------|-----|
| Background | 99.7% | 99.4% |
| Teeth | 50.3% | 37.8% |
| Dental Structure | 20.4% | 15.9% |
| Anomaly | 24.3% | 21.1% |
**Note**: This model is a research prototype. Performance varies based on X-ray quality and imaging conditions. Not intended for clinical diagnosis without professional oversight.
## Development
Built with:
- Python 3.9
- PyTorch 2.0+
- FastAPI 0.104+
- OpenCV 4.8+
## License
MIT License
## Disclaimer
This application is for research and educational purposes only. It should not be used as a substitute for professional medical diagnosis or treatment. Always consult qualified healthcare professionals for medical advice.