
The MVTec anomaly detection dataset 2
MVTec AD 2 is a dataset for benchmarking unsupervised anomaly detection methods on challenging use-cases from industrial inspection tasks. It expands existing benchmarks by eight new anomaly detection scenarios with more than 8,000 high-resolution images in total.
We provide a training and validation set of defect-free images for each scenario. The test data is split into two parts, both containing normal and anomalous images captured under various lighting conditions, which are not necessarily contained in the training data. For the first part pixel-precise annotations of all anomalies are available, whereas for the second part ground truth information is non-public. Here, performance evaluation is only possible through the public evaluation server.
More information can be found in our corresponding paper titled “The MVTec AD 2 Dataset: Advanced Scenarios for Unsupervised Anomaly Detection”.
Dataset download:
Code for Development and Evaluation
Evaluation
Official evaluation of the private part of the test data is only possible via our public evaluation server. For local testing or initial performance estimation, you can use the public part of the test data.
Code Utils for Development
A PyTorch dataset class for MVTec AD 2 is available for download, which can be easily integrated into a PyTorch dataloader and be used to store anomaly images in the correct structure for evaluation. Official evaluation is possible via our public evaluation server. Here, we provide a script that checks a submission for correctness and compresses it for you. The code utils further also include snippets to measure runtime and memory footprint of a method. For details on how to use the scripts, please take a look at the included readme file.
Please note: license terms & attribution
The data is released under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (CC BY-NC-SA 4.0).
In particular, it is not allowed to use the dataset for commercial purposes. If you are unsure whether your application violates the non-commercial use clause of the license, please contact us.
If you have any questions or comments about the dataset, feel free to contact us via email.
If you use this dataset in scientific work, please cite our paper:
Lars Heckler-Kram, Jan-Hendrik Neudeck, Ulla Scheler, Rebecca König, Carsten Steger: The MVTec AD 2 Dataset: Advanced Scenarios for Unsupervised Anomaly Detection; arXiv preprint arXiv:2503.21622, 2025.