AI Defect Detection That Survives the Production Floor

Deep learning inspection built as a production pipeline — optics, dataset, model, edge deployment and validation — not a Jupyter demo that dies on the line.

YOLO / U-Net / Anomaly Jetson & x86 / TensorRT Validated Escape Rates US-Based Engineering

Home › AI Defect Detection

From labelled defect samples to a production inference engine

A defect-detection model that scores well in a notebook is worth nothing on a line. What matters is whether it holds its escape rate across shifts, lighting drift, material lots and operators — and whether it runs fast enough on hardware you can afford.

NJCV Lab builds the whole pipeline, not a demo: image acquisition engineering, labelling strategy, model selection, quantization, deployment on edge hardware, and the validation report that tells you what the machine will and will not catch.

  1. Acquisition first. Defect contrast is decided by optics and illumination, not by the network. If a scratch is invisible under the wrong light, no model will find it.
  2. Labelling strategy. Detection boxes, segmentation masks, classification, or good-only anomaly training — chosen per defect class, with an annotation guide so your team can extend the dataset later.
  3. Model selection. YOLO-family detectors, U-Net style segmentation, CNN classifiers, ViT backbones and anomaly models. The task picks the architecture, not the hype cycle.
  4. Compression and deployment. ONNX export, FP16 or INT8 quantization and TensorRT engines on Jetson or x86 IPC, in Docker, with the operator UI and traceability layer.
  5. Validation. Per-class precision / recall against a held-out set, false-call rate on known-good production, and an escape-rate estimate on defect samples the model never saw.

Which defects AI handles well — and which it does not

Honest triage saves months. These are the categories we see repeatedly on industrial parts.

Defect typeAI suitabilityNotes
Missing or misplaced component, wrong polarityExcellentStable geometry, large visual signal, few samples needed
Surface scratches, contamination, stains, discolorationGoodWorks well with engineered illumination; sensitive to lighting drift, so the light source is part of the design
Print, code and label defectsGoodCombine learned features with OCR rules for auditability
Hairline cracks at low contrastFairUsually a lighting problem first; may need angled dark-field or multi-shot fusion
Dimensional and geometric tolerancePoor fitUse calibrated metrology — more accurate, explainable and auditable
Sub-surface, void and BGA joint defectsOut of scopeNeeds X-ray / AXI, not optical imaging
Unknown, unenumerated failure modesAnomaly detectionTrain on good parts only; catches novelty but needs human review of flagged parts

How many samples you actually need

Sample counts drive schedule and cost more than architecture choice does. These are working starting points, not guarantees — defect variety matters more than raw count.

ApproachTypical starting datasetWhat it buys you
Detection or classification (supervised)100–300 labelled examples per defect class, plus 300+ good partsRobust detection across normal process variation
Segmentation (pixel-level)50–150 masked examples per classArea, length and severity measurement of a defect
Anomaly detection (good-only)30–100 good images per lighting condition and viewCoverage of defects you have not seen yet
Rare defects (a handful of examples)5–20 examplesDemonstration only — validation confidence is limited until more are collected

If you have fewer defective samples than this, the feasibility study is where we find out whether anomaly detection, synthetic augmentation or a rule-based approach can carry the task. We will not quote a production accuracy figure before imaging your parts.

How acceptance is defined

Two numbers matter on a line, and they pull against each other:

Every project fixes both targets in writing before model training starts, then reports achieved performance against a held-out set at the agreed operating threshold. Gauge repeatability across re-runs and lighting states is measured too, because a model that flips its decision on the same part is unusable regardless of its average accuracy.

Deployment: edge hardware, latency, throughput

What you receive at handover

AI inspection questions, answered plainly

Can a model work if we only have a handful of defect samples?

Sometimes. A few examples per class can be enough to prove feasibility with anomaly detection or heavy augmentation, but the confidence you can place in the result is low until more examples exist. We will tell you which of the two you are getting: a demonstration, or a validated production model.

Will the model keep working when we add new part numbers?

Not automatically, and anyone who says otherwise is selling something. Options are a variant classifier with a retrain and re-validation step, a part-agnostic approach where the defect does not depend on design, or an operator-taught recipe per part. The cost of adding a variant is agreed up front.

Do we have to send images to the cloud?

No. Inference runs on the machine or on a local IPC. Nothing leaves your network unless you ask for a data-export feature, and retention is under your control.

Which cameras and lights do we need?

We specify them as part of the project. Where existing hardware is adequate we reuse it — the feasibility study tests your current setup before recommending a purchase.

What accuracy can you guarantee?

No honest supplier quotes an accuracy number before seeing the defect. What we commit to is a measured escape rate and false-call rate on a defined held-out set, validated on the machine you buy, with the test protocol agreed in advance.

YOLO, U-Net, ViT, or something else?

The defect decides. Boxes for missing or displaced parts, masks when you need defect area or length, classifiers for surface grading, anomaly models when the failure modes are unknown. Model choice is an engineering decision we document, not a brand preference.

Not sure if your defect is even visible?

Send sample parts — good and bad. We build a test rig, capture real images, and deliver a written Go / No-Go report in 2–6 weeks.

Request a feasibility study See delivered systems