Knowledge · Architecture

Rule-based machine vision versus AI inspection

The inspection method must separate acceptable product variation from defects within the available cycle time. Rule-based tools use explicit criteria such as edges, dimensions and counts. AI learns patterns from examples. Compare them using the same acceptance limits and representative production images.

Inspection

Choice

When which approach

Compare the methods against the same visible feature, product variation and acceptance limits. Rules are suitable when explicit geometry or intensity criteria separate the classes. Learned models are candidates when relevant appearance variation is difficult to describe with maintainable rules. Neither method recovers information absent from the image.

Classical fits

A fixed hole count or calibrated edge distance can be expressed as explicit criteria. Record locating, measurement and tolerance rules, then test normal variation and borderline parts. Configuration changes still need validation, and the complete tool sequence must meet the result deadline.

Consider AI when

Variable surface appearance can justify a learned classifier or detector when a rule-based baseline misses the agreed limits. Specify the learning task and data requirements: supervised classification needs reviewed labels, while anomaly detection may learn mainly from accepted products. Both need independent defect tests.

Hybrid

For an illustrative coated part, rules can locate its outline and check dimensions while a model assesses surface appearance. Define whether either failure rejects the part and what happens when one tool has no valid result. Test the combined decision and total processing time; passing each tool separately does not validate their integration.

Feasibility

Data and samples before training promises

Separate training images from validation images by production batch or acquisition session where possible. Keep repeated images of the same part together to avoid testing on examples the model has effectively seen. Include good products, known defects, borderline cases and expected changes in lighting or presentation. Report missed defects and false rejects by defect class.

  1. 01

    Try classical

    First check that the defect is distinguishable under the permitted lighting, surface and position variation. Create a documented rule-based baseline where the feature can be expressed explicitly. Keep the original images and expected decisions so alternative methods face the same task.

  2. 02

    Document failure

    Record which conditions fail, rather than only an overall accuracy score. Report missed defects as accepted defective parts divided by tested defective parts, and false rejects as rejected acceptable parts divided by tested acceptable parts. Include counts and defect classes. Determine whether the failure comes from imaging, ambiguous criteria or the algorithm.

  3. 03

    Dataset needs

    Keep development, threshold selection and final testing separate. Group images of the same part and, where practical, split by batch or acquisition session. Freeze the selected configuration before final testing. If failures prompt tuning, obtain new independent evidence rather than reporting the reused set as an untouched test.

  4. 04

    Integration

    Measure the deployed sequence with required logging and communication active. Test invalid inputs, timeout and restart. Record approved rule/model versions, restoration and rollback. Retest when material, imaging or process conditions move outside the validated range; the presence of a model confidence score does not establish production reliability.

Vincent van Montfoort

Unsure about AI?

Bring defect criteria, representative images and the result deadline. Compare both options using setup and validation hours × rate. For AI, include data review, annotation where needed, training, processing hardware and future model validation. For rules, include adjustment and regression testing. Add licences, storage and support, then compare against measured inspection and reject costs.