amazon-science / patchcore-inspection

Apache License 2.0
733 stars 149 forks source link

Necessary to indicate the right heat map in the good data #91

Open dhkdnduq opened 9 months ago

dhkdnduq commented 9 months ago

utils.py def plot_segmentation_images ... axes[0].imshow(image.transpose(1, 2, 0)) axes[1].imshow(mask.transpose(1, 2, 0)) axes[2].imshow(segmentation,vmin=0, vmax=1) ...

From 000 To 000

wyweather commented 8 months ago

I want to have a prediction result picture. But I don't know how to adjust the code to get the plot _segmentation_images. Please help me. Thank you.

georgestanley commented 8 months ago

@wyweather ; you need to add --save_segmentation_images command to your run command.

E.g

python bin/run_patchcore.py --gpu 0 --seed 0 --save_segmentation_images \
--log_group mvtec-1 --log_project mvtec_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 250 --imagesize 250 "${dataset_flags[@]}" mvtec $datapath