ML

Design a dataset for visual quality inspection

Track products, batches, lighting and label consistency before counting defect images.

In short
  • Ten consecutive images of one part are not ten independent production examples, so part, batch, camera and capture-time identifiers should be kept.
  • The quality team must define the line between an acceptable scratch and a rejectable crack, and label disagreements must be investigated.
  • An aggregate score can hide poor detection of a critical defect type, so misses should be shown for each defect category.

Define the sampling unit

Ten consecutive images of one part are not ten independent production examples. Preserve part, batch, camera and capture-time identifiers. Different views of the same part in both training and test make evaluation easier. Plan separate acceptance checks for a new product variant.

Agree on defect definitions

The quality team must define the boundary between an acceptable scratch and a rejectable crack. Create a label guide with borderline and uncertain examples. Investigate labeling disagreements rather than concealing them with majority votes. Record geometry, coating and lighting changes.

Evaluate under production conditions

Well-lit laboratory images may not represent conveyor speed, vibration or contamination. Hold out shifts and batches. Show missed examples for each defect type. An aggregate score across all defects can hide poor detection of a critical category.

Design the decision workflow

Route uncertain examples to human review. Include capture, transfer, preprocessing and decision time in the latency budget. Compare pilot recommendations with quality records before enabling automatic rejection. A camera or lighting change should trigger revalidation.

Frequently asked

How should an image dataset be split for visual quality inspection?

Hold out different shifts and batches, and show missed examples for each defect type. Keep part, batch, camera and capture-time identifiers, since ten consecutive images of one part are not ten independent production examples. Plan separate acceptance checks for a new product variant.

When should automatic rejection be enabled in a vision inspection pilot?

Compare pilot recommendations with quality records before enabling automatic rejection. Route uncertain examples to human review. Include capture, transfer, preprocessing and decision time in the latency budget. A camera or lighting change should trigger revalidation.

Sources and further reading

Pilot steps in this guide are proposed engineering workflows. Examples do not constitute measured field performance.