Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -2,68 +2,40 @@
|
|
| 2 |
license: mit
|
| 3 |
tags:
|
| 4 |
- anomaly-detection
|
| 5 |
-
-
|
| 6 |
-
- mvtec-ad
|
| 7 |
-
- pytorch
|
| 8 |
- computer-vision
|
| 9 |
-
|
| 10 |
-
- mvtec_ad
|
| 11 |
-
metrics:
|
| 12 |
-
- auroc
|
| 13 |
---
|
| 14 |
|
| 15 |
-
# EfficientAD - Bottle
|
| 16 |
|
| 17 |
-
|
| 18 |
|
| 19 |
## Model Details
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
|
| 21 |
-
|
| 22 |
-
-
|
| 23 |
-
-
|
| 24 |
-
-
|
| 25 |
-
|
| 26 |
-
## Files
|
| 27 |
-
|
| 28 |
-
- `teacher_final.pth`: Teacher network weights
|
| 29 |
-
- `student_final.pth`: Student network weights
|
| 30 |
-
- `autoencoder_final.pth`: Autoencoder network weights
|
| 31 |
-
- `normalization.pth`: Normalization parameters for inference
|
| 32 |
|
| 33 |
## Usage
|
| 34 |
|
| 35 |
```python
|
| 36 |
from huggingface_hub import hf_hub_download
|
| 37 |
-
|
| 38 |
-
# Download weights
|
| 39 |
-
teacher_path = hf_hub_download(
|
| 40 |
-
repo_id="MSherbinii/efficientad-bottle",
|
| 41 |
-
filename="teacher_final.pth"
|
| 42 |
-
)
|
| 43 |
-
student_path = hf_hub_download(
|
| 44 |
-
repo_id="MSherbinii/efficientad-bottle",
|
| 45 |
-
filename="student_final.pth"
|
| 46 |
-
)
|
| 47 |
-
autoencoder_path = hf_hub_download(
|
| 48 |
-
repo_id="MSherbinii/efficientad-bottle",
|
| 49 |
-
filename="autoencoder_final.pth"
|
| 50 |
-
)
|
| 51 |
-
normalization_path = hf_hub_download(
|
| 52 |
-
repo_id="MSherbinii/efficientad-bottle",
|
| 53 |
-
filename="normalization.pth"
|
| 54 |
-
)
|
| 55 |
-
|
| 56 |
-
# Load with PyTorch
|
| 57 |
import torch
|
| 58 |
-
teacher = torch.load(teacher_path, map_location='cpu')
|
| 59 |
-
student = torch.load(student_path, map_location='cpu')
|
| 60 |
-
autoencoder = torch.load(autoencoder_path, map_location='cpu')
|
| 61 |
-
```
|
| 62 |
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
|
|
|
|
|
|
| 66 |
|
| 67 |
-
##
|
|
|
|
| 68 |
|
| 69 |
-
|
|
|
|
|
|
| 2 |
license: mit
|
| 3 |
tags:
|
| 4 |
- anomaly-detection
|
| 5 |
+
- quality-control
|
|
|
|
|
|
|
| 6 |
- computer-vision
|
| 7 |
+
- efficientad
|
|
|
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
+
# EfficientAD - Bottle Inspection Model
|
| 11 |
|
| 12 |
+
Production-ready anomaly detection model for bottle quality inspection.
|
| 13 |
|
| 14 |
## Model Details
|
| 15 |
+
- **Dataset**: MVTec AD - Bottle
|
| 16 |
+
- **Architecture**: EfficientAD (Medium)
|
| 17 |
+
- **Accuracy**: 90.0%
|
| 18 |
+
- **Inference Time**: ~300-500ms
|
| 19 |
|
| 20 |
+
## Defect Types Detected
|
| 21 |
+
- Broken (large)
|
| 22 |
+
- Broken (small)
|
| 23 |
+
- Contamination
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
|
| 25 |
## Usage
|
| 26 |
|
| 27 |
```python
|
| 28 |
from huggingface_hub import hf_hub_download
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
import torch
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
|
| 31 |
+
# Download model weights
|
| 32 |
+
teacher = hf_hub_download(repo_id="MSherbinii/efficientad-bottle", filename="teacher_final.pth")
|
| 33 |
+
student = hf_hub_download(repo_id="MSherbinii/efficientad-bottle", filename="student_final.pth")
|
| 34 |
+
autoencoder = hf_hub_download(repo_id="MSherbinii/efficientad-bottle", filename="autoencoder_final.pth")
|
| 35 |
+
```
|
| 36 |
|
| 37 |
+
## Live Demo
|
| 38 |
+
Try it at: https://msherbinii-lumina-ai-detection.hf.space
|
| 39 |
|
| 40 |
+
## Powered by Lumina Tech Platform
|
| 41 |
+
Industrial AI quality control system.
|