tengteng95 / Pose-Transfer

Code for the paper Progressive Pose Attention for Person Image Generation in CVPR19 (Oral).
MIT License
734 stars 160 forks source link

How to visualize the attention maps? #44

Closed luowy1001 closed 4 years ago

luowy1001 commented 5 years ago

Thx for your great work! I want to know how to visualize the attention maps? Where are the relevant codes? @tengteng95

mtroym commented 5 years ago

@luowy1001 the attention maps can use hookers or intermediate results to re-produce. The pytorch1.3.0 has a new feature. I hope you will figure it out.

luowy1001 commented 5 years ago

Thanks for your reply! I think it is simple to get attention features. However, what I want to know is how to make a multi-channel features map to a 3-channels image for visualization. @mtroym

luowy1001 commented 5 years ago

I guess that the attention map is averaged along the channel dimension, so it is compressed to a one-channel image?

mtroym commented 4 years ago

@luowy1001 Hi, You can use magnitude to calculate the heatmaps or other mapping functions. Hope it helps you.

luowy1001 commented 4 years ago

OK, thank you, I will try