yuval-alaluf / SAM

Official Implementation for "Only a Matter of Style: Age Transformation Using a Style-Based Regression Model" (SIGGRAPH 2021) https://arxiv.org/abs/2102.02754
https://yuval-alaluf.github.io/SAM/
MIT License
632 stars 151 forks source link

What is the difference between source and target? #53

Closed ytz123456 closed 1 year ago

ytz123456 commented 1 year ago

Hi @yuval-alaluf , thank you for the amazing work! It inspired me a lot. When I read your code, I found the source and target points to the same directory, thus same data. I wonder why we need source and target since they are the same? For the id loss, why we even need diff_view since it ought to be zero?

yuval-alaluf commented 1 year ago

This code is based on the pSp and I used their convention to define the source and target paths. Since our source and targets are the same in this task, I set them to the same path. In pSp they perform image-to-image between two different domains and therefore the source and target can be different. Regarding the ID loss, this is also taken from pSp's face normalization task. You are correct that this is unneeded for this task. Note that this isn't used to compute the loss and is only used for logging.

ytz123456 commented 1 year ago

Thank you for the quick reply!