amazon-science / patchcore-inspection

Apache License 2.0
719 stars 146 forks source link

How/Where to visualize localized anomaly map on the test bad images. #8

Closed MlLearnerAkash closed 2 years ago

MlLearnerAkash commented 2 years ago

As discussed README.md file, the localization on the bad images. Like:

image

My question is Where to look into the code and which folder it is being saved after running sample_evaluation.sh file (provided all the checkpoints and other parameters are taken care of)

Thnaks in advance.

Confusezius commented 2 years ago

You can generate sample segmentation images by just including the --save_segmentation_images flag, see also the respective part in the code: https://github.com/amazon-research/patchcore-inspection/blob/b64be4734cb8295bfbadccf4f6a036b266181e57/bin/run_patchcore.py#L139-L174

Or the plot-generating function https://github.com/amazon-research/patchcore-inspection/blob/b64be4734cb8295bfbadccf4f6a036b266181e57/src/patchcore/utils.py#L15

Hope that helps!

MlLearnerAkash commented 2 years ago

Thanks @Confusezius for your generous input. Closing the issue.

lzd-1230 commented 3 months ago

@Confusezius Hi! I've run --save_segmentation_images flag, but it provide me the seg-image combined with gt and prediction

Can I use the origin code to generate the picture like readme mentioned above?

Or I need write another code to realize that?

image