Open Taited opened 2 years ago
Please check this issue. Have we support perceptual loss in MMGeneration?
Sure, it's an commonly used feature. We will add this to backlog. We will appreciate it a lot if you'd like to make a PR.
Thank you for your response. I am very willing to make a PR for adapting the perceptual loss from mmediting to mmgeneration. However, I have a few issues that need to discuss first.
mmgen/models/losses/gen_auxiliary_loss.py
? Or I should create a new file like mmgen/models/losses/perceptual_loss.py
PerceptualLoss
be distinguished from the one in LPIP's PerceptualLoss? If it is true, what's your suggestions with the name?Here are my suggestion.
Since now we are merging this repo into MMEditing. I also recommend you to try MMEdit-1.x and add this loss item there :).
Thank you for your suggestions.
I have a problem with the returned values. Typically, a loss module in mmgeneration returns one value. However, the PerceptualLoss
often returns loss_percep
and loss_style
. Should the PerceptualLoss
return a sum of these two losses or should I separate the loss_style
into another loss module?
The manipulation of images could be seen as a conditioned generation. Therefore, the commonly used perceptual loss in style transfer is essential in some generation tasks. However, the mmgeneration only supports perceptual loss in the LPIP metric.
Is it possible to support the perceptual loss for style transfer as in the mmediting?