sofgan icon indicating copy to clipboard operation
sofgan copied to clipboard

which function should I use to generate "region-wise distance map P"

Open Tianhang-Cheng opened this issue 2 years ago • 1 comments

hi, I have some questions about "region-wise distance map P"

If we use the "scatter_to_mask" function to generate style_mask, the region-wise distance map can only be 0 or 1

style_mask = scatter_to_mask(condition_img.clone(), labels)

image

Fig 1. style_mask generated by "scatter_to_mask" function

If we use "scatter_to_mask_perregion" function to generate style_mask, the region-wise distance map can be a float in [0,1]

style_mask = scatter_to_mask_perregion(condition_img.clone(), labels)

image

Fig 2. style_mask generated by "scatter_to_mask_perregion" function

My question is, I found that the released code uses "scatter_to_mask", but the picture of "style-mixing" in the paper is not a 0-1 binary mask. So could you please tell me which function should I use? Thank you very much!

I guess you use scatter_to_mask because it has better training results, while scatter_to_mask_perregion is used for visualization. haha.

image

Fig 3. "style mixing"

Tianhang-Cheng avatar Sep 12 '21 03:09 Tianhang-Cheng

Hi there, thanks, both of these functions can be used for training and rendering, you could use any of them~

apchenstu avatar Sep 14 '21 15:09 apchenstu