license: apache-2.0 tags: - object-detection - welding - defect-detection - yolov8 - computer-vision - manufacturing

Welding Defect Detection

This model is created using Aargus-DIY Visual Inspection Tool. A YOLOv8-based object detection model for automated visual inspection of welds, detecting and classifying Bad Weld, Good Weld, and Defect regions in images.

Python YOLOv8 License

Overview

This model performs automated visual inspection of welds to detect and classify welding defects, replacing slow and inconsistent manual inspection with a fast, consistent AI-based system.

Defect Classes: Bad Weld, Good Weld, Defect

Methodology

  • Data Ingestion β€” Pre-split train/valid/test sets in YOLO format
  • Preprocessing & Augmentation β€” Ultralytics built-in augmentation (mosaic, blur, median blur, ToGray, CLAHE)
  • Model Architecture β€” YOLOv8m, trained from ImageNet/COCO-pretrained weights
  • Training β€” Multiple training runs with progressive epoch extension (150 β†’ 200 epochs) and hyperparameter tuning (learning rate, momentum, weight decay) across experiments
  • Validation β€” Precision, Recall, mAP50, mAP50-95, and confusion matrix analysis on held-out test set

Performance

Overall Metrics (Test Set β€” 126 images, 301 instances)

Metric Score
Precision 0.736
Recall 0.699
F1-Score 0.717
mAP50 0.734
mAP50-95 0.535

Per-Class Results

Class Precision Recall F1-Score mAP50 mAP50-95 Instances
Bad Weld 0.920 0.726 0.812 0.833 0.624 95
Good Weld 0.787 0.821 0.804 0.842 0.667 117
Defect 0.500 0.551 0.524 0.526 0.313 89

Note: "Defect" class shows lower performance compared to Bad Weld and Good Weld β€” likely due to visual overlap with the other classes.

Usage

Installation

pip install ultralytics

Load the model and predict

from ultralytics import YOLO

# Load model
model = YOLO("best.pt")
class_names = ["Bad Weld", "Good Weld", "Defect"]

# Run inference on an image
results = model.predict("your_weld_image.jpg", conf=0.5, iou=0.4)

# Display results
for result in results:
    result.show()          # visualize with bounding boxes
    print(result.boxes)    # box coordinates, confidence, class

Use Case

Industrial quality control automation for welding operations β€” enables faster, consistent detection of weld defects on production lines, reducing manual inspection time and improving safety compliance.

Built With

  • Aargus DIY Visual Inspection Tool
  • Ultralytics YOLOv8
  • PyTorch

License

This project is licensed under the Apache 2.0 License.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support