YuvalNirkin / fsgan

FSGAN - Official PyTorch Implementation
https://nirkin.com/fsgan
Creative Commons Zero v1.0 Universal
749 stars 147 forks source link

Fine-tuning in v1 expression only reenactment #108

Closed shehrum closed 3 years ago

shehrum commented 3 years ago

I want to finetune the Generator model in expression_reenactment_video2video.py

In the training script train_reenactment.py, the generator loss is defined as:

loss_G_total = rec_weight loss_rec + seg_weight loss_seg + gan_weight * loss_G_GAN

I wanted to ask if I need to use the same loss, or a different loss for finetuning as defined in the finetuning function of master branch reenact.py file.

loss_pixelwise = self.criterion_pixelwise(img_pred, img[1][0]) loss_id = self.criterion_id(img_pred, img[1][0]) loss_rec = 0.1 * loss_pixelwise + loss_id

YuvalNirkin commented 3 years ago

We use a different loss in the finetuning stage because of speed considerations, you can use the full loss as well.