A defect-detection POC that hit 0.9 mAP on a curated lab set often drops sharply the first week it runs on the real line. The reflex is to call it a data problem: gather more line images, fine-tune YOLO, and expect the catch rate to snap back. Sometimes that works. Sometimes it hides the exact failure the deployment was budgeted to catch. Fine-tuning YOLO is a bounded lever, not a cure. It re-fits the detector to your line’s lighting, part geometry, and defect classes. It cannot invent handling for defect types that were never in the training distribution. The distinction sounds academic until you watch a fine-tuned model sail past a defect it has never seen — high confidence on everything it recognises, dead silent on everything it doesn’t. That silence is not a bug you can annotate away. It is the shape of the technique. Knowing which curve fine-tuning moves — the achievable defect-catch ceiling, or the false-confidence ceiling — is the whole point of scoping it correctly. What fine-tuning YOLO actually changes YOLO (You Only Look Once) is a single-stage object detector: one forward pass produces bounding boxes and class scores across a grid. Off-the-shelf weights — say, a YOLOv8 model pretrained on COCO — encode generic visual features plus 80 everyday object classes. None of those classes is “hairline crack on an anodised bracket.” Fine-tuning takes that pretrained backbone and continues training it on your labelled line images, so the detection head learns your defect classes and the feature extractor adapts to your imaging conditions. Two things shift when you do this well. First, the model re-fits to domain specifics the lab set never captured: the LED panel’s colour temperature, the conveyor’s motion blur at line speed, the way a scratch reads differently on brushed versus polished steel. Second, transfer learning lets you reach a target precision/recall with far fewer annotated images than training from scratch would demand — the pretrained backbone already knows edges, textures, and gradients, so you are only teaching it what a defect looks like, not what an image is. What does not change is the closed-world assumption. A fine-tuned detector answers “which of my known classes is present, and where?” It does not answer “is there something anomalous here that resembles none of my classes?” Those are different questions, and only one of them is what fine-tuning solves. If you have not yet internalised how the detector arrives at a box and a score in the first place, our walkthrough of YOLO inference on an industrial CV inspection line sets up the mechanics this article builds on. When fine-tuning closes the lab-to-line gap — and when it masks it The lab-to-line gap has two components that fine-tuning treats very differently. One is a distribution shift on known defect types: the crack you trained on looks different under real lighting. Fine-tuning closes this — it is the textbook use case. The other is coverage of defect types the training set never contained. Fine-tuning does nothing here, and worse, a well-fitted model’s rising confidence on known classes can make the overall system feel healthier than it is. This is the divergence point. A team measures aggregate mAP going up after fine-tuning, declares the gap closed, and ships. Meanwhile the unknown-defect detection rate — the metric nobody put on the dashboard — stayed flat at whatever the base model happened to catch by luck. In our experience across industrial CV engagements, this is the single most common way a defect-detection deployment looks like a success in validation and fails in the field. It is an observed pattern, not a benchmarked rate, but it is consistent enough that we treat it as a default risk to design against rather than an edge case. Diagnostic: is your residual miss a fine-tuning problem or a pipeline problem? Use this before you spend another annotation cycle. If the miss belongs in the right column, more line images will not fix it. Symptom on the line Likely a fine-tuning problem (data lever helps) Likely a pipeline problem (fine-tuning will not help) Known defect class missed under specific lighting Yes — add representative line images for that condition No Known defect missed at line speed due to motion blur Yes — augment with motion-blur samples, retrain Sometimes — also a resolution/throughput trade-off A defect type never seen in training passes silently No Yes — needs out-of-distribution handling Confidence high, box slightly off on known class Yes — more precise annotation, retrain the head No Novel contamination or assembly error, no class for it No Yes — needs anomaly detection alongside the detector Catch rate fine, but no signal when the model is unsure No Yes — needs confidence-threshold observability The rows split cleanly by one question: does a training example exist for this failure? If yes, fine-tuning is the right lever. If no example could exist — because the defect class is open-ended — then no amount of annotation reaches it, and the fix lives in pipeline architecture. How much annotated data do you actually need? There is no universal number, and anyone quoting one without your defect taxonomy is guessing. The volume is governed by a handful of variables, and the honest planning move is to estimate against them rather than against a headline figure. The count scales with the number of distinct defect classes, the visual subtlety of each defect (a gross dent needs fewer examples than a sub-millimetre hairline), the variability of your line conditions (multiple lighting rigs or part finishes multiply the requirement), and the target precision/recall the deployment was budgeted against. As a planning heuristic — an observed range from CV engagements, not a published benchmark — teams that pretrain on a general backbone and fine-tune for a small set of well-defined, visually distinct defect classes often reach a useful catch rate with hundreds of well-annotated examples per class, while subtle or high-variability classes push that into the low thousands. Treat those as bounds to size a pilot, not commitments. What determines the number more than anything is annotation quality. A smaller set of tightly, consistently labelled boxes beats a larger set with sloppy or inconsistent labels — the model learns the annotation noise as readily as it learns the defect. This is also why the metric you fine-tune toward matters: chasing raw mAP can reward a model that is confidently right on the easy classes while quietly weak on the ones that matter. Our breakdown of what mAP@50 means for defect detection explains why a single aggregate score can hide exactly the per-class weakness a QC line cares about, and reading mAP50 versus mAP50-95 on the line shows why localisation strictness changes which model you would pick. Why a fine-tuned model still misses unknown defects A detector trained on classes A, B, and C partitions the visual world into “A, B, C, or background.” A genuinely novel defect — a contamination pattern, an assembly error, a material flaw with no analogue in the training set — gets sorted into “background,” silently, with no low-confidence flag to trip an alert. Raising the confidence on known classes, which is what fine-tuning does, does not create a fourth bucket for “unfamiliar.” Closing the unknown-defect gap is an architecture change, not a training change. The usual additions are an anomaly-detection branch (an autoencoder or one-class model that flags patches deviating from the learned distribution of good parts, independent of the defect taxonomy), confidence-threshold observability that surfaces when the detector is operating near its decision boundary, and a human-in-the-loop review path for flagged-but-unclassified frames that feeds back into the next annotation cycle. The unknown-defect rate stays flat until at least one of these is present — fine-tuning alone will not move it. The horizontal discipline behind these limits, including how open-world handling and edge throughput interact, belongs to our broader computer vision practice, which owns the scale-failure patterns that show up across every industrial detector, not just YOLO. How edge throughput bounds which YOLO you can fine-tune toward Fine-tuning happens on a workstation or in the cloud; inference happens on the factory floor, usually on an embedded accelerator with a fixed compute and power envelope. That constraint reaches backward into the fine-tuning decision, because you must fine-tune toward a model your edge hardware can actually run at line speed. The levers interact. A larger YOLO variant (more parameters, deeper backbone) detects subtler defects but costs latency; a higher input resolution catches smaller defects but scales compute roughly with pixel count. On an edge device — a Jetson-class module, say — with a required frames-per-second dictated by conveyor speed, those two demands collide against a fixed budget. Optimisation with TensorRT, INT8 quantisation, or ONNX Runtime buys back some headroom, but not unlimited headroom, and quantisation itself can shave a little precision off subtle defect classes. So the practical sequence is: pin the throughput requirement from line speed first, size the input resolution and variant that fit inside it, then fine-tune toward that specific model — not the other way round. Fine-tuning a large high-resolution model you cannot deploy is wasted annotation. Our overview of real-time object detection on the production line works through where these latency budgets actually bind. Modular pipeline versus monolithic weights The difference between a fine-tuned YOLO detector that ages well and one that quietly fails is rarely the weights. It is the structure around them. A monolithic deployment drops fine-tuned weights behind a camera trigger and reports pass/fail. When the catch rate drifts — a new part variant, a lighting change, a novel defect — there is no signal until scrap or a customer return surfaces it. A modular, observable pipeline separates the stages: image acquisition and preprocessing, the detector, a parallel anomaly-detection branch, confidence and per-class metric logging, and a feedback path from flagged frames into retraining. Each stage is inspectable. When performance drops you can localise the cause to a stage instead of retraining blindly, and the anomaly branch gives you a chance at the unknown-defect case the detector structurally cannot reach. Fine-tuning is one line item inside that pipeline — the lever that re-fits the detector stage. Treating it as the whole system is the error. The value of the modular framing is that it tells you honestly which gaps fine-tuning can close and which it cannot, before you spend a quarter annotating your way toward a ceiling the architecture won’t let you pass. FAQ What’s worth understanding about fine-tuning YOLO first? Fine-tuning continues training a pretrained YOLO model — for example one pretrained on COCO — on your labelled line images, so the detection head learns your defect classes and the backbone adapts to your imaging conditions. In practice it re-fits a generic detector to your specific line’s lighting, part geometry, and defect types, and because transfer learning reuses the pretrained backbone, it reaches a target precision/recall with far fewer annotated images than training from scratch. When does fine-tuning YOLO actually close the lab-to-line gap, and when does it just mask the problem? It closes the gap when the loss is a distribution shift on known defect types — the same crack reading differently under real lighting — because that is exactly what more representative line images fix. It masks the problem when aggregate mAP rises on known classes while the unknown-defect rate quietly stays flat, making the system feel healthier than it is. Use the diagnostic split: if a training example for the miss can exist, fine-tuning helps; if the defect type is open-ended, it cannot. How much line-specific annotated data do you need, and what determines that number? There is no universal figure — the volume scales with the number of distinct defect classes, the visual subtlety of each, the variability of your line conditions, and the target precision/recall. As a planning heuristic from CV engagements (not a published benchmark), small sets of well-defined, visually distinct classes often reach a useful catch rate with hundreds of well-annotated examples per class, with subtle classes pushing into the low thousands. Annotation quality matters more than raw count: consistent labels beat a larger, noisier set. Why does a fine-tuned YOLO model still miss unknown defects, and what has to be added? A detector trained on a fixed class list sorts anything unfamiliar into “background” silently, and raising confidence on known classes does not create a bucket for the unfamiliar. Closing that gap is an architecture change, not a training change: add an anomaly-detection branch that flags deviations from known-good parts, confidence-threshold observability, and a human review path for flagged-but-unclassified frames. The unknown-defect rate stays flat until at least one of these is present. How do edge throughput constraints limit which YOLO variant and resolution you can fine-tune toward? Inference runs on an embedded accelerator with a fixed compute and power budget, and line speed dictates the required frames per second. Larger variants and higher input resolutions catch subtler and smaller defects but cost latency, so they collide against that budget; TensorRT, INT8 quantisation, or ONNX Runtime buy some headroom but not unlimited. Pin the throughput requirement first, size the variant and resolution that fit, then fine-tune toward that specific model. What does a modular, observable pipeline look like versus a monolithic deployment? A monolithic deployment hides fine-tuned weights behind a trigger and reports only pass/fail, so drift surfaces as scrap or returns with no earlier signal. A modular pipeline separates acquisition, the detector, a parallel anomaly branch, confidence and per-class logging, and a feedback path into retraining — each stage inspectable, so you can localise a performance drop instead of retraining blindly. Fine-tuning is one line item inside that structure, not the whole system. Where this leaves the scoping decision Fine-tuning done well moves the achievable defect-catch ceiling. Fine-tuning done as a substitute for pipeline observability moves the false-confidence ceiling instead — and the two feel identical on a validation dashboard until a novel defect ships. The scoping question is not “how much data do we need” but “which of these two curves are we on,” and answering it requires looking at the failure taxonomy, not just the mAP trend. When a detector gap turns out to be a pipeline-architecture problem that no annotation budget can close, that is precisely the line item a production CV readiness assessment is built to size before the annotation spend starts.