Skip to content

AQL Sampling Context for Inspection Datasets

By Noah Loul · Reviewed by Noah Loul · Updated

  1. 01Your data spec
  2. 02Matched to businesses
  3. 03Rights and samples reviewed
  4. 04Licensed delivery
How it works with SourceX: Your data spec → Matched to businesses → Rights and samples reviewed → Licensed delivery.Illustrative

Short answer

Where a plant inspects by sampling, only some units in each lot are examined, so an inspection archive is a biased slice of production, not a census. A lot-level accept or reject decision is also not a per-image defect label. Buyers should ask how samples were drawn, what was recorded per unit versus per lot, and which units were ever imaged.

The question behind this page

A buyer looking at a manufacturer's inspection archive sees images, defect codes and pass/fail outcomes, and tends to read them as a description of production. Often they are not. Some plants decide whether to accept a lot by inspecting a sample of it, using a sampling plan, rather than examining every unit. In that case the archive reflects which units were drawn, how they were examined and what was written down, not the full set of units that were made.

This matters for defect-image buying because it explains why the data looks the way it does: why defects appear rarer or more common than expected, why some lots have many images and others none, and why a "reject" can sit beside images that all look fine. For sourcing and class balance in general see sourcing defect image datasets and rare defects and class imbalance.

What the standard describes

ISO 2859-1 is one reference a buyer may hear named. It describes an acceptance sampling system of single, double and multiple sampling plans for inspection by attributes, indexed by acceptance quality limit (AQL) for lot-by-lot inspection. It applies to finished products, components, materials, records and procedures. National standards-body listings give ISO 2859-1:2026 as the current edition, published in January 2026, following the 1999 edition and its 2011 amendment (ISO, 2026); the linked ISO page has not been confirmed to show that edition, so confirm which edition a supplier's plans refer to.

This page does not reproduce plan tables or tell you which plan a plant uses, and nothing here is a statement about what the standard requires of a particular plant. A manufacturer may use ISO 2859-1, a customer-specified plan, an internal procedure or no sampling at all. The standard's text is a published document with its own terms, so a supplier handing it over is also a license question. This is not legal advice.

How sampling shapes the archive

Sampling featureLikely effect on inspection dataWhat the buyer should ask
Only a sample of each lot is examinedMost units have no inspection record or imageWhich units were sampled, and were non-sampled units ever imaged elsewhere?
Lot accepted or rejected as a wholeDecision applies to a lot, not each unitIs a per-unit result stored, or only the lot disposition?
Sample size may vary with lot size and planImage counts may vary by lot, not by riskWere lot sizes and plan identifiers kept?
Plan sets an acceptance criterion for the sampleCounts may be recorded, images may notWere defective units photographed or only tallied?
Double or multiple samplingAdditional units may be drawn in later stagesAre second-stage units flagged, and is that bias recorded?
100% screening on some characteristicsDifferent record type for those checksWhich characteristics were screened, and by what method?

A buyer who ignores these effects may mistake the sampled set for the population, and train or evaluate a model on a defect rate that does not describe production.

Lot disposition is not an image label

Suppose a lot is rejected because the sample contained more nonconforming units than the plan allows. The record says "reject." It does not say which images show the nonconformity, how severe it was, or whether the other sampled units were clean. If only the lot disposition is stored, assigning that label to every image from the lot would mislabel the clean ones.

Link outcomes to units wherever you can. The pattern is discussed in inspection images linked to outcomes, the label schema in defect taxonomy and label schema, and the definitions that make a "defect" mean something are in acceptance standards as label definitions. Written reports of nonconformity may add per-unit detail; see nonconformance reports.

Where sampling creates leakage and bias

  • Same-lot leakage. Images from one lot share lighting, material batch and operator. If lots are split across training and test sets, the model may learn the lot rather than the defect. See leakage in defect datasets.
  • Selection bias. Inspectors who choose samples by eye, rather than by a random draw, may pick suspicious units. The archive then over-represents defects.
  • Survivorship. Rejected lots may be reworked, scrapped or returned, and their records stored elsewhere.
  • Silent gaps. Units never sampled have no label. Absence of a defect record can mean "not examined" rather than "examined and clean."
  • Rate drift. If a plant changes its plan or sample sizes over time, sampling intensity shifts without any change in the product.

Held-out evaluation sets should be separated by lot, line, shift or time as your claim requires, not by random image; the same principle applies to every inspection set.

Illustrative record map

This Illustrative record map uses synthetic identifiers. It shows what a buyer might ask a plant to supply so that sampling can be understood.

# Illustrative only - not an available dataset
inspection_record_map_v0:
  lot:
    lot_id: lot_00871
    lot_size: recorded
    plan_id: plan_ref_A          # internal or standard-based; supplier names it
    plan_type: single | double | multiple
    disposition: accept | reject | rework
    sample_drawn_by: random_procedure | inspector_choice | unknown
  unit_in_sample:
    unit_id: u_0004412
    image_ids: [img_221, img_222]
    characteristics_checked: [surface, dimension_A]
    result: conforming | nonconforming | not_recorded
    defect_codes: from supplier taxonomy
  unsampled_units: count only, no records
  linked_documents: [nonconformance_report_id or null]

If the supplier cannot fill the sample_drawn_by and plan_id fields, assume the sample is not statistically understood and treat any rate estimates with caution.

What this context cannot support

Sampling context does not turn an archive into a representative dataset. It also does not create training data on its own: the standard describes sampling schemes, and a plan document contains no images, labels or defect examples. At best it supplies vocabulary for acceptance definitions and for describing how the data was selected. A buyer still needs images with defect labels, and for a humanoid that inspects or handles parts, robot or teleoperation data for the handling; inspection images and records do not train control.

Records from sampling inspection cannot estimate how often defects occur in unsampled units, and they should not be used to claim a defect rate for production as a whole without the plan, lot sizes and selection method. Treat any such claim from a supplier as something to verify.

Questions to ask suppliers

  1. Which characteristics are inspected by sampling and which by full screening?
  2. What sampling plans or procedures do you use, and are plan identifiers stored per lot?
  3. How are sample units chosen, by random draw or by an inspector's selection?
  4. Are results stored per unit, per lot, or both?
  5. Were defective units photographed, or only counted?
  6. Are images taken for every sampled unit or only for nonconforming ones?
  7. What happens to units from rejected lots, and are their records kept?
  8. Has the plan changed over time, and are changes dated?
  9. Can you share lot sizes and sampling parameters without disclosing customer or product details?
  10. Who owns the plan documents, and are any based on customer specifications you cannot license?

Tell SourceX what your evaluation set needs

If you need inspection images with their sampling context, describe the products, defect types and permitted uses to SourceX. SourceX looks for US businesses that may hold suitable material, checks the data and the supplier's licensing permissions, and coordinates the license and delivery. A request does not guarantee a match; SourceX reviews the requirement and follows up about potential sources. Start at the humanoid training data guide or the inspection, defect and failure data hub. The catalog pages on inspection reports and manufacturing quality records describe the related categories.

Tell SourceX what your evaluation set needs to cover

Sources

Frequently asked questions

Why is an inspection archive a biased slice of production when lots are sampled?

Where a plant inspects by sampling, only some units in each lot are examined, so an inspection archive is a biased slice of production, not a census. A lot-level accept or reject decision is also not a per-image defect label.

What does ISO 2859-1 describe, and does it say what a particular plant must do?

ISO 2859-1 describes an acceptance sampling system for inspection by attributes, indexed by acceptance quality limit. This page does not say which plan a plant uses, and nothing here states what the standard requires of a particular plant.

Why can a lot-level reject not serve as a per-image defect label for each image?

A reject record says the lot was rejected, but not which images show the nonconformity or whether the other sampled units were clean. Assigning that label to every image from the lot would mislabel the clean ones.

Describe the data your robots need

Describe the tasks, modalities and permitted uses you need. SourceX reviews the requirement and follows up about potential sources; a request does not guarantee a match.

Discuss your humanoid training-data requirements with SourceX
See if you qualify