Manufacturing Defect Dataset

This is a ready-made synthetic dataset for machine learning and quality control analysis. It contains 51,267 rows across 3 tables, detailing product information, defect occurrences, and associated image metadata. Preview rows are available for free.

  • last updated 28 Sept 2026
  • by GoMask
  • Dataset includes 5000 product units and 27,235 defect instances.
  • Defect data spans from 2023-01-01 to 2024-12-31.
  • Features include product material, manufacturing line, defect type, severity, and detection method.
  • Image data includes URL, format, resolution, lighting condition, and file size.
  • Data is synthetic, generated by GoMask DataFactory.

At a glance

  • 3tables
  • 51,267rows
  • 17columns
  • Jan 2023 – Dec 2024date range

The 3 tables

preview and data dictionary per table

Products products · table · 5,000 rows

Information about manufactured product units.

Preview

First 10 of 5,000 rows of the Products table
product_idintegerproduct_namestringmaterial_typestringmanufacturing_linestring
801Liam Heavy Steel BeamSteelLine A
802Olivia Structural PlateSteelLine A
803Noah Steel GirderSteelLine A
804Emma Steel SupportSteelLine A
805Oliver Steel FrameSteelLine A
806Ava Steel ChannelSteelLine A
807Elijah Steel BarSteelLine A
808Sophia Steel RodSteelLine A
809James Steel BracketSteelLine A
810Isabella Steel CoilSteelLine A
10 of 5,000 rows · 4 columns

Data dictionary

Data dictionary for the Products table
columntypedescriptionexamplenull %
product_idintegerUnique identifier for each manufactured product unit.unique8010%
product_namestringDescriptive SKU or model name for the manufactured part.Liam Heavy Steel Beam0%
material_typestringPrimary base material composition used to manufacture the product.Steel0%
manufacturing_linestringDesignated factory line or workstation where unit was fabricated.Line A0%

Defects defects · fact table · 27,235 rows

Details of each recorded defect instance.

Preview

First 10 of 27,235 rows of the Defects table
defect_idintegerdefect_typestringseveritystringdetection_methodstringtimestampdatetimeproduct_idinteger
1ScratchMinorAutomated Scan2023-08-30 17:55:101553
2OtherMinorSensor Reading2024-06-12 17:11:341969
3Cosmetic BlemishMinorAutomated Scan2023-07-06 08:49:451770
4OtherMinorAutomated Scan2024-06-28 09:48:132593
5Cosmetic BlemishMinorVisual Inspection2023-12-21 17:57:081469
6OtherMinorSensor Reading2023-03-21 14:49:112037
7OtherMinorAutomated Scan2024-08-16 08:55:12871
8OtherMinorSensor Reading2023-05-11 20:00:361938
9OtherMinorSensor Reading2024-07-25 12:58:263279
10Cosmetic BlemishMinorAutomated Scan2024-01-09 16:50:252070
10 of 27,235 rows · 6 columns

Data dictionary

Data dictionary for the Defects table
columntypedescriptionexamplenull %
defect_idintegerPrimary key identifier for each recorded defect instance.10%
defect_typestringSpecific classification of the observed manufacturing defect.Scratch0%
severitystringSeverity assessment level indicating the impact on product usability and standards.Minor0%
detection_methodstringQuality assurance inspection method used to discover the defect.Automated Scan0%
timestampdatetimeTimestamp indicating when the defect was identified during inspection.2023-08-30 17:55:100%
product_idintegerForeign key to products.product_id.15530%

Defect images defect_images · fact table · 19,032 rows

Metadata for images associated with defect instances.

Preview

First 2 of 19,032 rows of the Defect images table
image_idintegerimage_urlstringimage_formatstringresolution_mpdecimallighting_conditionstringfile_size_kbintegerdefect_idinteger
175https://qc-storage.factory-mesh.internal/images/defect_3/175.pngPNG21.27Darkfield Ring45903
307https://qc-storage.factory-mesh.internal/images/defect_10/307.pngPNG13.03Darkfield Ring369210
2 of 19,032 rows · 7 columns

Data dictionary

Data dictionary for the Defect images table
columntypedescriptionexamplenull %
image_idintegerUnique identifier for each defect inspection image record.10%
image_urlstringHosted web storage URL locating the defect inspection image artifact.https://qc-storage.factory-mesh.internal/images/defect_17191/1.png0%
image_formatstringImage file container format.PNG0%
resolution_mpdecimalResolution of the inspection camera sensor in megapixels.27.20%
lighting_conditionstringOptical lighting configuration used to highlight the defect during capture.Darkfield Ring0%
file_size_kbintegerCompressed size of the visual artifact in kilobytes.78110%
defect_idintegerForeign key to defects.defect_id.171910%

How the tables join

  • defects.product_id references products.product_idmany to one: each Defects row points to one Products row
  • defect_images.defect_id references defects.defect_idmany to one: each Defect images row points to one Defects row

Questions to answer with it

  1. Can a machine learning model predict defect severity based on product features?

    Consider joining products and defects tables and analyzing the relationship between material_type, manufacturing_line and severity.

    tables: products, defects

  2. What is the distribution of defect types across different manufacturing lines?

    Join products and defects, then group by manufacturing_line and defect_type to count occurrences.

    tables: products, defects

  3. How does the frequency of defects change over time for specific product batches?

    Join products and defects, filter by a specific product_id or product_name, and group by date (extracted from timestamp) to count defects.

    tables: products, defects

  4. Identify the top 3 most common defect types and their average severity.

    Group defects by defect_type, count occurrences, and analyze the distribution of severity for each type.

    tables: defects

Starter SQL

run against this data before publishing

Table names match the SQLite file and the SQL script.

Top 5 Most Common Defect Types

sql
SELECT defect_type, COUNT(*) as defect_count FROM defects GROUP BY defect_type ORDER BY defect_count DESC LIMIT 5;

Defects by Manufacturing Line and Severity

sql
SELECT p.manufacturing_line, d.severity, COUNT(d.defect_id) as defect_count FROM defects d JOIN products p ON d.product_id = p.product_id GROUP BY p.manufacturing_line, d.severity ORDER BY p.manufacturing_line, defect_count DESC LIMIT 20;

Average Image Resolution per Defect Type

sql
SELECT d.defect_type, AVG(di.resolution_mp) as avg_resolution FROM defects d JOIN defect_images di ON d.defect_id = di.defect_id GROUP BY d.defect_type ORDER BY avg_resolution DESC LIMIT 20;

Defect Count Over Time (Monthly)

sql
SELECT STRFTIME('%Y-%m', timestamp) as month, COUNT(defect_id) as defect_count FROM defects GROUP BY month ORDER BY month LIMIT 20;

Defects with Critical Severity and their Product Material

sql
SELECT p.material_type, d.defect_type, d.severity FROM defects d JOIN products p ON d.product_id = p.product_id WHERE d.severity = 'Critical' LIMIT 20;

Load it with pandas

python
import pandas as pd

# Unzip the CSV download first: one file per table
products = pd.read_csv("products.csv")
defects = pd.read_csv("defects.csv")
defect_images = pd.read_csv("defect_images.csv")

# Join defects to products
df = defects.merge(products, left_on="product_id", right_on="product_id", how="left", suffixes=("", "_products"))
print(df.groupby("material_type").size().sort_values(ascending=False))

Using it in your tool

Excel
Load each table into a separate Excel sheet. Use Power Query to join 'defects' and 'products' tables on product_id. Create a PivotTable from the joined data to analyze defect counts by manufacturing line and material type.
Power BI
Load all tables. Create relationships: defects.product_id to products.product_id, and defect_images.defect_id to defects.defect_id. Create measures for Total Defects (COUNT(defects[defect_id])) and Average Severity Score (e.g., mapping Minor=1, Moderate=2, Critical=3).
SQL
Load the SQLite or SQL dump into your preferred SQL environment. The primary join paths are defects.product_id -> products.product_id and defect_images.defect_id -> defects.defect_id. Use foreign keys to link related data.
Python
Use pandas to load CSV or SQLite data. Join tables using pd.merge(). Analyze defect distributions using value_counts() and group by operations. For ML, use libraries like scikit-learn to build predictive models.

Formats available

  • CSV (zip)One CSV file per table, zipped
  • Excel workbookOne worksheet per table
  • SQLite databaseA ready-to-query database file with every table
  • Parquet (zip)One Parquet file per table, zipped
  • SQL scriptCREATE TABLE with primary and foreign keys, then INSERTs
  • CSVA single CSV file
  • JSONA single JSON file

How this data was generated

Synthetic data. Every row was generated: no real people, customers or companies are in this dataset.

Synthetic data generated by GoMask DataFactory from a relational blueprint: keys, links and rules are enforced in code, text columns are filled by a language model. No real people, companies or transactions.

  • The dataset was generated using GoMask DataFactory.
  • Synthetic data allows for controlled generation of defect types and severities.
  • Relationships between product attributes and defect characteristics are simulated.
  • Checked by an automated quality gate: unique keys, no orphan foreign keys, required columns filled, declared rules and date ranges (realism score 100).

Limitations

  • The data is synthetic and may not perfectly represent all real-world defect complexities.
  • Image data is represented by URLs and metadata, not the actual image files.
  • The dataset does not include information on corrective actions taken for defects.
  • Distributions and correlations are modelled, not measured from real records.

blueprint · manufacturing-defect-dataset

Scale this dataset

Same tables. As many rows as you need.

Open the blueprint behind these 3 tables in Data Factory: keep the relationships, change a column, and generate it at the size you need.

  • 200,000 rows
  • 1,000,000 rows
Scale this dataset in Data Factory
Tables
products, defects, defect_images
Licence
yours to use, including commercially
API slug
manufacturing-defect-dataset

What should your data show?

Preview 20 rows free
No signup. No card.