ZPdesu / Barbershop

Barbershop: GAN-based Image Compositing using Segmentation Masks (SIGGRAPH Asia 2021)
https://zpdesu.github.io/Barbershop/
MIT License
1.35k stars 268 forks source link

Little question about cal_loss #52

Open zivzone opened 2 years ago

zivzone commented 2 years ago

Hi, Thank you for this amazing works. I have a little question about this funtion at this line

def cal_loss(self, im_dict, latent_in, latent_F=None, F_init=None):

In both "invert_images_in_FS" & "invert_images_in_w", it seems that you didn't pass "latent_F" & "F_init" in cal_loss to do the computation below:

   if latent_F is not None and F_init is not None:
      l_F = self.net.cal_l_F(latent_F, F_init)
       loss_dic['l_F'] = l_F
       loss += l_F

I wonder that should we still calaulate l_F loss in somewhere? or I misunderstanding somethings?

BR, Ziv