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.
At a glance
- 3tables
- 51,267rows
- 17columns
- Jan 2023 – Dec 2024date range
The 3 tables
preview and data dictionary per tableProducts products · table · 5,000 rows
Information about manufactured product units.
Preview
| product_idinteger | product_namestring | material_typestring | manufacturing_linestring |
|---|---|---|---|
| 801 | Liam Heavy Steel Beam | Steel | Line A |
| 802 | Olivia Structural Plate | Steel | Line A |
| 803 | Noah Steel Girder | Steel | Line A |
| 804 | Emma Steel Support | Steel | Line A |
| 805 | Oliver Steel Frame | Steel | Line A |
| 806 | Ava Steel Channel | Steel | Line A |
| 807 | Elijah Steel Bar | Steel | Line A |
| 808 | Sophia Steel Rod | Steel | Line A |
| 809 | James Steel Bracket | Steel | Line A |
| 810 | Isabella Steel Coil | Steel | Line A |
Data dictionary
| column | type | description | example | null % |
|---|---|---|---|---|
product_ | integer | Unique identifier for each manufactured product unit.unique | 801 | 0% |
product_ | string | Descriptive SKU or model name for the manufactured part. | Liam Heavy Steel Beam | 0% |
material_ | string | Primary base material composition used to manufacture the product. | Steel | 0% |
manufacturing_ | string | Designated factory line or workstation where unit was fabricated. | Line A | 0% |
Defects defects · fact table · 27,235 rows
Details of each recorded defect instance.
Preview
| defect_idinteger | defect_typestring | severitystring | detection_methodstring | timestampdatetime | product_idinteger |
|---|---|---|---|---|---|
| 1 | Scratch | Minor | Automated Scan | 2023-08-30 17:55:10 | 1553 |
| 2 | Other | Minor | Sensor Reading | 2024-06-12 17:11:34 | 1969 |
| 3 | Cosmetic Blemish | Minor | Automated Scan | 2023-07-06 08:49:45 | 1770 |
| 4 | Other | Minor | Automated Scan | 2024-06-28 09:48:13 | 2593 |
| 5 | Cosmetic Blemish | Minor | Visual Inspection | 2023-12-21 17:57:08 | 1469 |
| 6 | Other | Minor | Sensor Reading | 2023-03-21 14:49:11 | 2037 |
| 7 | Other | Minor | Automated Scan | 2024-08-16 08:55:12 | 871 |
| 8 | Other | Minor | Sensor Reading | 2023-05-11 20:00:36 | 1938 |
| 9 | Other | Minor | Sensor Reading | 2024-07-25 12:58:26 | 3279 |
| 10 | Cosmetic Blemish | Minor | Automated Scan | 2024-01-09 16:50:25 | 2070 |
Data dictionary
| column | type | description | example | null % |
|---|---|---|---|---|
defect_ | integer | Primary key identifier for each recorded defect instance. | 1 | 0% |
defect_ | string | Specific classification of the observed manufacturing defect. | Scratch | 0% |
severity | string | Severity assessment level indicating the impact on product usability and standards. | Minor | 0% |
detection_ | string | Quality assurance inspection method used to discover the defect. | Automated Scan | 0% |
timestamp | datetime | Timestamp indicating when the defect was identified during inspection. | 2023-08-30 17:55:10 | 0% |
product_ | integer | Foreign key to products.product_id. | 1553 | 0% |
Defect images defect_images · fact table · 19,032 rows
Metadata for images associated with defect instances.
Preview
| image_idinteger | image_urlstring | image_formatstring | resolution_mpdecimal | lighting_conditionstring | file_size_kbinteger | defect_idinteger |
|---|---|---|---|---|---|---|
| 175 | https://qc-storage.factory-mesh.internal/images/defect_3/175.png | PNG | 21.27 | Darkfield Ring | 4590 | 3 |
| 307 | https://qc-storage.factory-mesh.internal/images/defect_10/307.png | PNG | 13.03 | Darkfield Ring | 3692 | 10 |
Data dictionary
| column | type | description | example | null % |
|---|---|---|---|---|
image_ | integer | Unique identifier for each defect inspection image record. | 1 | 0% |
image_ | string | Hosted web storage URL locating the defect inspection image artifact. | https://qc-storage.factory-mesh.internal/images/defect_17191/1.png | 0% |
image_ | string | Image file container format. | PNG | 0% |
resolution_ | decimal | Resolution of the inspection camera sensor in megapixels. | 27.2 | 0% |
lighting_ | string | Optical lighting configuration used to highlight the defect during capture. | Darkfield Ring | 0% |
file_ | integer | Compressed size of the visual artifact in kilobytes. | 7811 | 0% |
defect_ | integer | Foreign key to defects.defect_id. | 17191 | 0% |
How the tables join
defects.product_id references products.product_idmany to one: each Defects row points to one Products rowdefect_images.defect_id references defects.defect_idmany to one: each Defect images row points to one Defects row
Questions to answer with it
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
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
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
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 publishingTable names match the SQLite file and the SQL script.
Top 5 Most Common Defect Types
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
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
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)
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
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
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
- Tables
- products, defects, defect_images
- Licence
- yours to use, including commercially
- API slug
- manufacturing-defect-dataset