File size: 4,366 Bytes
c4562ef 6069067 c4562ef 6069067 c4562ef 6069067 c4562ef 6069067 c4562ef 6069067 c4562ef 6069067 ba40145 c4562ef 6069067 c4562ef 6069067 c4562ef 6069067 c4562ef 6069067 c4562ef 6069067 c4562ef 6069067 c4562ef 6069067 c4562ef 6069067 c4562ef 6069067 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 |
---
license: mit
tags:
- keras
- teeth-alignment
- dental
- healthcare
- unsupervised-learning
- rlhf
- image-classification
datasets:
- custom
library_name: keras
language: en
pipeline_tag: image-classification
---
<h1 align="center">π¦· Teeth Alignment Detection Model</h1>
<p align="center">
<img src="https://huggingface.co/VilaVision/dentalmisalignmentdetection/resolve/main/Overbite.jpeg" alt="VilaVision Logo" width="400"/>
</p>
## π§ Overview
This Keras model classifies dental images into **aligned** vs. **misaligned** categories. It is designed to aid dental practitioners and orthodontists by analyzing clinical photos or X-rays and detecting signs of malocclusion, crowding, or improper alignment.
π§ͺ **Training Highlights**:
- **Unsupervised Learning Phase**: Learns visual features from unlabeled dental image data.
- **RLHF (Reinforcement Learning with Human Feedback)**: Fine-tuned using expert-labeled feedback to make the predictions align with real-world diagnoses.
> π This model is a research tool and not a substitute for professional dental evaluation.
---
## ποΈ Architecture
The model is a Convolutional Neural Network (CNN), built in Keras. It likely includes:
- Convolutional layers (Conv2D + ReLU)
- MaxPooling or AveragePooling layers
- Dense classification layers
- Possibly residual connections for stability
πΌοΈ **Input shape**: `(224, 224, 3)`
π€ **Output**: Class probabilities (e.g., `[0.8, 0.2]` β "aligned")
---
## π§Ύ Training Data
Though the dataset is not publicly available, it likely contains:
- Intraoral or panoramic dental photographs
- Images annotated by human experts
- Unlabeled data used in the unsupervised phase
- Labeled samples used during RLHF fine-tuning
The model is inspired by techniques described in [BMC Oral Health, 2022](https://bmcoralhealth.biomedcentral.com/articles/10.1186/s12903-022-02466-x) and [PMC Orthodontic AI](https://pmc.ncbi.nlm.nih.gov/articles/PMC8813223/).
---
## π Usage
### π§ Install Dependencies
```bash
pip install tensorflow huggingface_hub
```
### π Load and Predict
```python
from tensorflow import keras
from huggingface_hub import hf_hub_download
# Download model
model_path = hf_hub_download(repo_id="VilaVision/dentalmisalignmentdetection", filename="final_teeth_model.keras")
model = keras.models.load_model(model_path)
# Preprocess image
img = keras.preprocessing.image.load_img("path/to/teeth_image.jpg", target_size=(224, 224))
x = keras.preprocessing.image.img_to_array(img) / 255.0
x = x.reshape((1,) + x.shape)
# Predict
preds = model.predict(x)
print("Raw output:", preds)
# Example: preds[0][0] > 0.5 β "misaligned"
```
---
## π₯ Input & π€ Output
| Type | Description |
| ------ | ------------------------------------------- |
| Input | JPG/PNG image of teeth (224Γ224), RGB |
| Output | Class probabilities for alignment detection |
---
## π Performance
While no official metrics are available, CNN models for orthodontic imaging tasks have reported:
* ~95β98% accuracy ([BMC Oral Health, 2022](https://bmcoralhealth.biomedcentral.com/articles/10.1186/s12903-022-02466-x))
* High F1-scores in clinical benchmarks
**Note:** Performance may vary on images that differ from the training distribution.
---
## β οΈ Limitations
* Not suitable for diagnostic use without expert supervision
* Trained on specific dental image styles β generalization may be limited
* May not perform well on low-quality or occluded images
* Biases in training data may affect outputs
Always consult a licensed orthodontist or dentist before taking action based on model predictions.
---
## π License
πͺͺ MIT License β free to use, modify, and distribute.
[View on Hugging Face β](https://huggingface.co/AP6621/teeth_alignment_detection_modal)
---
## π References
* [Deep Learning for Orthodontic Photo Classification β BMC Oral Health](https://bmcoralhealth.biomedcentral.com/articles/10.1186/s12903-022-02466-x)
* [AI for Classifying Orthodontic Images β PMC Study](https://pmc.ncbi.nlm.nih.gov/articles/PMC8813223/)
* [OpenAI β Learning from Human Feedback (RLHF)](https://openai.com/research/learning-from-human-feedback)
---
π§ *Model built and maintained by [VilaVision](https://github.com/VilaVision)* |