oneThousand1000 / HairMapper

(CVPR 2022) HairMapper: Removing Hair from Portraits Using GANs.
290 stars 39 forks source link

Results on horizontal flipped images #14

Closed Robin970822 closed 2 years ago

Robin970822 commented 2 years ago

Hi, another small questions:). I tried to verify the performance consistency for HairMapper and found the ediited images are different from horizontal flipped images, that is the models used in HairMapper (maybe the encoder) are not left-right symmetry.

More specifically, define HairMapper edition as H(), any components of face parsing as Seg(), and cv2.flip(*, 1) as Flip, there is: H(aligned_image) and Flip(H(Flip(aligned_image))) are rather different and Seg(H(aligned_image)) and Seg(Flip(H(Flip(aligned_image)))) are different as well.

Maybe more horizontal flipping augmentation can fix it?

oneThousand1000 commented 2 years ago

Hi Robin, I am not sure what different means.

Maybe you want to say the H(aligned_image) and Flip(H(Flip(aligned_image))) are not pexel aligned (that is , the pixel at [x,y] in H(aligned_image) is different from the pixel at [x,y] in Flip(H(Flip(aligned_image))))?

Actually, I don't think the horizontal flipping augmentation can make the models strictly left-right symmetry, because some operations in network is not symmetry.

oneThousand1000 commented 2 years ago

If you want to say the H(aligned_image) and Flip(H(Flip(aligned_image))) look visually different.

We didn't consider horizontal flipping augmentation in our HairMapper, so this may be one of the reasons.

I think a better idea is to apply 3D-view-consistent in HairMapper training. With 3D-view-consistent, our method may output smooth results on videos.

I hope this can be helpful.

Robin970822 commented 2 years ago

Like this A, and B are the same aligned images; C is H(aligned_image); D is Flip(H(Flip(aligned_image))); the red and blue contours are segmentation results from C & D.

image2022-5-19_13-17-19

Anyhow, thank you very much!