amazon-science / patchcore-inspection

Apache License 2.0
691 stars 142 forks source link

ModuleNotFoundError: No module named 'patchcore' #86

Open leibaoer opened 9 months ago

leibaoer commented 9 months ago

I encountered this error when running the. sh file 10

AnakinChou commented 9 months ago

you need to install patchcore first. try pip install -e .

ghost commented 9 months ago

I encountered this error when running the. sh file 10

i had the same error you can try this ,copy the run_patchcore.py in **/src/patchcore.py ,and then use the cmd which readme suggests: python run_patchcore.py --gpu 1 --seed 0 --save_patchcore_model --log_group IM224_WR50_L2-3_P01_D1024-1024_PS-3_AN-1_S0 --log_project MVTecAD_Results results patch_core -b wideresnet50 -le layer2 -le layer3 --faiss_on_gpu --pretrain_embed_dimension 1024 --target_embed_dimension 1024 --anomaly_scorer_num_nn 1 --patchsize 3 sampler -p 0.1 approx_greedy_coreset dataset --resize 256 --imagesize 224 -d tielian mvtec G:\zr\MVTec and may some args you shoule change,it can work.

IAzukiI commented 4 months ago

try $env:PYTHONPATH="src";

calabashbro commented 1 month ago

try add : import sys sys.path.append('/path to src/src/')