MVTec AD
Industrial anomaly detection: 15 products, 73 defect kinds.
Dataset Card
MVTec AD
A public anomaly-detection dataset of 5,354 industrial images across 15 products: 4,096 defect-free and 1,258 defective, every defect outlined pixel for pixel.
Pictograph Research · CC-BY-NC-SA-4.0 · Public · Updated 2026-11-25
Overview
MVTec AD is the standard benchmark for unsupervised anomaly detection in industrial inspection: high-resolution photographs of 5 textures and 10 objects. Each product's training images are all defect-free, so a model learns only what normal looks like. Its test images add 73 kinds of real defect, from scratches and cracks to contamination and missing parts, each outlined at the pixel.
Here every outline is a defect polygon and every image carries tags for its state, its product and its defect kind. Each product is its own problem: learn from its normal training images, then score its test images by image (normal or anomalous) and by pixel (the defect polygons).
At a glance
| Metric | Value |
|---|---|
| Images | 5,354 |
| Normal (defect-free) | 4,096 |
| Anomalous (defective) | 1,258 |
| Defect polygons | 1,888 |
| Products | 15 (5 textures, 10 objects) |
| Defect kinds | 73 |
| Classes | 66 (65 tags, 1 polygon) |
| Splits | train 3,629, test 1,725 |
| Annotation types | polygon, tag |
| Visibility | Public |
Products
| Product | Type | Size (px) | Train normal | Test normal | Test anomalous | Defect polygons |
|---|---|---|---|---|---|---|
| bottle | object | 900 | 209 | 20 | 63 | 68 |
| cable | object | 1,024 | 224 | 58 | 92 | 151 |
| capsule | object | 1,000 | 219 | 23 | 109 | 114 |
| carpet | texture | 1,024 | 280 | 28 | 89 | 97 |
| grid | texture | 1,024 | 264 | 21 | 57 | 170 |
| hazelnut | object | 1,024 | 391 | 40 | 70 | 136 |
| leather | texture | 1,024 | 245 | 32 | 92 | 99 |
| metal_nut | object | 700 | 220 | 22 | 93 | 132 |
| pill | object | 800 | 267 | 26 | 141 | 245 |
| screw | object | 1,024 | 320 | 41 | 119 | 135 |
| tile | texture | 840 | 230 | 33 | 84 | 86 |
| toothbrush | object | 1,024 | 60 | 12 | 30 | 66 |
| transistor | object | 1,024 | 213 | 60 | 40 | 44 |
| wood | texture | 1,024 | 247 | 19 | 60 | 168 |
| zipper | object | 1,024 | 240 | 32 | 119 | 177 |
| Total | 3,629 | 467 | 1,258 | 1,888 |
Images are square and stored as MVTec published them, PNG byte for byte (an anomaly model reads every pixel, so nothing is re-encoded). Grid, screw and zipper are grayscale.
Defect kinds
| Product | Kinds |
|---|---|
| bottle | broken_large, broken_small, contamination |
| cable | bent_wire, cable_swap, combined, cut_inner_insulation, cut_outer_insulation, missing_cable, missing_wire, poke_insulation |
| capsule | crack, faulty_imprint, poke, scratch, squeeze |
| carpet | color, cut, hole, metal_contamination, thread |
| grid | bent, broken, glue, metal_contamination, thread |
| hazelnut | crack, cut, hole, print |
| leather | color, cut, fold, glue, poke |
| metal_nut | bent, color, flip, scratch |
| pill | color, combined, contamination, crack, faulty_imprint, pill_type, scratch |
| screw | manipulated_front, scratch_head, scratch_neck, thread_side, thread_top |
| tile | crack, glue_strip, gray_stroke, oil, rough |
| toothbrush | defective |
| transistor | bent_lead, cut_lead, damaged_case, misplaced |
| wood | color, combined, hole, liquid, scratch |
| zipper | broken_teeth, combined, fabric_border, fabric_interior, rough, split_teeth, squeezed_teeth |
combined holds several defects in one image.
Annotations
Image tags. Every image is tagged with:
normal(MVTec'sgood) oranomalous;- its product, e.g.
bottle, so a tag filter picks one product; - on an anomalous image, its defect kind: MVTec's folder name, e.g.
broken_large.
Defect polygons. MVTec ships a binary mask for each defective image and none for a defect-free one. Each connected region of a mask is one defect polygon: its outline first, then rings for its holes, filled by the even-odd rule. Vertices sit on pixel centres and nothing is simplified. Rasterized back by Pictograph's even-odd rasterizers, every one of the 1,258 masks is reproduced exactly (IoU 1.0, minimum and median): 1,888 regions, 156 holes.
Splits
MVTec's own: train holds defect-free images only; test holds defect-free and defective ones. There is no validation split. Folders mirror the source: /<product>/train/good, /<product>/test/good and /<product>/test/<defect kind>.
Use this dataset
from pictograph import Client, Dataset
client = Client() # reads PICTOGRAPH_API_KEY
dataset: Dataset = client.datasets.get("MVTec AD")
print(dataset.image_count, dataset.annotation_count)
- Import it into your own workspace with one click from its page.
- Pull it with the Pictograph SDK (shown above) or the CLI.
- Export to COCO, YOLO, Darwin V7, Pascal VOC, and more.
License
Released under CC-BY-NC-SA-4.0 (Creative Commons Attribution-NonCommercial-ShareAlike 4.0):
- Attribution: credit MVTec Software GmbH and cite the papers below.
- NonCommercial: no commercial use. For commercial use, contact MVTec.
- ShareAlike: share what you build on it, these polygons included, under the same license.
Source
The images and masks come from MVTec AD, created by MVTec Software GmbH (Bergmann et al., CVPR 2019) and released under CC-BY-NC-SA-4.0. Changed here: each mask became defect polygons and each image got tags; folders keep MVTec's names. Please credit the original authors when you use this data.
Citation
@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 = {2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
pages = {9584--9592},
year = {2019},
doi = {10.1109/CVPR.2019.00982}
}
@article{bergmann2021mvtec,
title = {The {MVTec} Anomaly Detection Dataset: A Comprehensive Real-World Dataset for Unsupervised Anomaly Detection},
author = {Bergmann, Paul and Batzner, Kilian and Fauser, Michael and Sattlegger, David and Steger, Carsten},
journal = {International Journal of Computer Vision},
volume = {129},
number = {4},
pages = {1038--1059},
year = {2021},
doi = {10.1007/s11263-020-01400-4}
}Allows use and adaptation with credit, but not for commercial purposes, and adaptations must be shared under the same license.
Source: MVTec AD, created by MVTec Software GmbH (Bergmann et al., CVPR 2019). Credit the original authors when you use this data.
Read the full Creative Commons Attribution-NonCommercial-ShareAlike 4.0 →More from Pictograph Research
Build your first vision tool
$25 of free compute to start. No card required.