xiongzhu666 / Sky-Segmentation-and-Post-processing

MIT License
110 stars 23 forks source link

How to use the non-binary refined mask and how do you upsample the mask #10

Open xiemeilong opened 6 months ago

xiongzhu666 commented 5 months ago
  1. the input mask for refine is non-binary mask
  2. resize the rgb image and mask to the same size by opencv linear interpolation
xiemeilong commented 5 months ago

@xiongzhu666 Thank you for your answer. But I want to ask, how can the refined mask be used to extract the original photo, because after refinement it is no longer a binary mask. Do I need to convert it to a binary mask?

xiongzhu666 commented 5 months ago

@xiongzhu666 Thank you for your answer. But I want to ask, how can the refined mask be used to extract the original photo, because after refinement it is no longer a binary mask. Do I need to convert it to a binary mask?

no,normalized the mask to 0-1 and merge by alpha output = alphaa + (1-alpha)b

xiemeilong commented 5 months ago

@xiongzhu666 Sorry, I'm not sure what you mean by 'a' and 'b' respectively.

xiemeilong commented 5 months ago

Oh, I see now. Its about the way to combine two photos, right? But if I directly multiply the original photo with the normalized mask, the resulting photo doesn't look good. The clouds in the sky are still there, and some parts of the ground are darkened. Is this because I'm using U2NetP? image image image