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

Transform to grayscale when calculating SSIM #96

Open
Ganlin-Yang opened this issue Dec 17, 2023 · 0 comments
Open

Transform to grayscale when calculating SSIM #96

Ganlin-Yang opened this issue Dec 17, 2023 · 0 comments

Comments

@Ganlin-Yang
Copy link

Hi:
Thanks for your great works. I have a minor question: in your implementation of SSIM metric in https://github.com/SuLvXiangXin/zipnerf-pytorch/blob/main/internal/image.py#L111, you transform image from RGB to single-channel before calculating SSIM. However, according to the original official implementation MultiNeRF: https://github.com/google-research/multinerf/blob/main/internal/image.py#L127, it seems not doing such an operation.
I've tried to replace line ssim = float(structural_similarity(rgb_pred_gray, rgb_gt_gray, data_range=255))
with ssim = float(structural_similarity(rgb_pred, rgb_gt, data_range=255, channel_axis=-1)), and got a slightly lower number in SSIM. For example, drop from 0.6088 to 0.6058.
Any suggestions?
Thanks

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

No branches or pull requests

1 participant