MVTec AD Industrial Defect Detection
Anomaly detection and localization in industrial images (Bergmann et al., CVPR 2019). Detect defects across 15 object and texture categories including metal nuts, transistors, and leather.
About this dataset
Anomaly detection asks a model to flag images that deviate from a set of known-good examples, and to localize where the deviation is. The MVTec Anomaly Detection (MVTec AD) dataset was introduced by Paul Bergmann, Michael Fauser, David Sattlegger, and Carsten Steger at CVPR 2019 to give unsupervised anomaly detection a realistic industrial benchmark, since earlier datasets were small and did not reflect factory inspection conditions.
The images show manufactured objects and material textures photographed under controlled lighting. Training images are all defect-free, and the test images add real manufacturing defects such as scratches, dents, contaminations, and structural changes. Each defect in the test set comes with a pixel-precise ground-truth region marking exactly where the anomaly is.
The dataset contains 5,354 high-resolution color images spread across 15 categories, split into 10 object categories and 5 texture categories. The test images cover over 70 different types of defects, and every anomaly is labeled with a pixel-precise ground-truth mask. Because the training split holds only normal samples, the benchmark is aimed at methods that learn what 'good' looks like without seeing defects during training.
The Potato config below reproduces this task with a radio question for the product category (the 15 MVTec classes), a radio question for normal versus defective, a multiselect for the defect types present, and a free-text field for describing where the defect sits. This turns MVTec AD into an image-level triage and defect-tagging pass that a human can run over inspection photos.
- Total images
- 5,354
- Categories
- 15 (10 objects, 5 textures)
- Defect types
- Over 70
- Ground truth
- Pixel-precise anomaly regions
- Training data
- Defect-free images only
- Venue
- CVPR 2019
Configuration Fileconfig.yaml
This Potato config reproduces the annotation task. Save it as config.yaml and run potato start config.yaml to try it.
# MVTec AD Industrial Defect Detection Configuration
# Based on Bergmann et al., CVPR 2019
annotation_task_name: "MVTec AD Defect Detection"
task_dir: "."
data_files:
- "sample-data.json"
item_properties:
id_key: "id"
text_key: "image_url"
context_key: "product_type"
user_config:
allow_all_users: true
annotation_schemes:
- annotation_type: "radio"
name: "product_category"
description: "Select the product category"
labels:
- name: "bottle"
tooltip: "Glass or plastic bottles"
- name: "cable"
tooltip: "Electrical cables"
- name: "capsule"
tooltip: "Capsules, pills"
- name: "carpet"
tooltip: "Carpet texture"
- name: "grid"
tooltip: "Grid patterns"
- name: "hazelnut"
tooltip: "Hazelnuts"
- name: "leather"
tooltip: "Leather texture"
- name: "metal_nut"
tooltip: "Metal nuts"
- name: "pill"
tooltip: "Pills"
- name: "screw"
tooltip: "Screws"
- name: "tile"
tooltip: "Tiles"
- name: "toothbrush"
tooltip: "Toothbrushes"
- name: "transistor"
tooltip: "Transistors"
- name: "wood"
tooltip: "Wood texture"
- name: "zipper"
tooltip: "Zippers"
- annotation_type: "radio"
name: "anomaly_status"
description: "Is this image normal or defective?"
labels:
- name: "good"
tooltip: "No defects, normal sample"
- name: "defective"
tooltip: "Contains defects or anomalies"
- annotation_type: "multiselect"
name: "defect_types"
description: "Select defect types (if defective)"
labels:
- name: "scratch"
tooltip: "Surface scratches"
- name: "dent"
tooltip: "Dents or deformations"
- name: "hole"
tooltip: "Holes or punctures"
- name: "crack"
tooltip: "Cracks or fractures"
- name: "contamination"
tooltip: "Contamination or stains"
- name: "color_defect"
tooltip: "Color abnormalities"
- name: "missing_part"
tooltip: "Missing components"
- name: "misalignment"
tooltip: "Misaligned parts"
- annotation_type: "text"
name: "defect_location"
description: "Describe the location of defects (e.g., 'top-left corner')"
interface_config:
item_display_format: "<img src='{{text}}' style='max-width:100%; max-height:500px;'/><br/><small>Product type: {{context}}</small>"
output_annotation_format: "json"
output_annotation_dir: "annotations"
Sample Datasample-data.json
[
{
"id": "mvtec_001",
"image_url": "https://upload.wikimedia.org/wikipedia/commons/thumb/8/8a/Banana-Single.jpg/1200px-Banana-Single.jpg",
"product_type": "Example industrial product. Inspect for defects such as scratches, dents, holes, or contamination."
},
{
"id": "mvtec_002",
"image_url": "https://upload.wikimedia.org/wikipedia/commons/thumb/b/b1/VW_Lupo.jpg/1200px-VW_Lupo.jpg",
"product_type": "Industrial component. Mark whether this is a normal (good) sample or contains defects."
}
]
// ... and 1 more itemsGet This Design
Clone or download from the repository
Quick start:
git clone https://github.com/davidjurgens/potato-showcase.git cd potato-showcase/image/specialized/mvtec-ad potato start config.yaml
Dataset & paper
Bergmann, Fauser, Sattlegger & Steger, CVPR 2019
Citation (BibTeX)
@inproceedings{bergmann2019mvtec,
title = {{MVTec AD} -- A Comprehensive Real-World Dataset for Unsupervised Anomaly Detection},
author = {Bergmann, Paul and Fauser, Michael and Sattlegger, David and Steger, Carsten},
booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
pages = {9592--9600},
year = {2019}
}Details
Annotation Types
Domain
Use Cases
Tags
Found an issue or want to improve this design?
Open an IssueRelated Designs
CUB-200-2011: Fine-Grained Bird Species Dataset
CUB-200-2011 is a fine-grained bird image dataset of 11,788 photos across 200 species, each labeled with parts, attributes, and a bounding box (Wah et al., 2011). This Potato config reproduces the labeling task.
FLAIR: French Land Cover from Aerospace Imagery
Land use and land cover classification from high-resolution aerial imagery. Annotators classify the primary land use category of aerial image patches and identify any secondary land uses present. Based on the FLAIR dataset from the French National Institute of Geographic and Forest Information (IGN).
iWildCam Wildlife Detection & Classification
Camera trap image classification for wildlife monitoring (Beery et al., CVPR 2019). Classify wildlife species from camera trap images across diverse ecosystems worldwide.