Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

some questions about ssim function #347

Open
xiaoyangx0 opened this issue Feb 26, 2023 · 3 comments
Open

some questions about ssim function #347

xiaoyangx0 opened this issue Feb 26, 2023 · 3 comments
Labels
question Further information is requested

Comments

@xiaoyangx0
Copy link

Hello, no error was reported when I used the ssim function api to calculate the ssim value, but the calculated ssim value was negative. This is not normal, because the ssim value should be [0-1], but I don't know what is wrong, do you have any suggestions?

@snk4tr snk4tr added the question Further information is requested label Mar 1, 2023
@snk4tr
Copy link
Contributor

snk4tr commented Mar 1, 2023

@xiaoyangx0 could you provide a minimal example of the code + data that results in negative values? We do not observe such behavior on data from general IQA datasets e.g., TID2013, KADID-10k and PIPAL.

@xiaoyangx0
Copy link
Author

shadow_ssim += ssim(original_data, shadow_inv_output_, reduction='sum').item() shadow_psnr += psnr(original_data, shadow_inv_output_, reduction='sum').item()
Thank you for your reply. My original intention was to generate a picture through a model and compare the similarity with the original picture. The code for using the ssim has been uploaded. However, no bug was displayed when I used the ssim. However, when I used tensorboard to display the ssim change curve, I found that some places were negative.
<img width="479" alt="image" src="https://user-images.githubusercontent.com/62381232/223094975-2b5f2603-6004-4f16-a5f6-3056c4d9170e.png">

@Moleculebo
Copy link

@xiaoyangx0 Do you have solved the problem? Could you clarify it? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants