Klyff Metal Surface Defect Detector
An OpenVINO FP16 object detector for eight visual defect categories on metal surfaces. It accepts a single RGB image and returns bounding boxes, class scores, and class IDs.
Release candidate: inference and held-out metrics have been reproduced from the production artifact. Treat this as an engineering preview until the ownership, dataset-terms, target-hardware, and operational gates below are complete.
Model summary
| Field | Value |
|---|---|
| Task | Object detection |
| Family | YOLOv8-family / DEFECT-YOLO export |
| Runtime | OpenVINO IR |
| Precision | FP16 weights, FP32 input/output tensors |
| Input | 1 Γ 3 Γ 640 Γ 640, RGB, values scaled by 1/255 |
| Resize | Aspect-ratio-preserving letterbox with padding value 114 |
| Output | 1 Γ 12 Γ 8400: xywh + 8 class scores |
| NMS | External, class-aware; default example IoU threshold 0.70 |
| Version | metal_surface_obj_v0.01 |
The production graph was exported with Ultralytics 8.2.87. The OpenVINO IR records OpenVINO Runtime 2026.3.0 as its conversion runtime. Its final graph operation selects eight class channels from an original 23-class head; the artifact metadata explicitly says this restriction did not retrain the model.
Classes
| Output ID | Label | Original 23-class ID |
|---|---|---|
| 0 | Patches | 2 |
| 1 | Uneven | 4 |
| 2 | Blowhole | 5 |
| 3 | Break | 6 |
| 4 | Crack | 7 |
| 5 | Crescent_Gap | 8 |
| 6 | Punching | 16 |
| 7 | Scratches | 21 |
Quick start
Python 3.10 or newer is recommended.
python -m venv .venv
source .venv/bin/activate
python -m pip install -r requirements.txt
python inference.py path/to/image.jpg --output prediction.jpg
The command prints JSON detections and optionally saves an annotated image. OpenVINO device selection is explicit:
python inference.py path/to/image.jpg --device AUTO --confidence 0.25 --iou 0.70
Confidence 0.25 is an example operating point, not a calibrated production
threshold. Select and document a threshold using representative site data.
Artifacts
artifacts/model.xmlβ OpenVINO graph and runtime metadataartifacts/model.binβ paired FP16 weightsartifacts/metadata.yamlβ labels, task, stride, and output contractartifacts/model_metadata.jsonβ internal model identity and precisionCHECKSUMS.sha256β SHA-256 integrity values
model.xml and model.bin are a required pair and must stay together.
Dataset evidence
The local training materials describe DEFECT-DET as a curated combination of the Aluminum Defect, Magnetic Tile Surface Defects, GC-DET, and NEU-DET datasets. A cleaned local snapshot contains 4,717 images after removing 18 exact-byte duplicates: 3,817 train, 426 validation, and 474 test images.
The model exposes only eight of the dataset's 23 annotated classes. Their
instance counts in the cleaned held-out test split are: Patches 116, Uneven 12,
Blowhole 18, Break 11, Crack 6, Crescent_Gap 26, Punching 29, and Scratches 39.
See evaluation/dataset-audit.json for the full auditable counts.
The dataset is not included in this model repository. Its component licenses and redistribution terms must be reviewed independently before any dataset publication.
Evaluation
Results below were reproduced with this exact OpenVINO artifact on the 474-image cleaned test split, restricted to the eight exposed classes (257 ground-truth instances). AP uses 101-point interpolation and one-to-one matching.
| Metric | Result | Protocol |
|---|---|---|
| mAP@0.50 | 0.9214 | IoU 0.50, per-class mean |
| mAP@0.50:0.95 | 0.5494 | IoU 0.50 to 0.95 in 0.05 steps |
| Micro precision | 0.8217 | confidence 0.25, matching IoU 0.50 |
| Micro recall | 0.9144 | confidence 0.25, matching IoU 0.50 |
| Class | Test instances | AP@0.50 | AP@0.50:0.95 |
|---|---|---|---|
| Patches | 116 | 0.9316 | 0.5668 |
| Uneven | 12 | 0.8001 | 0.6376 |
| Blowhole | 18 | 0.9495 | 0.4433 |
| Break | 11 | 0.8882 | 0.4651 |
| Crack | 6 | 1.0000 | 0.6517 |
| Crescent_Gap | 26 | 0.9227 | 0.6072 |
| Punching | 29 | 0.9474 | 0.5166 |
| Scratches | 39 | 0.9317 | 0.5068 |
The low sample counts for several classes make those AP estimates uncertain;
Crack AP, for example, covers only six instances and must not be interpreted as
proof of perfect generalization. Full machine-readable results and the exact
evaluator are in evaluation/test-metrics.json and evaluation/evaluate.py.
On an Intel Core i5-1135G7 CPU with OpenVINO 2026.4.1, the evaluation run averaged 147.76 ms/image (preprocess + synchronous inference + postprocess, excluding model compilation and image I/O). This is a development-machine measurement, not a production SLA.
Before promoting this release candidate, compare OpenVINO outputs with a trusted source checkpoint on fixed fixtures and benchmark the intended production device under representative concurrency and thermal conditions.
Intended use
- Engineering evaluation of automated metal-surface inspection.
- Integration testing on OpenVINO-capable CPU, GPU, or accelerator systems.
- Decision support for trained quality-control personnel after site validation.
Limitations and safety
- Only the eight listed categories can be emitted; all other defect types are outside the published output taxonomy.
- Performance can shift with camera, optics, lighting, focus, scale, material, surface finish, and production-line conditions.
- Small classes are imbalanced in the available test annotations; for example, Crack has only six test instances.
- Predictions should not be the sole basis for safety-critical acceptance or rejection without a qualified process and human-review path.
- Monitor input drift, class distribution, confidence distribution, false accepts, and false rejects. Revalidate after camera, lighting, material, process, model, preprocessing, or threshold changes.
License and release rights
The supplied export metadata declares AGPL-3.0 and identifies Ultralytics as
the exporter. The included LICENSE is the GNU Affero General Public License
v3.0; see THIRD_PARTY_NOTICES.md for additional context. Confirm model
ownership, dataset terms, and whether AGPL-3.0 or a separate Ultralytics
enterprise license matches the intended deployment before public release.
Maintainer
Klyff Inc. β public support and security contacts must be added before a general-availability release.