dhkdnduq / PatchCore_anomaly_detection

Unofficial implementation of PatchCore anomaly detection
Apache License 2.0
24 stars 4 forks source link

Hello, I'm a beginner. Now I want to predict a picture. What should I do? #10

Open DeepSpace98 opened 2 years ago

DeepSpace98 commented 2 years ago

I want to use python to predict a picture,but I don't know how to start.Please help me ,thank you.

dhkdnduq commented 2 years ago

install python 3.6, torch==1.8.1, torchvision==0.9.1

pip install -r requirements.txt

python train.py --phase train or test --dataset_path .../mvtec_anomaly_detection --category carpet --project_root_path path/to/save/results --coreset_sampling_ratio 0.01 --n_neighbors 9'

for fast try just specify your dataset_path and run

python train.py --phase test --dataset_path .../mvtec_anomaly_detection --project_root_path ./

The following folder tree.

image