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 the heatmap usage #30

Open
resindraburiza opened this issue Jan 9, 2024 · 2 comments
Open

About the heatmap usage #30

resindraburiza opened this issue Jan 9, 2024 · 2 comments

Comments

@resindraburiza
Copy link

resindraburiza commented Jan 9, 2024

Dear the authors of HumanSD.

First of all, I would like to thank you for sharing your work.
I have read both the paper and the code and I found some parts that I cannot understand so I would like to ask some questions here.

About the heatmap loss, in the Eq. 6 of paper, it is written that $Wa$ is a weight such that the loss around the area that has high correlation to the input condition has higher priority factors.
image

From my understanding from Figure 2, it seems that the heatmap is used for simple multiplication or simple mask.
image

But, after checking the code, it seems that the obtained heatmap is not directly used as simple mask. After heatmap is obtained, the heatmap is passed to VAE encoder as shown here:

back_to_embed_pose_add=self.encode_first_stage(pose_add_weight)

After that, the obtained embedding is used to mask the loss here:
loss_simple = torch.mul(self.get_loss(model_output, target, mean=False),(1+self.pose_loss_weight*back_to_embed_pose_add_weight)).mean([1, 2, 3])

My questions are the following:

  1. Why is it necessary to pass the obtained heatmap to VAE encoder?
  2. Why do you need 1+ in loss_simple = torch.mul(self.get_loss(model_output, target, mean=False),(1+self.pose_loss_weight*back_to_embed_pose_add_weight)).mean([1, 2, 3])
  3. About obtaining the heatmap as shown in this part of the code.
    aggregated_heatmaps=torch.where(aggregated_heatmaps > self.estimate_thresh,

    The way the heatmap is calculated makes the pixel which are greater than threshold has value of zero and otherwise. I thought that the normal way is to assign 1 to pixels where value is greater than threshold. Why the other way is performed here?

I would really appreciate it if you could guide me to understand your work more correctly.
Thank you very much.

@xiao2mo
Copy link

xiao2mo commented Mar 20, 2024

same question here?

@neil0306
Copy link

neil0306 commented Jul 2, 2024

same here, any suggestions?

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