<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/i-kept-trying-to-fix-the-model-the-problem-was-the-light--kfmwwl3ha" -->

---
title: I Kept Trying to Fix the Model. The Problem Was the Light.
description: A builder shares the story of creating an 'Inspection Trust Gate' for manufacturing vision AI, arguing that the real problem in industrial inspection isn't...
canonical: https://daily.dev/posts/i-kept-trying-to-fix-the-model-the-problem-was-the-light--kfmwwl3ha
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: I Kept Trying to Fix the Model. The Problem Was the Light. | daily.dev
og:description: A builder shares the story of creating an 'Inspection Trust Gate' for manufacturing vision AI, arguing that the real problem in industrial inspection isn't...
og:url: https://daily.dev/posts/i-kept-trying-to-fix-the-model-the-problem-was-the-light--kfmwwl3ha
og:image: https://api.daily.dev/og/posts/KFmWwl3Ha.png
og:image:alt: I Kept Trying to Fix the Model. The Problem Was the Light.
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# I Kept Trying to Fix the Model. The Problem Was the Light.

**[Medium](https://daily.dev/sources/medium_js)** · 14 min read · 0 upvotes · 0 comments

## Summary

A builder shares the story of creating an 'Inspection Trust Gate' for manufacturing vision AI, arguing that the real problem in industrial inspection isn't model accuracy but input drift. A vision model validated at 97% accuracy collapsed to 14% false-reject rates on a real press line due to lighting changes, cold dies, and thermal shifts. The solution is a runtime layer that computes Mahalanobis distance across physical image signals (exposure, contrast, glare, etc.) to determine whether each incoming image falls within the model's validated envelope before allowing the model's verdict to actuate a physical reject mechanism. The post covers benchmark methodology, honest disclosure of a weak geometric localization rule, deterministic decision-making vs. LLM agents, EU AI Act compliance considerations, and per-part JSONL audit lineage. Key thesis: drift is an input failure, not a model failure, and no accuracy metric catches it.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://medium.com/@ashutosh_veriprajna/i-kept-trying-to-fix-the-model-the-problem-was-the-light-cb8cf1488d16>

## Questions this post answers

### Why does a vision model that tested at 97% accuracy in the lab start rejecting good parts on the production line?

Model accuracy validated in a lab does not guarantee reliability on the factory floor because the inputs shift out of the distribution the model was validated on. Causes include overhead bay-light glare that changes with stroke angle, lubricant pooling differently on warm versus cold dies, and the first parts of a shift made before the press reaches thermal equilibrium; none of these change the model itself, only its inputs.

_Anyone debugging flaky production model performance can track drift-detection approaches like this on daily.dev._

### How much does false-rejecting good parts cost in an automated inspection line running 40 strokes a minute?

At $2.42 per scrapped part (an order-of-magnitude figure anchored to a published cookie-manufacturer case where an 8.7% scrap-waste reduction saved $94K a year), a naive AOI system with no drift check false-rejecting good parts during a drifted 8-hour shift of 19,200 parts can generate a substantial projected loss, though the dollar figure is explicitly a projection rather than a measured cost.

_Engineers weighing inspection-AI ROI can follow real-world cost breakdowns like this on daily.dev._

### What EU AI Act deadline applies to high-risk AI systems used for safety-critical quality decisions in manufacturing?

High-risk obligations under the EU AI Act become fully applicable on August 2, 2026, with safety-critical quality decisions classified under Annex III. Maximum fines for the most serious prohibited-practice violations reach €35M or 7% of global turnover, making per-decision audit lineage (part id, model version, dataset hash, confidence scores) a practical necessity for conformity filings.

_Teams preparing manufacturing AI systems for EU AI Act compliance can track deadline-driven changes like this on daily.dev._

## Similar posts on daily.dev

- [From Possible to Probable AI Models](https://daily.dev/posts/from-possible-to-probable-ai-models-qjqrxjmul) · Towards Data Science · 2 upvotes · 0 comments
- [Don’t Let the Model Grade its Own Homework](https://daily.dev/posts/don-t-let-the-model-grade-its-own-homework-k8meawh6n) · SD Times · 1 upvotes · 0 comments
- [A Detection Engineer's Guide for Delegating Work to AI](https://daily.dev/posts/a-detection-engineer-s-guide-for-delegating-work-to-ai-j9lcc0nvy) · Huntress Blog · 1 upvotes · 0 comments
- [Aligning the model was never going to govern it](https://daily.dev/posts/aligning-the-model-was-never-going-to-govern-it-tezzb7dbn) · The Next Web · 0 upvotes · 0 comments
- [Why model versioning is not enough for production AI](https://daily.dev/posts/why-model-versioning-is-not-enough-for-production-ai-xkxv645zi) · Stack Overflow Blog · 1 upvotes · 0 comments

---

Tags: [#machine-learning](https://daily.dev/tags/machine-learning), [#computer-vision](https://daily.dev/tags/computer-vision), [#manufacturing](https://daily.dev/tags/manufacturing), [#local-ai](https://daily.dev/tags/local-ai)

[View this post on daily.dev](https://daily.dev/posts/i-kept-trying-to-fix-the-model-the-problem-was-the-light--kfmwwl3ha)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"I Kept Trying to Fix the Model. The Problem Was the Light.","url":"https://daily.dev/posts/i-kept-trying-to-fix-the-model-the-problem-was-the-light--kfmwwl3ha","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/i-kept-trying-to-fix-the-model-the-problem-was-the-light--kfmwwl3ha"},"datePublished":"2026-07-23T05:22:15.724Z","dateModified":"2026-09-13T21:18:38.086Z","description":"A builder shares the story of creating an 'Inspection Trust Gate' for manufacturing vision AI, arguing that the real problem in industrial inspection isn't...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/63bf63002b4e338c79cee8ef47b4fe1f?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/63bf63002b4e338c79cee8ef47b4fe1f?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Medium","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Medium","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/medium","url":"https://daily.dev/sources/medium_js"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/i-kept-trying-to-fix-the-model-the-problem-was-the-light--kfmwwl3ha","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"machine-learning,computer-vision,manufacturing,local-ai","timeRequired":"PT14M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Medium","item":"https://daily.dev/sources/medium_js"},{"@type":"ListItem","position":3,"name":"I Kept Trying to Fix the Model. The Problem Was the Light."}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/i-kept-trying-to-fix-the-model-the-problem-was-the-light--kfmwwl3ha#faq","mainEntity":[{"@type":"Question","name":"Why does a vision model that tested at 97% accuracy in the lab start rejecting good parts on the production line?","acceptedAnswer":{"@type":"Answer","text":"Model accuracy validated in a lab does not guarantee reliability on the factory floor because the inputs shift out of the distribution the model was validated on. Causes include overhead bay-light glare that changes with stroke angle, lubricant pooling differently on warm versus cold dies, and the first parts of a shift made before the press reaches thermal equilibrium; none of these change the model itself, only its inputs. Anyone debugging flaky production model performance can track drift-detection approaches like this on daily.dev."}},{"@type":"Question","name":"How much does false-rejecting good parts cost in an automated inspection line running 40 strokes a minute?","acceptedAnswer":{"@type":"Answer","text":"At $2.42 per scrapped part (an order-of-magnitude figure anchored to a published cookie-manufacturer case where an 8.7% scrap-waste reduction saved $94K a year), a naive AOI system with no drift check false-rejecting good parts during a drifted 8-hour shift of 19,200 parts can generate a substantial projected loss, though the dollar figure is explicitly a projection rather than a measured cost. Engineers weighing inspection-AI ROI can follow real-world cost breakdowns like this on daily.dev."}},{"@type":"Question","name":"What EU AI Act deadline applies to high-risk AI systems used for safety-critical quality decisions in manufacturing?","acceptedAnswer":{"@type":"Answer","text":"High-risk obligations under the EU AI Act become fully applicable on August 2, 2026, with safety-critical quality decisions classified under Annex III. Maximum fines for the most serious prohibited-practice violations reach €35M or 7% of global turnover, making per-decision audit lineage (part id, model version, dataset hash, confidence scores) a practical necessity for conformity filings. Teams preparing manufacturing AI systems for EU AI Act compliance can track deadline-driven changes like this on daily.dev."}}]}
```

