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

[Question] How to get density maps from input image? #11

Closed
marcemq opened this issue May 25, 2023 · 2 comments
Closed

[Question] How to get density maps from input image? #11

marcemq opened this issue May 25, 2023 · 2 comments

Comments

@marcemq
Copy link

marcemq commented May 25, 2023

Hello @LoraLinH :)

Thank you for sharing the code for the 'Boosting Crowd Counting via Multifaceted Attention' paper.

I'm intended to use it for initial step in a crowd forecasting project.
I was able to execute test.py file and see the mae and mse results 😊

Now, I want to be able to given an input image get its density map. Checking the paper I think it's an output of the Regression Decoder, but I couldn't found it in the code, so would you please point me how to achieve this?

Big thank you in advance.

@LoraLinH
Copy link
Owner

LoraLinH commented May 26, 2023 via email

@marcemq
Copy link
Author

marcemq commented May 29, 2023

Hello @LoraLinH, thank you for your reply.

I've manage to write such output into an image for the very first iteration, this output is expected right?

test

Code to generate the image:

outputs = model(inputs)[0] # a tensor of [1,1,117,156] and values between 0-1
outImg = outputs[0][0].detach().cpu().numpy()
cv2.imwrite("test.png", outImg*255)

@marcemq marcemq closed this as completed Jun 8, 2023
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

2 participants