Visual Defect Detection
Connecting

Architecture

How this system is put together, and why. Everything on this page is implemented in the repository this console ships with — the diagrams describe running code, not a proposal.

Principles

Six rules that decide every other question

  • 01Decide locally, learn centrally

    The camera-to-PLC path runs entirely on the edge PC with a frozen model bundle. Nothing on that path depends on a network, a cloud service or a person. Training, labelling, monitoring and release management live on the central platform.

  • 02The vision system decides; the PLC acts

    Reject and divert are executed by the PLC on a hard-wired signal with a watchdog. The AI never drives an actuator directly, and the watchdog acts on the absence of a heartbeat rather than on anything the station has to remember to send.

  • 03No silent PASS

    A part is passed automatically only when the evidence is valid — correct recipe, usable views, healthy models, on-time result — and the frozen policy says PASS. Every other case is a HOLD, and a person sees it.

  • 04Everything that affects a decision is versioned together

    Model, pre-processing, class map, thresholds, policy and camera recipe ship as one signed bundle with one hash. Each station records which bundle made each decision, so a decision can be reproduced rather than merely remembered.

  • 05Evidence before actuation is complete

    The image, the scores, the action and the PLC acknowledgment are written to a durable local buffer before the transaction is considered complete. Upload is asynchronous, and a station that cannot upload keeps inspecting.

  • 06Secure by zone

    IEC 62443-style zoning. The cell initiates every connection outbound; there are no inbound ports, no plant credentials on the edge, and only signed artefacts are ever loaded.

One station

What is on the synchronous path, and what is beside it

One inspection stationEverything below the line may fail without stopping inspectionSYNCHRONOUS — trigger to acknowledgment, no networkCaptureGenICam, hardware trigg…Quality gateblur, exposure, part pr…Pre-processcrop, align, normaliseInferenceclassifier + anomalyPolicyfrozen thresholdsPLC bridgepart-ID matchedASYNCHRONOUS — may fail without stopping the lineEvidence bufferdurable, append-onlyUploaderSparkplug B + object storeModel updatersigned bundles, A/B slotsHealth & metricsheartbeat, PrometheusOperator HMIread-only to the policyThe vision system decides; the PLC acts. The reject signal is a hard-wired line, not a message.

Zones and conduits

Which way connections are opened

Cellcamera, edge PC, PLCoutPlant OTbroker, historianoutIndustrial DMZregistry mirror, conduitoutEnterprise / cloudtraining, monitoringIEC 62443 zones — every connection is initiated outwardNo inbound ports to the cell. No plant credentials on the edge. Signed artefacts only.A station that loses the network keeps inspecting; it is the console that goes blind, not the line.

Storage and bandwidth

The sizing model, live. Move the assumptions and the answer follows

The platform is not answering; the calculator runs there.

Coded reasons

Every decision carries one. Exactly one of them permits an automatic pass — that is the no-silent-PASS rule, made checkable

CodeWhat it meansKindDefaultMay pass?
0Part passed inspection.passPASSyes
101Image is out of focus. Check focus and vibration.evidenceHOLD—
102Image is over- or under-exposed.evidenceHOLD—
103Reflection covers part of the inspected area.evidenceHOLD—
104No part found in the inspection area.evidenceHOLD—
105Part is outside the region of interest.evidenceHOLD—
106Not every required view was captured.evidenceHOLD—
107Could not align the part to the template.evidenceHOLD—
108Frame was dropped; previous part still in flight.evidenceHOLD—
109Camera did not deliver a frame in time.evidenceHOLD—
110Lighting is outside the recipe limits.evidenceHOLD—
111Image is too noisy to judge. Check gain and sensor temperature.evidenceHOLD—
201Known defect detected with high confidence.defectREJECT—
202Result is not confident enough to decide automatically.defectHOLD—
203Score sits on the decision threshold.defectHOLD—
204Classifier and anomaly model disagree.defectHOLD—
205Mark found but smaller than the size limit for its class.defectHOLD—
206Rejected by a rule specific to this part number.defectREJECT—
301Part does not look like anything the model has seen.noveltyHOLD—
302Anomaly score is high but no known defect class matches.noveltyHOLD—
303Appearance has drifted away from the reference set.noveltyHOLD—
401Result arrived after the divert deadline.timingHOLD—
402Result belonged to an earlier part and was discarded.timingHOLD—
403PLC did not confirm the decision.timingHOLD—
404A result for this part was already delivered.timingHOLD—
501Inference is not healthy. Part held.healthHOLD—
502Station is running degraded. Part held.healthHOLD—
503Active model does not cover the selected part number.healthHOLD—
504Policy version does not match the model bundle.healthHOLD—
505Evidence storage is full. Part held.healthHOLD—
506Golden-image self-test failed.healthHOLD—
507Station is in maintenance. Part not inspected.healthHOLD—
508Station is in shadow mode. Result recorded, not actuated.healthHOLD—
509Station produced no result for this part.healthHOLD—
601Passed by an operator after review.dispositionPASS—
602Rejected by an operator after review.dispositionREJECT—
603Passed by a quality engineer after review.dispositionPASS—
604Rejected by a quality engineer after review.dispositionREJECT—
605Defect confirmed downstream on a passed part.dispositionREJECT—