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.

SSIM not working for negative numbers

See original GitHub issue

Hi!

SSIM module isn’t accepting negative numbers, as well as numbers greater than 1. This isn’t an issue when working with photographic data, but when working with numerical data it’s a hindrance. E.g.from skimage.metrics import structural_similarity handles negative numbers well. Could you please implement this? Or is it enough for me to edit the lines in ssim.py? Cheers!

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
ljeonjkocommented, May 6, 2022

Thank you very much for clarifying!

0reactions
francois-rozetcommented, May 6, 2022

I’m not sure what you mean by “not fixed for each batch of images”. When i said your numerical inputs range in [a,b], I meant that a and b are the absolute minimum and maximum values of all the inputs in the dataset, not in a batch. So they should not change “during training”.

Read more comments on GitHub >

github_iconTop Results From Across the Web

The interpretation of scikit-image SSIM (structural similarity ...
In the Skimage SSIM source code, Covarience of the two images is represented by vxy, and it can be negative in some cases....
Read more >
On the proper use of structural similarity for the robust ...
Notably, SSIM is designed to work on a strictly positive intensity scale, which is generally not the case in medical imaging. Common intensity...
Read more >
All about Structural Similarity Index (SSIM): Theory + Code ...
SSIM is used as a metric to measure the similarity between two given ... Just click on the “Open in Colab” link to...
Read more >
Structural similarity (SSIM) index for measuring image quality
This MATLAB function calculates the structural similarity (SSIM) index for grayscale image or volume A using ref as the reference image or volume....
Read more >
On the proper use of structural similarity for the robust ...
Notably, SSIM is designed to work on a strictly positive intensity scale, which is generally not the case in medical imaging. Common intensity ......
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