question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Feature Request] Add `MS-SSIM + L1` reconstruction loss

See original GitHub issue

🚀 Feature

Implementation of MS-SSIM + L1 loss function which can be used in vision tasks such as image inpainting, restoration, synthesis etc.

Motivation

While there is an implementation of SSIM loss in korina.losses, there isn’t one for MS-SSIM + L1. It is annoying to always use a big function with my other loss terms!

Have a look at the paper Loss Functions for Image Restoration with Neural Networks which shows MS-SSIM + L1 is simply awesome.

Related implementations are here in Caffe. And, an implementation of MS-SSIM here in PyTorch.

Pitch

I want to use MS-SSIM + L1 loss in one-ish line(s) of code in my projects.


Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
edgarribacommented, Jan 30, 2022

I suggest to read this: https://github.com/kornia/kornia/blob/master/CONTRIBUTING.rst#developing-kornia And then once you modify (inside the dev-env) – pytest test/losses/test_losses.py::TestSSIMLoss::test_ssim https://github.com/kornia/kornia/blob/master/test/losses/test_losses.py#L301

1reaction
edgarribacommented, Jan 28, 2022

sounds like a plan

Read more comments on GitHub >

github_iconTop Results From Across the Web

Loss Functions for Image Restoration with Neural Networks
We empirically show that the poor performance of some losses is related to local minima of the loss functions (Section V-A), and we...
Read more >
kornia.losses - Read the Docs
Function that computes a loss based on the SSIM measurement. ... Thus, reduction='mean' was added as an optional reduction method. Reference: [1] ...
Read more >
Loss Functions for Neural Networks for Image Processing
Note that we add a point-wise multiplication between GσMG and Lℓ1: this is because MS-SSIM propagates the error at pixel q based on...
Read more >
LEARNING TO GENERATE IMAGES WITH PERCEPTUAL ...
descriptions and reconstructing an input image from a com- ... consequences of using MS-SSIM versus PL loss on training autoencoders. ... Although ad-....
Read more >
Research on Retinex Algorithm Combining with Attention ...
The MSRCR algorithm adds a color restoration factor i ... L1 loss, where the expression of MS-SSIM is as shown in Equation (19);...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found