Skip to content

Dataset

Machine vision defect detection datasets for AI training

A defect detection dataset is a set of images from in-line inspection cameras, automated optical inspection (AOI) and X-ray stations, each carrying the inspection system's pass or fail call, the defect class and its location, and the human reviewer's final disposition where a part was re-judged. SourceX sources these to a buyer's spec from established manufacturers that hold them in vision-system image stores and quality databases, keyed by part number, serial or lot and station. Each dataset is de-identified and licensed for an agreed permitted use.

Dataset manifest

Sourced to your spec
What it is
Inspection-station images with the machine's call, defect class and location, the reviewer's verdict and station capture settings
Typical systems
Smart cameras and vision controllers, AOI, solder paste and X-ray machines, review stations, MES and quality databases
Typical history
Set by each station's image-logging and overwrite settings; rejects usually outlast good parts; specify images per defect class, product and station
Modality
Still images, some with height maps or several lighting channels; structured verdict and station tables
Delivery formats
Agreed per order; PNG, BMP or TIFF at original bit depth, boxes or masks as JSON, verdict tables as Parquet or CSV
Preparation
Part numbers, serials and customers pseudonymized; operator IDs removed; logos, labels and any people in frame reviewed
Licensing
Scoped per plant, product and station after rights review; confirm clearance for images of customer-owned parts; permitted use agreed per license
Availability
Sourced to your spec; depends on plants that kept images with both verdicts and may release them; not guaranteed
ImagesIllustrative

What a delivery contains

Fields vary by source system and are fixed per order. A typical delivery includes:

FieldTypeWhat it holds
image_idstringPseudonymous ID for one captured image; images of the same unit share a unit reference.
unit_refobjectPseudonymous part number with the serial, lot or panel ID, and the side, cavity or position that was imaged.
stationobjectStation ID and type, such as in-line camera, solder paste inspection, AOI or X-ray, and its position in the line.
opticsobjectArea or line scan, lens type, pixel scale in millimeters per pixel, bit depth and whether the sensor is mono or color.
illuminationobjectLighting geometry, color and exposure for this image, and its channel index where the station takes several lightings per part.
image_fileobjectFile path, capture time, format, pixel dimensions and compression, and whether it is a full frame or a crop around the flagged region.
recipe_versionobjectInspection program and revision in force, with the date its thresholds or reference images last changed.
machine_callobjectThe system's pass or fail result with its defect class code, the tool that fired and the score against its threshold.
defect_regionsarrayFlagged locations as boxes or masks in pixel coordinates, each tied to a named region, feature or component reference.
review_verdictobjectThe human reviewer's decision on a flagged unit, such as confirmed defect or false call, with reviewer role, time and comment.
downstream_resultobjectLater test or inspection findings for the same serial, including the stage that found a defect this station passed.
retention_classenumWhy the image was kept: reject, sampled pass, full traceability, golden reference or engineering study.
label_statusenumWhether the label is the machine's alone, reviewed at the line, confirmed downstream or re-labeled offline.
Sample recordIllustrative

Field names from the table above; values are masked placeholders.

Example record

{
  "image_id": "img_5d20c7",
  "unit_ref": {
    "part_id": "prt_3f1a",
    "serial": "sn_88204",
    "panel_position": 3,
    "side": "top"
  },
  "station": {
    "station_id": "st_aoi_02",
    "type": "post_reflow_aoi"
  },
  "optics": {
    "scan": "area",
    "lens": "telecentric",
    "mm_per_px": 0.015,
    "bit_depth": 8,
    "color": true
  },
  "illumination": {
    "geometry": "ring, low angle",
    "color": "white",
    "channel": 2
  },
  "image_file": {
    "path": "images/st_aoi_02/img_5d20c7.png",
    "captured_at": "2024-09-17T02:41:08Z",
    "width": 640,
    "height": 480,
    "extent": "component_crop"
  },
  "recipe_version": {
    "program": "prg_3f1a_top",
    "revision": 14,
    "thresholds_changed": "2024-08-29"
  },
  "machine_call": {
    "result": "fail",
    "class_code": "INSUFF_SOLDER",
    "tool": "fillet_height",
    "score": 0.41,
    "threshold": 0.5
  },
  "defect_regions": [
    {
      "component": "R118",
      "pin": 2,
      "bbox_xywh": [
        212,
        140,
        58,
        44
      ]
    }
  ],
  "review_verdict": {
    "decision": "false_call",
    "reviewer_role": "line_inspector",
    "t": "2024-09-17T02:43:51Z",
    "comment": "Fillet acceptable. Flux residue reflecting on pad."
  },
  "downstream_result": {
    "in_circuit_test": "pass",
    "functional_test": "pass",
    "field_return": null
  },
  "retention_class": "reject",
  "label_status": "reviewed_at_line"
}

Synthetic record for illustration. Field names, structure and format are agreed per order.

What AI teams use it for

Train defect classifiers on production images

Class codes and regions from the station that made the call give supervised labels on real parts under line optics.

Train anomaly detection on good parts

Good-part images from one station and recipe define normal appearance, with rejects from the same period held for testing.

Cut false calls

Rejects a reviewer overturned are hard negatives for a second-stage model that filters an inspection machine's flags.

Test transfer across stations and retooling

Holding out a station, a product or the period after a lighting change shows how much a model depends on one setup.

Score against human disposition and escapes

A test set labeled by reviewer verdict and downstream findings measures misses and false rejects separately.

Use-case guides: Robotics and embodied AI, Private evaluation sets, Enterprise and computer-use agents

What makes this data valuable

Both verdicts present

The machine's call and the reviewer's decision stored per image, not merged into one result column.

Good parts kept

Passed images from the same station, product and recipe revision as the rejects.

Original files

Full frames at the sensor's bit depth, without lossy compression or drawn-in result graphics.

Station sheet per station

Camera, lens, lighting, pixel scale and fixture recorded, with dated hardware changes.

Recipe revision on each call

The inspection program revision and threshold set that produced each machine label.

Serial-level traceability

Unit serials that join an image to later test results, rework and returns.

Document stack

Defect detection dataset

This page covers machine vision inspection images with defect labels.Illustrative

The machine call and the reviewer verdict are two labels

An inspection station is usually tuned to over-reject. A missed defect costs more than a second look, so marginal parts fail and a person decides. On an electronics line, a unit the AOI machine fails goes to a review station, where an operator marks each flag as a real defect or a false call, the trade's term for a reject that turns out to be acceptable. The machine's fail is therefore a request for review, not ground truth, and a dataset carrying only the vision system's output labels every overturned reject as a defect.

The reviewer's verdict is a second label with its own errors. It is one person's judgment, made in seconds, often from the image the machine saw and not from the part. When most flags are false calls, a reviewer can slide into passing them by habit. What counts as a defect also depends on the acceptance standard. In electronics that is a workmanship standard such as IPC-A-610, which defines three product classes with their own acceptance criteria, so ask which class each product was built to. Then come escapes, defects the machine passed or the reviewer dismissed, found later at in-circuit test, functional test or by the customer. An escape can be tied to its image only if the plant tracks units by serial number and kept the image of a part it passed.

So ask for both verdicts on every image, and for three sets: rejects the reviewer overturned, rejects the reviewer confirmed, and escapes with the image from the station that passed them. Ask where the review verdict lives, since it often stays on the review station or in the machine vendor's database and never reaches the MES. Ask for the recipe revision with each call. When an engineer loosens a threshold to cut false calls, the same image gets a different machine label the next day.

Capture conditions are part of the data

A vision station is built to make one family of defects visible on one part. Low-angle dark-field light makes a scratch glow on a dark surface, coaxial light suits flat reflective faces, and a backlight turns the part into a silhouette for gauging. The lens, the working distance and the sensor fix the scale in millimeters per pixel, and a fixture presents every part in the same pose. Images from one station are therefore nearly identical to each other and unlike images from the next. A model learns the station along with the defect, so station metadata must travel with every image.

Conditions change on known dates. Retooling for a new product, a camera or lens swap, a replaced light or a re-taught recipe each shifts the images, and between those events LEDs dim and dust settles on optics. Ask for the station's change log, which marks where a time-based split should fall. Check the files too. Stations commonly save JPEG to spare disk space, some keep only a crop around the flagged region, and some draw result graphics into the saved picture. AOI and X-ray machines often hold several lightings per part, height maps and higher bit depths in vendor formats that need exporting.

Retention is the hard limit. Image logging is a setting on the vision controller, and many plants set it to failed parts only, on a disk that overwrites its oldest files. Good-part images exist where a customer contract requires an image of every unit, where an engineer saved golden samples for recipe setup, or where a study kept everything. Anomaly detection trains on good parts, and false rejects cannot be measured without them. Specify good-part images per station and product from the same period and recipe revision as the rejects, and ask which of those sources they come from.

What to check before licensing

  • Ask what share of machine rejects a person reviewed, and whether each verdict was written to a database or exists only on the review station.
  • Ask how escapes are linked to images. A unit serial from a later test is usable. Lot-level traceability cannot say which image shows the failed part.
  • Establish what was retained: every image, rejects only or a sample of passes, and for how long.
  • Open sample files and confirm format, bit depth, full frame or crop, and whether result graphics are drawn into the pixels.
  • Request a sheet for each station with camera, lens, lighting and pixel scale, plus the dates of recipe and hardware changes.
  • Confirm the manufacturer may license images of parts it builds for customers. Manufacturing agreements commonly restrict this, so ask for the customer's clearance and have counsel review it.
  • Inspect frames for hands, faces, badges and reflections, and file names and metadata for operator IDs and customer part numbers.

Delivery No files move before a signed license. A listing or a request grants no files by itself.

How licensing works through SourceX

  1. 1

    Define

    Send the domain, modality, volume, format, timeline and permitted use you need.

  2. 2

    Source

    SourceX identifies businesses that hold matching data and are open to licensing it.

  3. 3

    Qualify

    Fit, rights and quality are checked, and you review samples before committing.

  4. 4

    License

    Scope, permitted use, exclusivity, price and obligations are agreed in writing.

  5. 5

    Deliver

    Approved data is prepared, de-identified where required and transferred securely.

Questions Acquisition Partners ask

How is this different from public defect image datasets?

Public sets are mostly photographed in a lab, with chosen defect types and one clean label per image. Production images come from a running line and carry the inspection system's call, the reviewer's verdict, the real ratio of good parts to defects and a station's drift over months. Models tuned on lab sets often lose accuracy there.

Can I get images of good parts as well as rejects?

Only where the plant kept them. Many stations save failed images alone, so passes exist when a customer contract required an image of every unit, when engineers saved reference samples or when a study kept everything for a period. State how many you need per station and product. If none were kept, the station's logging setting has to change and good-part images build up from that date, under the current recipe only.

What defect labels come with the images?

The inspection system's own class codes and flagged regions, plus the reviewer's verdict where a person re-judged the part. Class names are specific to the plant and the machine vendor, so ask for a table that maps them to one shared taxonomy. Regions are usually boxes or inspection windows. Pixel-accurate masks rarely exist in production systems and would be new annotation work.

Are X-ray and 3D inspection images included?

They can be, where the plant runs those stations. X-ray inspection shows hidden solder joints and voids, and solder paste and 3D AOI machines record height maps beside color images. These often sit in the machine vendor's own formats. Ask for export to open image formats at original bit depth, with height scale and pixel size stated.

Who can license images of a part made for someone else?

It depends on the manufacturing agreement. A contract manufacturer builds to its customers' designs, and an image of a board or a machined part can reveal that design. Rights review checks that the business owns or may share the records. Your counsel should still ask which products are the manufacturer's own and what clearance exists for the rest.

How should I split the data for training and evaluation?

Split by unit serial, lot and time, never by image. One unit yields several images under several lightings, a panel carries many copies of one component, and a reworked unit is imaged again, so a random split puts near-copies on both sides. Hold out a later period, a station or a recipe revision to measure transfer, and score against the reviewer's verdict, not the machine's call.

Evaluating this data for procurement?

Diligence packets are prepared per dataset. Rights, privacy processing and quality differ between datasets.

Request dataset diligence

Tell us what your models need

Send your spec — domain, volume, format, timeline and permitted use — and SourceX will match it against partner data and come back with what can be licensed.

Updated 25 November 2026.

See if your company qualifies