Views
No views yet
| Metric | Score |
|---|---|
| Training Accuracy | 94.17% |
| Validation Accuracy | 90.83% |
| Balanced Accuracy | ~90% |
| Overfitting Gap | 3.34% ✅ |
✅ Low overfitting gap indicates excellent generalization!
dental-classification/
├── data/
│ ├── train/ # Training images (organized by class folders)
│ ├── valid/ # Validation images
│ └── test/ # Test images
├── dental_classifier_balanced.pth # 🔴 Trained model weights
├── train.py # Training script
├── confusion_matrix_balanced.png # Evaluation results
├── training_analysis_complete.png # Training curves
└── README.md(optional: add checksum here)1Python 3.8+
2CUDA-compatible GPU (recommended)1pip install torch torchvision
2pip install pillow numpy scikit-learn
3pip install matplotlib seaborn tqdmpip install -r requirements.txtdata/
├── train/
│ ├── Calculus/
│ ├── Data caries/
│ ├── Gingivitis/
│ ├── hypodontia/
│ ├── Mouth Ulcer/
│ └── Tooth Discoloration/
├── valid/ (same structure)
└── test/ (same structure)python train.py1import torch
2from PIL import Image
3import torchvision.transforms as transforms
4
5# Load model
6checkpoint = torch.load('dental_classifier_balanced.pth')
7model = RegularizedDentalClassifier(num_classes=6)
8model.load_state_dict(checkpoint['model_state_dict'])
9model.eval()
10
11# Prepare image
12transform = transforms.Compose([
13 transforms.Resize((224, 224)),
14 transforms.ToTensor(),
15 transforms.Normalize(mean=[0.485, 0.456, 0.406],
16 std=[0.229, 0.224, 0.225])
17])
18
19image = Image.open('path/to/dental_image.jpg').convert('RGB')
20input_tensor = transform(image).unsqueeze(0)
21
22# Predict
23with torch.no_grad():
24 output = model(input_tensor)
25 _, predicted = torch.max(output, 1)
26
27class_names = checkpoint['class_names']
28print(f"Predicted: {class_names[predicted.item()]}")RegularizedDentalClassifier
├── Backbone: ResNet-50 (pretrained on ImageNet)
│ ├── Frozen layers: First 70% of parameters
│ └── Fine-tuned layers: Last 30 layers
│
└── Classifier Head:
├── Dropout (0.6)
├── Linear (2048 → 256)
├── ReLU + BatchNorm
├── Dropout (0.42)
└── Linear (256 → 6 classes)| Parameter | Value |
|---|---|
| Base Model | ResNet-50 (pretrained) |
| Input Size | 224×224×3 |
| Batch Size | 32 |
| Optimizer | Adam |
| Learning Rate | 0.0001 |
| Weight Decay | 5e-4 |
| Dropout Rate | 0.6 |
| Epochs | 15 (with early stopping) |
| Loss Function | Weighted Cross-Entropy |
1@software{dental_classifier_2025,
2 author = {Your Name},
3 title = {Dental Disease Classification using Deep Learning},
4 year = {2025},
5 url = {https://github.com/yourusername/dental-classification}
6}git checkout -b feature/AmazingFeature)git commit -m 'Add AmazingFeature')git push origin feature/AmazingFeature)