--- 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.