Why this matters for steel / manufacturing quality inspection
Manual visual inspection of steel strip surfaces is slow, inconsistent between
inspectors, and hard to scale to full production-line speed. Instance
segmentation — as opposed to plain classification or bounding-box detection —
recovers the actual defect shape and area, which is what quality control needs
to judge severity and to feed downstream metrics like defect area per coil. An
end-to-end, NMS-free model like YOLO26-seg keeps per-image latency low enough
(single-digit milliseconds on GPU, see below) for inline inspection.
Training data
12,568 grayscale 1600x256 images, RLE instance masks, 4 defect classes,
severely imbalanced (defect_3: 4,636 training images vs. defect_2: 222). Full
conversion pipeline (RLE decode, instance splitting, stratified split) is in
the source repo's scripts/convert_severstal_to_yolo.py. Kaggle competition
rules do not permit redistributing the raw data, so it is not included in
this model repo — download it yourself from Kaggle (free, requires accepting
the competition rules).
Class imbalance, honestly: instance count alone doesn't predict per-class
difficulty. defect_2 — the rarest class in training — outperforms defect_1
(~10x more training instances) on mask mAP50-95. defect_1's defects tend to be
thin, elongated scratches with ambiguous boundaries, which likely hurts mask
IoU regardless of how much data it has.
For the ONNX file, pass task="segment" explicitly — a bare .onnx (no
Ultralytics .pt metadata) can't always auto-detect the task and otherwise
silently falls back to detection-only output with no masks:
model = YOLO(hf_hub_download("betty0/steel-defect-segmentation", "steel_defect_yolo26s_seg_best.onnx"), task="segment")
License
The training/conversion/demo code in the source GitHub repo is MIT
licensed. These weights are fine-tuned from Ultralytics YOLO26, which
Ultralytics distributes under AGPL-3.0 (or a commercial Enterprise
license) — see Ultralytics' licensing terms
before using these weights in a closed-source product. The training data is
subject to the Severstal competition rules.