Spaces:
Sleeping
A newer version of the Gradio SDK is available: 6.22.0
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:
- punching_hole
- welding_line
- crescent_gap
- water_spot
- oil_spot
- silk_spot
- inclusion
- rolled_pit
- crease
- 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:
from ultralytics import YOLO
model = YOLO("code0ut/metal-defect-yolo")
results = model("image.jpg")
results.show()