amazon-science / patchcore-inspection

Apache License 2.0
691 stars 142 forks source link

How to debug this code? #96

Open fengchuibeixiang opened 6 months ago

fengchuibeixiang commented 6 months ago

image I set default value to all click parameter, but it still gives error abrove. image image image

YXDZZU commented 4 months ago

I encountered the same problem as you, have you solved it?

fengchuibeixiang commented 3 months ago

I encountered the same problem as you, have you solved it?

图片 图片 把在命令行运行时的参数放在图示的形参处即可

zwl8979 commented 1 month ago

I encountered the same problem as you, have you solved it?

图片 图片 把在命令行运行时的参数放在图示的形参处即可

@fengchuibeixiang I tried putting in all the command line parameters in the quick guide, but I still can't jump to the breakpoints in each command. Is there something I didn't set up correctly? image

fengchuibeixiang commented 1 month ago

I encountered the same problem as you, have you solved it?

图片 图片 把在命令行运行时的参数放在图示的形参处即可

@fengchuibeixiang I tried putting in all the command line parameters in the quick guide, but I still can't jump to the breakpoints in each command. Is there something I didn't set up correctly? image

without "python bin/..." ,like this --gpu 0 --save_segmentation_images --log_group s-0.1_0.2_a-0.1_allclass --log_project MVTecAD_Results_sdas_patchcore_m2 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 mvtec mvtec

zwl8979 commented 1 month ago

I encountered the same problem as you, have you solved it?

图片 图片 把在命令行运行时的参数放在图示的形参处即可

@fengchuibeixiang I tried putting in all the command line parameters in the quick guide, but I still can't jump to the breakpoints in each command. Is there something I didn't set up correctly? image

without "python bin/..." ,like this --gpu 0 --save_segmentation_images --log_group s-0.1_0.2_a-0.1_allclass --log_project MVTecAD_Results_sdas_patchcore_m2 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 mvtec mvtec

This is the configuration parameter of "Parameters" in "Edit Configurations", but when debugging, the execution ends at main() and cannot jump to each command. I also added breakpoints in each command. --gpu 0 --seed 0 --save_patchcore_model IM224_WR50_L2-3_P01_D1024-1024_PS-3_AN-1_S0 --log_project MVTecAD_Results dataset ${dataset_flags[@]} mvtec $datapath --resize 256 --imagesize 224 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 image image

datapath= ./mvtec
datasets=('bottle'  'cable'  'capsule'  'carpet'  'grid'  'hazelnut' 'leather'  'metal_nut'  'pill' 'screew' 'tile' 'toothbrush' 'transistor' 'wood' 'zipper')
dataset_flags=($(for dataset in "${datasets[@]}"; do echo '-d '"${dataset}"; done))
fengchuibeixiang commented 1 month ago

I encountered the same problem as you, have you solved it?

图片 图片 把在命令行运行时的参数放在图示的形参处即可

@fengchuibeixiang I tried putting in all the command line parameters in the quick guide, but I still can't jump to the breakpoints in each command. Is there something I didn't set up correctly? image

without "python bin/..." ,like this --gpu 0 --save_segmentation_images --log_group s-0.1_0.2_a-0.1_allclass --log_project MVTecAD_Results_sdas_patchcore_m2 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 mvtec mvtec

This is the configuration parameter of "Parameters" in "Edit Configurations", but when debugging, the execution ends at main() and cannot jump to each command. I also added breakpoints in each command. --gpu 0 --seed 0 --save_patchcore_model IM224_WR50_L2-3_P01_D1024-1024_PS-3_AN-1_S0 --log_project MVTecAD_Results dataset ${dataset_flags[@]} mvtec $datapath --resize 256 --imagesize 224 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 image image

datapath= ./mvtec
datasets=('bottle'  'cable'  'capsule'  'carpet'  'grid'  'hazelnut' 'leather'  'metal_nut'  'pill' 'screew' 'tile' 'toothbrush' 'transistor' 'wood' 'zipper')
dataset_flags=($(for dataset in "${datasets[@]}"; do echo '-d '"${dataset}"; done))

if your code ends at main(), perhaps your parameter is not set up correctly. maybe it lose some parameter or have some wrong parameter 1.check your environment and datasets 2.try to run this code in terminal according to readme.md (or use the parameter I comment above) 3.if 2 is fine, try to put the parameter to "Parameters" in "Edit Configurations", then debug 4.if 2 is not fine, check and change your parameter

fengchuibeixiang commented 1 month ago

I encountered the same problem as you, have you solved it?

图片 图片 把在命令行运行时的参数放在图示的形参处即可

@fengchuibeixiang I tried putting in all the command line parameters in the quick guide, but I still can't jump to the breakpoints in each command. Is there something I didn't set up correctly? image

without "python bin/..." ,like this --gpu 0 --save_segmentation_images --log_group s-0.1_0.2_a-0.1_allclass --log_project MVTecAD_Results_sdas_patchcore_m2 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 mvtec mvtec

This is the configuration parameter of "Parameters" in "Edit Configurations", but when debugging, the execution ends at main() and cannot jump to each command. I also added breakpoints in each command. --gpu 0 --seed 0 --save_patchcore_model IM224_WR50_L2-3_P01_D1024-1024_PS-3_AN-1_S0 --log_project MVTecAD_Results dataset ${dataset_flags[@]} mvtec $datapath --resize 256 --imagesize 224 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 image image

datapath= ./mvtec
datasets=('bottle'  'cable'  'capsule'  'carpet'  'grid'  'hazelnut' 'leather'  'metal_nut'  'pill' 'screew' 'tile' 'toothbrush' 'transistor' 'wood' 'zipper')
dataset_flags=($(for dataset in "${datasets[@]}"; do echo '-d '"${dataset}"; done))

if your code ends at main(), perhaps your parameter is not set up correctly. maybe it lose some parameter or have some wrong parameter 1.check your environment and datasets 2.try to run this code in terminal according to readme.md (or use the parameter I comment above) 3.if 2 is fine, try to put the parameter to "Parameters" in "Edit Configurations", then debug 4.if 2 is not fine, check and change your parameter

fengchuibeixiang commented 1 month ago

I encountered the same problem as you, have you solved it?

图片 图片 把在命令行运行时的参数放在图示的形参处即可

@fengchuibeixiang I tried putting in all the command line parameters in the quick guide, but I still can't jump to the breakpoints in each command. Is there something I didn't set up correctly? image

without "python bin/..." ,like this --gpu 0 --save_segmentation_images --log_group s-0.1_0.2_a-0.1_allclass --log_project MVTecAD_Results_sdas_patchcore_m2 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 mvtec mvtec

This is the configuration parameter of "Parameters" in "Edit Configurations", but when debugging, the execution ends at main() and cannot jump to each command. I also added breakpoints in each command. --gpu 0 --seed 0 --save_patchcore_model IM224_WR50_L2-3_P01_D1024-1024_PS-3_AN-1_S0 --log_project MVTecAD_Results dataset ${dataset_flags[@]} mvtec $datapath --resize 256 --imagesize 224 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 image image

datapath= ./mvtec
datasets=('bottle'  'cable'  'capsule'  'carpet'  'grid'  'hazelnut' 'leather'  'metal_nut'  'pill' 'screew' 'tile' 'toothbrush' 'transistor' 'wood' 'zipper')
dataset_flags=($(for dataset in "${datasets[@]}"; do echo '-d '"${dataset}"; done))

if your code ends at main(), perhaps your parameter is not set up correctly. maybe it lose some parameter or have some wrong parameter 1.check your environment and datasets 2.try to run this code in terminal according to readme.md (or use the parameter I comment above) 3.if 2 is fine, try to put the parameter to "Parameters" in "Edit Configurations", then debug 4.if 2 is not fine, check and change your parameter