This is a sample report. Start your own assessment below. Start Your Assessment →
← All use cases
Manufacturing & logistics

Defect inspection from photos, right there in production.

What the audit checks

Visual checking is done by a person who tires after an hour, and the miss rate moves with the shift. The audit checks whether you can photograph defects consistently enough, how many samples it takes, and what a passed bad part costs you.

Self-Audit Assessment Report

AI visual quality control on the line

01 Jan 2026

01/Recommendation
Recommended path

AI Agent + human review

Deploy a computer-vision AI model for routine pass/fail decisions with a mandatory human-in-the-loop gate for borderline and novel defects.

This process is a strong candidate for hybrid automation: high volume, rule-driven in the standard case, but with a meaningful exception tail and hard compliance obligations that make full autonomous operation too risky without a human review gate. A computer-vision model trained on defect images handles the 95 percent routine cases automatically, writing results directly to the MES database and machine logs, while the 5 percent borderline or novel cases are routed to a supervisor queue for a final call. This approach directly addresses operator fatigue and shift-dependent miss rates without removing human accountability from the decisions that matter. The client's in-house automation engineer with Python capability and direct MES database access makes this buildable without a large external team, and the Python-based computer-vision ecosystem (PyTorch, OpenCV, FastAPI) fits naturally into that stack.

Python is the natural home for computer-vision model training and inference (PyTorch or TensorFlow, OpenCV), and the MES database connection can be handled with standard Python database libraries, meaning the in-house automation engineer can own the integration without needing a new platform.

02/Process Overview

Process Overview

AI Visual Quality Control on the Line is a manufacturing inspection process that runs continuously throughout the production day. Every time a product or component reaches the designated inspection point on the line, an operator picks it up, performs a visual check based on experience and training, and makes a pass or fail judgement. The result is recorded manually, usually in a spreadsheet or by email, and any borderline or ambiguous case is escalated to a shift supervisor. At the end of the chain, a traceability record is expected to exist for every single inspection, because a defective part reaching a customer can trigger a product recall.

The process runs at roughly 40,000 inspections per year, one minute each, which adds up to around 667 hours of manual effort annually across a team of operators, two shift supervisors, a plant manager, and a maintenance technician. The primary system of record is a legacy MES whose database can be read directly, and machines on the line also produce logs and some sensor data via PLCs. There is no formal API into the MES, and the current reliance on email and spreadsheets to fill the gap between the line and the MES creates real traceability risk. An in-house automation engineer with PLC experience and the ability to learn Python is available, which is a meaningful asset for any integration work.

The main failure modes of the current process are well understood. Operator fatigue on later shifts raises the miss rate. Borderline defects produce inconsistent judgements depending on who is doing the inspection. Novel defect types, ones not seen before, have no codified handling. And data entry errors in spreadsheets surface downstream as rework. The compliance stakes are high: every inspection needs a complete audit trail, and a missed defect at this volume is not just a quality problem but a potential recall event.

03/Path Scores

Path Scores

AI Agent + human review Recommended
9/10

High volume and clear standard-case rules make AI automation compelling, but the 5 percent exception rate at 40,000 runs per year is 2,000 human-judgment calls annually, plus recall-level compliance stakes demand a supervisor gate. A hybrid model captures the bulk of the time saving while keeping humans accountable for the hard cases.

AI Workflow
7/10

A fully automated AI workflow without a human gate is viable if the model confidence threshold is set conservatively, but the compliance and traceability requirements make a mandatory review step for low-confidence outputs strongly advisable. Without that gate it becomes the hybrid path anyway, so the distinction is mainly architectural.

Traditional Code
5/10

Classical image processing (thresholding, contour detection) can catch well-defined defects reliably and is fully auditable, but it struggles with the variety of defect types and lighting conditions that cause the current miss rate. It is a reasonable starting point or fallback for specific defect classes but not a complete solution.

AI Agent Not recommended
4/10

A fully autonomous agent that also decides on escalation, rework routing and traceability logging without human gates introduces unacceptable risk given the recall consequences of a missed defect. The process does not yet have the data infrastructure or model validation history to justify removing human oversight entirely.

RPA Not recommended
3/10

RPA is suited to structured UI-based data entry tasks, not image-based defect classification. It could assist with logging results into the MES once a classification is made, but it cannot perform the visual inspection itself and adds unnecessary complexity compared to a direct Python-to-database integration.

Education (AIRIES) Not recommended
2/10

Training alone does not solve operator fatigue, shift-dependent miss rates or the volume problem. Education is a necessary complement to the recommended path but not a substitute for it.

Stay Manual Not recommended
1/10

The current manual process has a documented fatigue-driven miss rate, no single system of record, and a recall-level compliance risk. Staying manual is not a viable long-term position at this volume.

04/Process Dimensions

Process Dimensions

Eight dimensions drive the recommendation, scored 0–10 with a note on each.

Data Structure 7/10

Images are the primary input and are inherently unstructured, but the pass/fail output and traceability record are well-structured, and the MES database provides a readable destination for results.

Rule Clarity 7/10

The standard pass/fail criteria are clear enough to train a model, but the 5 percent exception tail involves judgment calls that are not fully codified, which is why a human gate is essential.

Exception Frequency 6/10

At 5 percent of 40,000 runs, roughly 2,000 exceptions per year require human judgment, which is frequent enough to design the exception queue carefully but low enough that automation still delivers major savings.

Integration Readiness 6/10

The MES database is readable and machine logs exist, but there is no formal API and the current process relies on email and spreadsheets to fill gaps, meaning integration work is needed before automation can be reliable.

Volume / ROI 9/10

40,000 inspections per year at 1 minute each represents 667 hours of manual effort annually, making the ROI case for automation very strong even at a conservative automation rate.

Process Stability 6/10

Defect types can evolve as products or materials change, so the model will need periodic retraining, but the core inspection logic is stable enough to build on.

Human Judgment Required 6/10

The standard case requires no human judgment, but borderline defects, novel defect types and the final release decision for safety-critical parts all require experienced human oversight.

Compliance Requirements 8/10

Product safety, full traceability per inspection, and recall-level consequences for missed defects make compliance a dominant design constraint that mandates a human review gate and a complete audit trail.

05/ROI Estimate

ROI Estimate

£30,015

Current annual cost

80%

Estimated time saved

£24,012

Annual savings

14mo

Payback period

Build cost estimate: £18,000 – £35,000

Current annual cost is based on 40,000 runs at 1 minute each (667 hours) at GBP 45 per hour, giving GBP 30,015. The 80 percent saving assumes the model handles routine cases automatically and the human queue covers the 5 percent exception tail plus model oversight, leaving roughly 20 percent of effort for human review and supervision. Build cost range reflects an in-house Python engineer doing most of the integration work with external support for model training and the MES pipeline; the high end covers camera hardware upgrades if current image quality is insufficient.

06/Implementation Roadmap

Implementation Roadmap

1
Data Collection and Baseline Audit 3-4 weeks

Capture a labelled image dataset of at least 500 to 1,000 examples covering pass, fail and borderline cases across all defect types currently seen on the line. Simultaneously map the MES database schema and confirm the Python connection. This milestone de-risks the model training phase and surfaces any gaps in image quality or lighting consistency that must be fixed before training.

2
Computer Vision Model Training and Validation 4-6 weeks

Train an initial classification model (PyTorch or TensorFlow with a lightweight CNN or fine-tuned MobileNet) on the labelled dataset. Validate against a held-out test set and set a confidence threshold below which the model routes to the human queue rather than auto-deciding. The automation engineer leads this with external support if needed for the first model iteration.

3
MES Integration and Logging Pipeline 3-4 weeks

Build a Python service that receives the image from the line camera, runs inference, writes the result and confidence score to the MES database, and pushes low-confidence cases to a supervisor review queue (a simple web dashboard or messaging channel). This replaces the current email and spreadsheet gap-filling and creates the full traceability record required for compliance.

4
Pilot on One Line Segment 2-4 weeks

Run the hybrid system in shadow mode alongside the existing manual process on one line segment for two to four weeks, comparing model decisions to human decisions to measure accuracy, false-negative rate and queue volume. Use this data to tune the confidence threshold and refine the exception routing logic before wider rollout.

5
Full Line Rollout and Supervisor Training 3-4 weeks

Roll out to all line segments, retire the spreadsheet and email workarounds, and train shift supervisors on the exception review queue and escalation protocol. Establish a monthly model performance review cadence to catch drift as defect types evolve. Document the audit trail process to satisfy traceability requirements.

6
Continuous Improvement and Model Retraining Loop Ongoing

Set up a feedback loop where supervisor decisions on exception cases are added to the training dataset quarterly, keeping the model current as products and materials change. Define KPIs (false-negative rate, exception queue volume, rework cost) and review them monthly with the plant manager.

07/Risks & Considerations

Risks & Considerations

The most significant risk is a false-negative rate that allows defective parts to pass undetected, which at this compliance level could trigger a product recall. The confidence threshold and human review gate must be calibrated conservatively, erring toward over-flagging for human review rather than under-flagging, especially during the first six months of operation. Model drift is a secondary risk: as product designs or raw materials change, defect appearances change too, and a model trained on historical data will degrade silently unless a retraining cadence is enforced. The integration with the legacy MES is a practical risk; the database is readable but not designed for real-time writes from an external service, so load testing and a fallback logging mechanism are essential before go-live. Finally, the process knowledge currently held in two or three people's heads must be captured and codified during the data labelling phase, otherwise the model will inherit undocumented biases in what counts as a pass or fail.

AIRIES/Learning recommendation

Train the team, not just the tool.

In partnership with AIRIES, the Swiss AI learning platform. These levels fit your result.

Recommended levels
  1. 3
    Corporate Applied Intelligence & Automation
    Turn your own tasks into AI workflows, build reports and dashboards, set up a personal AI assistant.
  2. 4
    AI Leadership & Scalable Systems
    Design teams of AI agents and automate whole departments.
Why these levels

Level 3 gives the automation engineer and supervisors the practical skills to turn the inspection task into a structured AI workflow, including how to design the exception routing and connect it to existing systems. Level 4 equips the plant manager and senior supervisors to govern the system at department scale, set performance KPIs, and manage the ongoing model retraining loop as a business process rather than a one-off IT project. Both levels are directly applicable to the hybrid architecture recommended here.

Focus topics
Who should take it

The automation engineer who will build and maintain the system, plus the plant manager and shift supervisors who will oversee the exception queue and model performance.

Explore these levels on AIRIES → The levels come from the AIRIES course catalogue. Opening the link does not commit you to anything.
08/Architecture Overview

Architecture Overview

flowchart TD A(["Part at Inspection Point"]) B["Camera Captures Image"] C["CV Model Inference"] D{"Confidence Above\nThreshold?"} E["Auto Pass / Fail"] F["Supervisor Review Queue"] G{"Supervisor\nDecision"} H["MES Database Write"] I(["Part Released or Quarantined"]) subgraph Line Hardware A B end subgraph External Systems H end A --> B --> C --> D D -->|"Yes"| E D -->|"No"| F E --> H F --> G G -->|"Approved"| H G -->|"Rejected"| H H --> I

Hover to zoom · click for fullscreen

09/Why This Approach

Why This Approach

The recommended path is Hybrid: a computer-vision AI model that handles routine pass/fail decisions automatically, paired with a mandatory human-in-the-loop gate for borderline, low-confidence, and novel cases. This is the right architecture for this process for several reasons that are specific to what the discovery interview revealed, not generic arguments for AI.

The volume and repeatability of the standard case make AI automation genuinely compelling. At 40,000 inspections a year, even a conservative 80 percent automation rate saves over 500 hours of manual effort annually and eliminates the fatigue-driven miss rate that worsens on later shifts, because a camera and inference model do not get tired. The standard pass/fail criteria are clear enough to train a classification model, and the output, a structured pass, fail, or borderline result written to the MES database, is well-defined. That combination, high volume, rule-driven standard case, structured output, is exactly where computer vision earns its keep.

The compliance and exception picture is what rules out a fully autonomous approach. Roughly 5 percent of inspections at this volume is 2,000 judgement calls a year that involve borderline defects, novel defect types, or safety-critical release decisions. Given that a missed defect can trigger a recall, removing the human from those decisions before the model has a validated track record would be irresponsible. The human review gate is not a concession to caution; it is the load-bearing element of the architecture. It is what makes the system defensible in an audit and what keeps experienced supervisors accountable for the decisions that carry real consequences.

The client's preferred stack is Python, and that preference is well-matched to this problem. PyTorch or TensorFlow with OpenCV for image preprocessing, a lightweight CNN or fine-tuned MobileNet for classification, FastAPI to expose the inference service, and standard Python database libraries to write results directly to the MES database: this is a mature, well-documented ecosystem that the in-house automation engineer can realistically own and maintain. There is no need to introduce a new platform or a cloud dependency unless image storage at scale becomes a requirement later. The existing MES database access and PLC familiarity the engineer already has are directly transferable to the integration work.

Compared to the other paths considered, the case for Hybrid over the alternatives is straightforward. AI Workflow at a score of 7 is viable but collapses into the Hybrid architecture the moment you add a mandatory review step for low-confidence outputs, which compliance demands you do. Traditional Code scored 5 because classical image processing, thresholding and contour detection, can handle well-defined defects reliably and is fully auditable, but it will struggle with the variety of lighting conditions and defect types that cause the current miss rate; it is a reasonable fallback for specific defect classes but not a complete solution. An autonomous AI Agent scored 4 and is not recommended: the process does not yet have the model validation history or data infrastructure to justify removing human oversight from escalation and release decisions, and the recall consequences of a false negative make that risk unacceptable. RPA scored 3 because it cannot perform visual classification at all; it could assist with logging once a result exists, but a direct Python-to-database write is simpler and more robust. Education alone scored 2 because training does not address fatigue, volume, or the absence of a single system of record, though it remains a necessary complement to the technical rollout. Staying Manual scored 1 and is not a viable long-term position at this volume with these compliance obligations.

10/Comparing the Top Approaches

Comparing the Top Approaches

The two strongest candidates here are Hybrid and AI Workflow, and in practice the gap between them comes down to a single design decision: whether a mandatory human review gate is baked into the architecture or treated as optional. An AI Workflow solution could theoretically run end-to-end without human intervention if the confidence threshold is set conservatively enough, but at 40,000 inspections a year with recall-level consequences for a missed defect, "conservative enough" is doing a lot of work. A missed defect is not a recoverable data entry error; it is a potential product safety incident. The Hybrid path makes the human gate structural rather than a tuning parameter, which means compliance is not contingent on the model behaving well on every edge case it has never seen before. That distinction matters enormously here.

Traditional Code scores a five and is worth discussing because it is genuinely useful in a supporting role. Classical image processing with OpenCV, thresholding and contour detection is fast, fully auditable and needs no training data for the defect classes it can handle reliably. For a small set of well-defined, high-contrast defects it could outperform a neural network. The problem is that the current miss rate is driven partly by defect variety and inconsistent lighting, exactly the conditions where rule-based vision struggles. A Traditional Code solution would need a separate rule set for each defect class, would fail silently on anything novel, and would not improve with additional data. It is a reasonable fallback for specific defect types or as a pre-filter before the AI model, but it cannot carry the full inspection load on its own.

The Hybrid path wins specifically because this process has two distinct regimes that suit two different tools. The roughly 95 percent of cases where a defect is clearly present or clearly absent are well-suited to a trained computer-vision model running inference in milliseconds. The 5 percent that are borderline, novel, or involve a safety-critical release decision are well-suited to an experienced supervisor with full context. Building a system that routes each case to the right handler, writes a traceable record either way, and creates a feedback loop from supervisor decisions back into model training is exactly what the Hybrid architecture is designed to do.

11/How to Build It

How to Build It

The first thing to sort out before any model training begins is the image data itself. The automation engineer should work with the shift supervisors to capture a labelled dataset of at least 500 to 1,000 inspection images covering clear passes, clear fails and the borderline cases that currently get escalated. This step is more important than it sounds: the labelling exercise forces the team to codify what currently lives in two or three people's heads, and it will surface inconsistencies in lighting, camera angle and image resolution that need to be fixed at the hardware level before the model will generalise reliably. Any camera upgrades or lighting rigs should be scoped during this phase, since the build cost estimate already accounts for this possibility at the higher end of the range.

Once the dataset is clean and labelled, the automation engineer trains an initial classification model using PyTorch with a lightweight architecture such as a fine-tuned MobileNetV3 or EfficientNet-Lite. These models are well-matched to an edge deployment environment, run inference quickly on modest hardware, and have strong transfer learning performance from ImageNet pre-training even with a few hundred domain-specific examples. The model outputs a class label (pass, fail, or borderline) and a confidence score. A confidence threshold, tuned during validation against a held-out test set, determines whether the model writes its result directly to the MES database or pushes the image and provisional result to the supervisor review queue. The threshold should initially be set conservatively, flagging more cases for human review than feels necessary, and then tightened over time as the false-negative rate is confirmed to be within acceptable bounds.

The integration layer is a Python service, most naturally built with FastAPI, that sits between the line camera and the MES. When a product reaches the inspection point, the camera fires and sends the image to the FastAPI endpoint. The service runs inference, logs the result and confidence score to the MES database using a standard Python database connector such as SQLAlchemy or pyodbc depending on the MES database engine, and either confirms the part as passed or failed or writes a pending record and pushes the case to the supervisor queue. The supervisor queue can start as a simple web dashboard, a Slack channel with an approval workflow, or a lightweight internal tool built with Streamlit; the key requirement is that the supervisor's decision feeds back into the MES record to complete the audit trail. PLC sensor signals, where available, can be used to trigger the image capture event reliably rather than relying on a timed poll, which reduces latency and keeps the pipeline in sync with the physical line.

Before going live, the system should run in shadow mode on one line segment for two to four weeks, meaning it makes decisions and logs them but the existing manual process continues in parallel. Comparing model decisions to human decisions during this period gives a real false-negative and false-positive rate under production conditions, which is the data needed to finalise the confidence threshold and demonstrate to the plant manager and compliance function that the system is performing as required. Full rollout follows, the spreadsheet and email workarounds are retired, and shift supervisors are trained on the exception queue interface and on the monthly model performance review process. A quarterly retraining cycle, fed by the labelled outputs from supervisor decisions on exception cases, keeps the model current as product designs and materials evolve.

12/Risks in Detail

Risks in Detail

The dominant risk in this process is a false negative: a defective part classified as conforming and released to the next stage or, worse, to a customer. The consequences at this compliance level are not limited to rework cost; they include a potential product recall, regulatory exposure and reputational damage. This means the confidence threshold must be calibrated to err on the side of over-flagging for human review, particularly in the first six months before the false-negative rate under production conditions is well understood. It also means the supervisor review queue must be treated as a safety-critical workflow, not an optional triage step. If supervisors begin to rubber-stamp the queue without genuine review because volume is too high or the interface is too slow, the human gate becomes theatre. Queue volume and supervisor decision time should be tracked as KPIs from day one, and if the exception rate climbs above the expected 5 percent, that is a signal either that the model is degrading or that the labelling criteria need revisiting.

Model drift is the other risk that tends to be underestimated in production environments. As component designs change, as suppliers switch materials, or as the line is reconfigured, the visual appearance of both conforming and defective parts will shift incrementally. A model trained on last year's data will not announce when it starts struggling; it will simply begin misclassifying at a rate that may not be obvious until a quality event surfaces downstream. The retraining cadence needs to be treated as a scheduled business process, not a one-off IT task, and the plant manager needs to own it rather than leave it to the automation engineer alone. On the integration side, writing to a legacy MES database from an external Python service introduces the risk of contention, schema drift after a system update, or silent write failures if the database is under load. A fallback logging mechanism, such as a local file or secondary database that captures all inspection records independently of the MES write succeeding, is essential before go-live and should be part of the acceptance criteria for the pilot.

⚡

Claude Code Starter

A scaffolded project ready to open in Claude Code. Unzip, open the folder, and Claude starts building immediately.

Claude Code Starter (.zip)

Your own assessment includes a ready-to-use project scaffold: CLAUDE.md, pyproject.toml, src/agent.py and .env.example. Open the folder in Claude Code and it starts building.

📁 your-process/
📄 CLAUDE.md
📄 pyproject.toml
📁 src/agent.py
📄 .env.example
Start Your Assessment

What's next?

That was someone else's process. Now do yours.

Same seven paths, same eight dimensions, same honest verdict, except scored against how your team actually works. Five to eight questions, about fifteen minutes.

Start Your Assessment
Manufacturing & logistics
Predictive maintenance from sensors and logs Delivery route optimisation Shipment status updates and customer replies Fault diagnosis from machine logs and technician notes
Illustrative scenario based on how these processes typically run. Not a customer case study. Run this on your own process