metal-defect-yolo / README.md
Code0ut's picture
Update README.md
ee5b050 verified
|
Raw
History Blame Contribute Delete
1.84 kB

A newer version of the Gradio SDK is available: 6.22.0

Upgrade
metadata
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:

from ultralytics import YOLO

model = YOLO("code0ut/metal-defect-yolo")
results = model("image.jpg")
results.show()