Visual Defect Detection

Inspects products on the production line to detect scratches, cracks and defects.

Experimental research applicationDocumentation needs completingLevel: Intermediate AI in Industry & Robotics Quality & Inspection

Added: — Last updated:

Documentation needs completing: the content of this page is an initial editorial record whose scientific review is not yet complete; the linked papers are real records matched to OpenAlex, but they do not necessarily prove that the application is commercially deployed.

Overview

Vision models detect defects either by supervised classification when defective examples are available, or by anomaly detection trained on good products only, and locate the defect with a heat map.

The real-world problem

Human visual inspection is tiring and inconsistent and cannot keep up with production speed.

Advantages

  • Inspection of 100% of products
  • Consistent decisions

Limitations

  • New defects not seen before
  • Sensitivity to lighting changes

Ethical and technical challenges

  • Impact of automation on jobs
  • Documenting rejection decisions

How it works

Photograph the product under fixed lighting, extract features with a pre-trained network, then compare them with a feature bank of good products or segment the defect.

Types of data used

  • High-resolution product images
  • Few defective samples

Implementation requirements

Industrial cameras, controlled lighting and an edge computer.

AI techniques

Models

Models are separated into: «actually used» (with documented evidence), «research prototype» (with published evidence), and «proposed» (suited to the task, without claiming it is used in a deployed system).

ModelNature of useArchitectureEvidence
PatchCoreProposed / suited to the taskA model that suits this task and is used in the literature for it, suggested here without claiming it is used in a deployed product.Memory bank of pretrained CNN patch features—
Residual Network (ResNet) in the Model AtlasProposed / suited to the taskA model that suits this task and is used in the literature for it, suggested here without claiming it is used in a deployed product.Residual convolutional network—
U-Net in the Model AtlasProposed / suited to the taskA model that suits this task and is used in the literature for it, suggested here without claiming it is used in a deployed product.Encoder–decoder fully convolutional network—
YOLOv8 (Ultralytics)Proposed / suited to the taskA model that suits this task and is used in the literature for it, suggested here without claiming it is used in a deployed product.One-stage CNN detector—

Algorithms

  • Transfer Learning / Fine-tuning — Reusing a pre-trained model and fine-tuning it on a new task with less data.
  • k-Nearest Neighbors — Classifying a sample by the classes of its k nearest samples in feature space.
  • Data Augmentation — Generating extra training examples with transformations such as cropping, rotation and noise to reduce overfitting.

Frameworks and tools

  • PyTorch — An open-source deep learning framework with dynamic computation and broad GPU support.
  • OpenCV — An open-source library for image and video processing and computer vision.
  • ONNX Runtime — An engine for running ONNX models on servers and edge devices.

Datasets

DatasetSizeLicenceDocumentationSource
MVTec AD In the Dataset ExplorerCreative Commons Attribution-NonCommercial-ShareAlike 4.0Documentation needs completingSource
VisA (Visual Anomaly) In the Dataset Explorer1.8 GBCreative Commons Attribution-NonCommercial-ShareAlike 4.0Documentation needs completingSource
Kolektor Surface-Defect Dataset (KolektorSDD) In the Dataset ExplorerCreative Commons Attribution-NonCommercial-ShareAlike 4.0Documentation needs completingSource
MPDD (Metal Parts Defect Detection) In the Dataset ExplorerCreative Commons Attribution-NonCommercial-ShareAlike 4.0Documentation needs completingSource
BTAD (BeanTech Anomaly Detection) In the Dataset ExplorerCreative Commons Attribution-NonCommercial-ShareAlike 4.0Documentation needs completingSource
Real-IAD In the Dataset ExplorerCreative Commons Attribution-NonCommercial-ShareAlike 4.0Documentation needs completingSource

Real-world examples

There are currently no documented real-world examples of this application in the encyclopedia. Recorded application type: «Experimental research application».

Research papers

Research and project ideas

Recorded research gap

Industrial defect detection with few samples in changing environments

The following ideas are suggestions derived from the application's record, not completed projects; review recent literature before adopting them.

Graduation project (bachelor's)

Graduation project: a prototype system for Visual Defect Detection

A suggested project idea derived from the application's record in the encyclopedia, not a completed project. Inspects products on the production line to detect scratches, cracks and defects.

Objectives: Build a prototype that addresses the problem: Human visual inspection is tiring and inconsistent and cannot keep up with production speed. Evaluate it with suitable metrics and compare it with a simple baseline.

Methodology: Photograph the product under fixed lighting, extract features with a pre-trained network, then compare them with a feature bank of good products or segment the defect.

Suggested models: PatchCore, Residual Network (ResNet), U-Net — Suggested data: MVTec AD, VisA (Visual Anomaly), Kolektor Surface-Defect Dataset (KolektorSDD)

Master's

Industrial defect detection with few samples in changing environments

A suggested research topic derived from the gap recorded for this application in the encyclopedia; it needs a review of recent literature before it is adopted.

Objectives: Addressing the recorded limitations: New defects not seen before; Sensitivity to lighting changes

Methodology: Review the related literature recorded, then design reproducible experiments on the available datasets, with a strict data split to avoid leakage and reporting of confidence intervals.

Suggested models: PatchCore, Residual Network (ResNet), U-Net — Suggested data: MVTec AD, VisA (Visual Anomaly), Kolektor Surface-Defect Dataset (KolektorSDD)

References

  1. Zhuo Li, Yuhao Yan, Xiangheng Wang et al. (2025). A survey of deep learning for industrial visual anomaly detection. Artificial Intelligence Review. doi:10.1007/s10462-025-11287-7
  2. Karsten Roth, Latha Pemula, Joaquin Zepeda et al. (2021). Towards Total Recall in Industrial Anomaly Detection. . doi:10.48550/arxiv.2106.08265
  3. Kaiming He, Xiangyu Zhang, Shaoqing Ren, Jian Sun (2016). Deep residual learning for image recognition. CVPR 2016, 770–778. doi:10.1109/cvpr.2016.90
  4. Olaf Ronneberger, Philipp Fischer, Thomas Brox (2015). U-Net: Convolutional networks for biomedical image segmentation. MICCAI 2015, LNCS 9351, 234–241. doi:10.1007/978-3-319-24574-4_28
  5. BTAD (BeanTech Anomaly Detection) — University of Udine [Dataset source, accessed: 2026-11-15] Link
  6. Kolektor Surface-Defect Dataset (KolektorSDD) — ViCoS Lab [Dataset source, accessed: 2026-11-15] Link
  7. MPDD (Metal Parts Defect Detection) — Brno University of Technology [Dataset source, accessed: 2026-11-15] Link
  8. MVTec AD — MVTec [Dataset source, accessed: 2026-11-15] Link
  9. Real-IAD — Hugging Face [Dataset source, accessed: 2026-11-15] Link
  10. VisA (Visual Anomaly) — GitHub [Dataset source, accessed: 2026-11-15] Link
  11. YOLOv8 (Ultralytics) — Ultralytics [Official model page, accessed: 2026-11-15] Link
  12. ONNX Runtime [Tool documentation, accessed: 2026-11-15] Link
  13. OpenCV [Tool documentation, accessed: 2026-11-15] Link
  14. PyTorch [Tool documentation, accessed: 2026-11-15] Link