Spaces:
Sleeping
Sleeping
| title: Metal Surface Defect Detection - YOLOv8 | |
| emoji: π | |
| colorFrom: blue | |
| colorTo: purple | |
| sdk: gradio | |
| sdk_version: 5.49.1 | |
| app_file: app.py | |
| pinned: false | |
| # π Metal Surface Defect Detection β YOLOv8 (HF Space) | |
| This Hugging Face Space provides an interactive **YOLOv8 Small (YOLOv8s)** model for detecting and localizing defects in forged metal surfaces. | |
| The model is trained on a custom industrial dataset containing **10 defect categories**, and can identify & localize defects directly from uploaded images. | |
| --- | |
| # π§ **About the Model** | |
| This model comes from the repository: | |
| β‘οΈ **`code0ut/metal-defect-yolo`** | |
| It was trained using: | |
| - **YOLOv8s** (Ultralytics) | |
| - **50 epochs** | |
| - **640Γ640 image size** | |
| - **AdamW optimizer (auto-selected)** | |
| - **Google Colab T4 GPU** | |
| The model was exported as `best.pt` and is automatically downloaded from the Hugging Face Hub when the Space loads. | |
| --- | |
| # π·οΈ **Defect Classes (10 Total)** | |
| The detector can identify the following metal surface defects: | |
| 1. punching_hole | |
| 2. welding_line | |
| 3. crescent_gap | |
| 4. water_spot | |
| 5. oil_spot | |
| 6. silk_spot | |
| 7. inclusion | |
| 8. rolled_pit | |
| 9. crease | |
| 10. waist_folding | |
| These categories are common in industrial quality inspection systems used for forged or rolled metal products. | |
| --- | |
| # π **How to Use the Space** | |
| Upload any metal surface image using the UI. | |
| The model will: | |
| - Run YOLOv8 inference | |
| - Display bounding boxes | |
| - Show class labels & confidence scores | |
| - Return a processed output image | |
| No code is needed β everything runs inside the browser. | |
| --- | |
| # π§ͺ **Using the Model Programmatically (Python)** | |
| You can also use the model directly in your Python environment: | |
| ```python | |
| from ultralytics import YOLO | |
| model = YOLO("code0ut/metal-defect-yolo") | |
| results = model("image.jpg") | |
| results.show() |