bj80heyue / One_Shot_Face_Reenactment

Official test script for 2019 BMVC paper 'One-shot Face Reenactment' in PyTorch.
MIT License
191 stars 36 forks source link

problem in Loss function #6

Closed BaldrLector closed 5 years ago

BaldrLector commented 5 years ago

@sanweiliti Hi, here some problems at loss design. the original paper says 'Lreconstruct is the L1 loss between the reenactment result and the input appearance after face contour resampling'. And L_id, L_preceptual ware also computed between result and appearance, but in the code, they ware computed between result and ground-truth(the pose guide)

so is there a mistake? thanks

sanweiliti commented 5 years ago

Hi, it is assumed that the face contour resampling does not change identity information as it only changes the face contour a bit, so in the code L_id and L_preceptual are computed between the result and ground-truth. It should be similar with training the model by calculating L_id, L_preceptual between result and input appearance.

BaldrLector commented 5 years ago

Hi, it is assumed that the face contour resampling does not change identity information as it only changes the face contour a bit, so in the code L_id and L_preceptual are computed between the result and ground-truth. It should be similar with training the model by calculating L_id, L_preceptual between result and input appearance.

Thank your reply! That makes sense, the ground truth in the code is appearance after face contour resampling by randomly selected pose-guided.

I still have some problems,

  1. how many optimization steps/epochs for the model generate an acceptable result?
  2. Is there special training strategy to train this model? I use same Lr, beta_2 and weights for loss as paper, but I can not get the result just like the paper give
sanweiliti commented 5 years ago
  1. the model is trained with batch_size=16 for ~60 epochs, lr=0.0001
  2. during training, the input image is masked with only the face area remained, so we later finetune the trained model with full image (with background) for around 2 epochs, with lr=2e-05
BaldrLector commented 5 years ago

Thank you reply, very helpful.

linghai06 commented 5 years ago

@sanweiliti Hi, here some problems at loss design. the original paper says 'Lreconstruct is the L1 loss between the reenactment result and the input appearance after face contour resampling'. And L_id, L_preceptual ware also computed between result and appearance, but in the code, they ware computed between result and ground-truth(the pose guide)

so is there a mistake? thanks

Hi, did you reproduce the results? I'm just confused by the discrepancy between the terms in the paper and the code implementation.