chaofengc / IQA-PyTorch

👁️ 🖼️ 🔥PyTorch Toolbox for Image Quality Assessment, including LPIPS, FID, NIQE, NRQM(Ma), MUSIQ, TOPIQ, NIMA, DBCNN, BRISQUE, PI and more...
https://iqa-pytorch.readthedocs.io/
Other
1.79k stars 162 forks source link

PSNR, SSIM calculation #167

Open ryanlu2240 opened 1 month ago

ryanlu2240 commented 1 month ago

Hi, thanks for such a convenient evaluation tool! I want to ask about the calculation for PSNR and SSIM. Is it calculated on the Y channel in the YCbCr color space or on RGB channels?

chaofengc commented 1 month ago

Thanks to your interest! By default, SSIM uses YCbCr space and PSNR uses RGB space. Alternatively, you can pass the create_metric('psnr', test_y_channel=True) to control it.