Defect decisions depend on usable images and the correct inspection location. Part movement, reflections, occlusion, defocus or exposure problems can change the input to the inspection module. Confirm the input and inspection region before attributing an issue to the model, threshold or image capture.

Record inputs and states at each stage

Stage Checks Records to retain
Part location and image alignment Position, rotation, scale and reference template Alignment transform, score and failure reason
Inspection region ROI Correct mapping of the region with the part Coordinate system, crop boundaries and valid extent
Image quality checks Sharpness, occlusion, reflections and exposure Check items, thresholds and failure states
Defect decision Applicable defects, outputs and decision thresholds Model version, evidence images and results

The alignment score measures how well the part is located. The confidence score for a predicted defect is a separate field. Retain both fields with their meanings. Preserve coordinate transforms after scaling, rotation or cropping so defect positions can be mapped to the original image or part coordinates.

Alignment failure is not product acceptance

When alignment or image quality checks fail, report an explicit review-required or inspection-failed state. Business rules determine whether to acquire another image, ask for human review, stop the inspection process or use another procedure. Absence of a defect result is insufficient evidence that the product conforms.

Recheck borderline samples after changing regions

Reducing a region can exclude background interference and can also exclude edges requiring inspection. Check coverage using actual part displacement, rotation, defect positions and normal texture samples. Retain original images, transforms, regions and decision evidence to reproduce false alarms and missed defects.

Validate the quality checks themselves

Quality checks can reject usable samples or accept unsuitable images. Count rejected samples and reasons separately and review them with final inspection results. Thresholds require validation under actual imaging conditions. This article provides no universal acceptance threshold.

Related services: vision algorithms and model engineering and project enquiries.