amazon-science / patchcore-inspection

Apache License 2.0
779 stars 155 forks source link

How do I turn a relative heatmap image into an absolute rating? #60

Open bdaad opened 1 year ago

bdaad commented 1 year ago

I tried to predict point of abnormality. But, Outputs a relative evaluation of each image. So, No color difference between good image heat map and bad image heat map.

[ex.] Output good image cable_test_good_002 (1)

Output bad image cable_test_cut_outer_insulation_009 (1)

Please tell me how to change relative evaluation into absolute evaluation. For [ex.] image, I want good image to be blue and bad point of bad image to be yellow.(otherwise blue)

bdaad commented 1 year ago

I solved it problem. I will share the solution.

file : /patchcore/patchcore-inspection/build/lib/patchcore/utils.py 〔Before code〕 axes[2].imshow(segmentation)

〔After code〕 axes[2].imshow(segmentation, vmin=0, vmax=1,cmap=plt.cm.jet)

*Roughly line 70.

wyweather commented 10 months ago

Please,I want to predict point of abnormality. How should I modify the code to output a prediction graph