Instructions to use Ashgibbs/Cosmetic_Defect_Detection with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- ultralytics
How to use Ashgibbs/Cosmetic_Defect_Detection with ultralytics:
# Couldn't find a valid YOLO version tag. # Replace XX with the correct version. from ultralytics import YOLOvXX model = YOLOvXX.from_pretrained("Ashgibbs/Cosmetic_Defect_Detection") source = 'http://images.cocodataset.org/val2017/000000039769.jpg' model.predict(source=source, save=True) - Notebooks
- Google Colab
- Kaggle
File size: 1,277 Bytes
00ef0ce 1100ea7 00ef0ce 1100ea7 00ef0ce 1100ea7 00ef0ce 1100ea7 00ef0ce 1100ea7 00ef0ce 1100ea7 00ef0ce 1100ea7 00ef0ce 1100ea7 00ef0ce 1100ea7 00ef0ce 1100ea7 00ef0ce 1100ea7 00ef0ce 1100ea7 00ef0ce 1100ea7 | 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 | ---
language: en
license: mit
tags:
- yolo
- ultralytics
- object-detection
- defect-detection
- industrial-inspection
---
# Cosmetic Defect Detection (YOLOv8)
This model is a YOLOv8-based object detection model trained to identify cosmetic defects on metal surfaces.
## Model Details
- **Architecture**: YOLOv8n (Weights: `best.pt`)
- **Task**: Object Detection
- **Classes**:
- `Crazing`
- `Inclusion`
- `Patches`
- `Pitted`
- `Rolled-in Scale`
- `Scratches`
## Training Results
The model was trained on the **Metal Surface Defect Dataset (NEU)**. Training results, including confusion matrices and performance plots, are available as files in this repository.
### Performance
- **Confusion Matrix**: See `confusion_matrix.png`
- **Results Plot**: See `results.png`
## How to use
You can load this model using the `ultralytics` library:
```python
from ultralytics import YOLO
from huggingface_hub import hf_hub_download
# Download the model weights
model_path = hf_hub_download(repo_id="Ashgibbs/Cosmetic_Defect_Detection", filename="best.pt")
# Load the model
model = YOLO(model_path)
# Run inference
results = model.predict("path/to/image.jpg")
results[0].show()
```
## Dataset Credit
The training was conducted using the NEU Surface Defect Dataset.
|