MultiADS: Defect-aware Supervision for Multi-type Anomaly Detection and Segmentation in Zero-Shot Learning
This software is a research prototype, solely developed for and published as part of the publication MultiADS: Defect-aware Supervision for Multi-type Anomaly Detection and Segmentation in Zero-Shot Learning which has been accepted by ICCV 2025.
We present MultiADS, the first framework that goes beyond binary “good/bad” inspection to detect, localize, and label multiple defect types simultaneously. Here, we propose the first benchmark for the new task multi-type anomaly segmentation. Meanwhile, MultiADS also achieves state-of-the-art zero- and few-shot performance across six industrial datasets.
- Clone this repo
git clone https://github.com/boschresearch/MultiADS.git cd MultiADS - Create & activate a conda environment
conda env create -f environment.yml conda activate MultiADS
Please download the datasets of MVTec-AD, VisA, MPDD, MAD, and Real-IAD into the data/ folder. Organize them as follows:
data
├── mvtec
│ └── meta.json
├── visa
│ ├── meta.json
│ └── meta_wo_md.json
├── mpdd
│ └── meta.json
├── MAD_Real
│ └── meta.json
├── MAD_Sim
│ └── meta.json
└── real_iad
└── meta.jsonTo download our extend visa dataset with segmentation mask for each individual defects. Please visit VisA_Extended. Note that in the other datasets, each image contains only one type of defect types.
python train.py \
--dataset mvtec \
--train_data_path ./data/mvtec \
--save_path ./exps/mvtec_default/ - dataset: dataset to use options = {mvtec, visa, mpdd, real_iad}
- train_data_path: where your training images reside
- save_path directory to write checkpoints & logs
python test.py \
--dataset visa \
--data_path ./data/visa \
--save_path ./results/visa/zero_shot/ \
--checkpoint_path ./exps/mvtec/epoch_1.pth python test.py \
--dataset visa \
--data_path ./data/visa \
--save_path ./results/visa/few_shot/ \
--checkpoint_path ./exps/mvtec/epoch_1.pth \
--k_shot 4 - dataset: dataset to evaluate on
- data_path: path to your VisA test images
- save_path: where to write K-shot results
- checkpoint_path: which trained weights to load
- k_shot: few-shot number
python test_da.py \
--dataset visa \
--data_path ./data/visa \
--save_path ./results/visa/domain_adption/ \
--checkpoint_path ./exps/mvtec_default/epoch_1.pth python test_multi_defect.py
--dataset visa \
--data_path ./data/visa \
--save_path ./results/mvtec_visa_multi_seg/zero_shot/ \
--checkpoint_path ./exps/mvtec/epoch_1.pth \@InProceedings{Sadikaj_2025_ICCV,
author = {Sadikaj, Ylli and Zhou, Hongkuan and Halilaj, Lavdim and Schmid, Stefan and Staab, Steffen and Plant, Claudia},
title = {MultiADS: Defect-aware Supervision for Multi-type Anomaly Detection and Segmentation in Zero-Shot Learning},
booktitle = {Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV)},
month = {October},
year = {2025},
pages = {22978-22988}
}