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

How to visualize the test result ? #14

Open
ajinkya933 opened this issue Dec 17, 2019 · 4 comments
Open

How to visualize the test result ? #14

ajinkya933 opened this issue Dec 17, 2019 · 4 comments

Comments

@ajinkya933
Copy link

ajinkya933 commented Dec 17, 2019

I have downloaded your pre-trained model and im running test.py :

python3 test.py --data-dir processed_data --save-dir logs
In output I get

('img_0001',) -317.4151611328125 975 1292.4151611328125
('img_0002',) 234.6561279296875 923 688.3438720703125
.
.
.
('img_0017',) 11.425949096679688 191 179.5740509033203

My question is where is the visualization (heatmap) image saved ?

@rongliangzi
Copy link

rongliangzi commented Mar 10, 2020

Hi! Here is my codes to visualize the estimated density map:

dm = outputs.squeeze().detach().cpu().numpy()
plt.imshow(dm, cmap=CM.jet)
plt.savefig(save_path)

@ZhihengCV
Copy link
Owner

ZhihengCV commented Apr 15, 2020

The visualization code is right, but in the paper, we normalize output by its max value for better visualization.

@d6h2p
Copy link

d6h2p commented Mar 31, 2023

你好,这样可视化是否正确?
dm = outputs.squeeze().detach().cpu().numpy()

dm_normalized = dm / np.max(dm)

plt.imshow(dm_normalized, cmap=cm.jet, vmin=0, vmax=1)

i += 1

plt.savefig("./image/{}.png".format(i))

@LOVEISI
Copy link

LOVEISI commented Oct 18, 2023

你好!这是我可视化估计密度图的代码:

dm = outputs.squeeze().detach().cpu().numpy()
plt.imshow(dm, cmap=CM.jet)
plt.savefig(save_path)

你好!请问这段代码是加在test.py后面吗

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

5 participants