This is an anomaly detection model that uses UNet trained on data generated by CutPaste.
In contrast to the previous approach that used a classification model, this method employs a segmentation model. Specifically, the UNet model is trained on the segmented abnormal images created by CutPaste.
To use this repository:
- Clone this repository
- Install packages:
pip install -r requirements.txt
- Train the model and evaluate it:
python main.py --dataset_dir <path/to/dataset_dir> --result_dir <path/to/result_dir> --nb_epochs <epoch>
Note that the dataset should have the same structure as the MVTec dataset.
We evaluated the model on the Bottle dataset from MVTec AD. We trained the model for 200 epochs, and obtained the following results:
- Image-level AUC: 0.99
- Pixel-level AUC: 0.83
Due to limited computing resources, we were not able to evaluate the model on all datasets in MVTec AD.