Case study · Industrial defect segmentationMeasured 18 August 2026

Three ways to train a defect model from 43 labels.

The expensive one did not win. We measured all three under one protocol on a public dataset, and the cheapest option matched the most elaborate to within 0.4 mIoU.

One protocol. One variable.

Magnetic Tile Defects is a public set of 1,344 grayscale photographs of magnetic tiles with pixel masks over five defect types. We used 43 labelled images, about a seventh of the training pool, 1,197 unlabelled images, and held out 99 for evaluation.

All three runs shared a DINOv2-S backbone and the same decoder, crop size, batch size, optimiser, schedule, epoch budget, early-stopping rule and evaluation. The training method is the only thing that differs. Every run finished in under an hour on a single 8 GB consumer GPU, with no cloud and no data leaving the machine.

Three quarters of the test set was hiding in training.

The dataset holds roughly six photographs of each physical tile under different filenames. We measured what a naive random split does with that: across five draws, between 69 and 77 of the 99 evaluation images had a near-duplicate sitting in the training pool. A model scores well on that split by recognising pictures it has already seen.

We rebuilt the splits so every group of near-duplicate photographs sits entirely on one side, grouping by perceptual hash and mask overlap, then audited the result: zero evaluation images within the near-duplicate threshold of any training image. Results published on this dataset without that control are inflated, which is worth knowing before you compare anyone’s table, including this one.

The cheap option kept up.

MethodWhat it usesmIoU
Semi-supervised, strict threshold43 labelled + 1,197 unlabelled58.66
Frozen encoder, trained decoder43 labelled, no unlabelled58.26
Supervised fine-tuning43 labelled, no unlabelled51.51
Predict everything backgroundnothing15.11

The semi-supervised run spent 1,197 unlabelled images and fifty minutes of GPU to finish 0.4 mIoU ahead of a method that used no unlabelled data and trained a third as many parameters. On this data the extra machinery did not pay for itself.

The two leaders are also not interchangeable underneath the average. The frozen encoder was far better on blowholes and cracks; the semi-supervised run was far better on uneven grinding. Choosing between them is a question about which defect costs you money. One class stayed close to unlearned in every configuration, which points at labels or class definition rather than architecture, and that finding changes what a project should spend its next week on.

What this does not show.

One dataset, one domain, one random seed, and 99 evaluation images with as few as six examples of some classes. A 0.4 mIoU gap on a single seed is not evidence that one method beats another. It is evidence that they are close enough that the choice should be measured rather than assumed, which is the whole point.

Dataset: Y. Huang, C. Qiu, K. Yuan, “Surface defect saliency of magnetic tile”, The Visual Computer, 2018. Methods and code behind the runs are open: PixCon (arXiv 2607.03068) and CW-BASS v2 (arXiv 2608.12773), both Apache 2.0.

We run this on your images.

Take a small labelled set and the unlabelled archive you already have. We run the same controlled comparison on your task and deliver the configuration that hits your accuracy target at the lowest cost, the trained model, and the evidence behind the choice. Training runs on your hardware, so the images stay where they are, and the model is yours to keep. Fixed scope and fixed price, agreed before anything starts.

Write to research@ebenworks.co with what you are trying to detect and roughly how many images you have.