1

For an image-to-image translation task in which I want to generate high-quality images from low-quality images ( MRI Images), I need a loss function to highlight the edges and generate images with sharper edges. Do you have any recommendation for selecting the desired loss function between Pytorch's loss function??

https://pytorch.org/docs/stable/nn.html#loss-functions

I really appreciate it if anyone can even provide me the code of any predefined loss function for this task.

Thanks

1 Answers1

0

I suppose you are using MSE loss function at the moment? This loss function indeed tends to prefer "smoother" outputs rather than sharp edges.

For image generation tasks, consider using perceptual loss that better correlates with human perception of image quality.

For more details on this loss function see
R. Zhang, P. Isola, A. A. Efros, E. Shechtman, O. Wang The Unreasonable effectiveness of Deep Features as a Perceptual Metric (CVPR 2018).

Shai
  • 111,146
  • 38
  • 238
  • 371