Skip to content

Anomaly detection model that uses UNet trained on data generated by CutPaste

License

Notifications You must be signed in to change notification settings

tocom242242/CutPaste_UNet_AD

Repository files navigation

CutPaste+UNet for Anomaly Detection

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.

cutpaste_unet

How To Use

To use this repository:

  1. Clone this repository
  2. Install packages:
pip install -r requirements.txt
  1. 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.

Results (MVTec AD Bottle)

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

sample_result

Due to limited computing resources, we were not able to evaluate the model on all datasets in MVTec AD.

References

CutPaste

CutPaste source code (reference)

UNet implementation (reference)

About

Anomaly detection model that uses UNet trained on data generated by CutPaste

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages