Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

About visualization for anomaly score maps #5

Open
EricaHattman opened this issue Oct 3, 2023 · 4 comments
Open

About visualization for anomaly score maps #5

EricaHattman opened this issue Oct 3, 2023 · 4 comments

Comments

@EricaHattman
Copy link

Could you please advise on how to implement the visualization for anomaly score maps in the paper?
Or may I get this part of code if is possible?

@cool-xuan
Copy link
Owner

The visualization code is simple via matplotlib. There are only two lines of code are required:

plt.imshow(img)
plt.imshow(anomaly_score_map, cmap='jet', alpha = 0.4)

where img refers to the input image of the product, and anomaly_score_map is the predicted score.

@EricaHattman
Copy link
Author

Thanks for your reply, it helps me a lot!^_^

@oahnah
Copy link

oahnah commented Nov 23, 2023

Thanks for your reply, it helps me a lot!^_^
How is visualization implemented specifically? I don't know where the code should be placed. T_T

@cool-xuan
Copy link
Owner

@oahnah The visualization code works after getting the anomaly score map. In our code, anomaly_score_map is calculated here. Particularly, anomaly_score_map_mul is the better choice for human visualization.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants