-
Notifications
You must be signed in to change notification settings - Fork 10
Closed
Description
Hi, thanks for the great project!
I am a little confused about the calculation of SSIM metric in the code.
To be specific, the inputs to ssim_fn are two floating point numbers ranging from [0,1] (because of the sigmoid activation for rgb values). If data_range argument is not passed to skimage structural_similarity function, it assumes the data range for floating point numbers to be 2 (according to the official document here), which is incorrect for this case.
So, I think the code should be
def ssim_fn(x, y):
return structural_similarity(x, y, multichannel=True, data_range=1.0)I would like to confirm whether I am right or not, as whether to pass data_range or not yields different output SSIM.
Looking forward to the reply and thanks in advance.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels