You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Could you please elaborate your feature request and provide some code to show what is implemented and what changes in result you are expecting. Thanks!
I believe that it comes in the function _ssim_per_channel() where the SSIM values are computed but then it returns the global mean rather than the pixel values.
We can add a 'return_index_map=False/True' argument to ssim to maintain backward compatibility: when return_index_map is True, returns the index map; when return_idnex_map is False, return the reduced global value.
Since you have already identified where to change, would you mind contributing a PR?
Activity
mohantym commentedon Nov 19, 2021
Hi @sanatmpa1! Could you look into this feature request?
sachinprasadhs commentedon Nov 24, 2021
Could you please elaborate your feature request and provide some code to show what is implemented and what changes in result you are expecting. Thanks!
MaggieLieu commentedon Nov 30, 2021
Hi,
Yes so the results I am expecting are like that shown here: https://uk.mathworks.com/help/images/ref/ssim.html for the local ssim map. So it's a SSIM value for each pixel rather than the mean.
I believe that it comes in the function _ssim_per_channel() where the SSIM values are computed but then it returns the global mean rather than the pixel values.
And the ssim() function
rainwoodman commentedon Dec 9, 2021
Thanks MaggieLieu for tracking this down!
We can add a 'return_index_map=False/True' argument to ssim to maintain backward compatibility: when return_index_map is True, returns the index map; when return_idnex_map is False, return the reduced global value.
Since you have already identified where to change, would you mind contributing a PR?
PS: Here is a reference where it is explicitly described that the global ssim value is the mean of the local ssim value: https://medium.com/srm-mic/all-about-structural-similarity-index-ssim-theory-code-in-pytorch-6551b455541e .
CohenAriel commentedon Jul 13, 2022
Hey @rainwoodman, can I create a PR for this?
rainwoodman commentedon Jul 13, 2022
That would be nice. Thanks!