Closed DeepSpace98 closed 2 years ago
Single image from MVTec dataset or your custom data?
I want to use the train.py 's model to predict my custom data,but I don't know how to code the predict.py
So, you need to change the dataset in train_dataloader in train.py from MVTec to CutPaste_Dataet from dataset.py . After you can train your model on custom dataset. Finally, you can check the "mvtec_anomaly_detection" method in anomaly_detection.py to see how the anomaly scores are determined for MVTec test set and wite similar code for testing single image. It's a little bit overhead as the codebase is mainly for MVtec dataset and doesn't support custom dataset or single image testing for now.
Single image from MVTec dataset or your custom data?