How does the leaderboard PSNR calculated?

162 views
Skip to first unread message

不爱吃猫的鱼

unread,
Apr 11, 2018, 6:58:46 AM4/11/18
to Challenge on Learned Image Compression 2018
I have calculated the PSNR at local machine, and below is my psnr calc code:

 mse = lambda x,y: (np.sum(np.square(y - x))) / float(x.size)
 psnr = lambda x,y: 10*math.log10(255. ** 2 / mse(x,y))

and I get about 31.9 PSNR, however on the leaderboard I only get 26.72.
What's the difference causing that?

ltheis

unread,
Apr 11, 2018, 7:02:19 AM4/11/18
to Challenge on Learned Image Compression 2018
It looks like you are computing a PSNR value for each image, and then average those PSNR values.

However, we calculate a MSE across all pixels of all images, and the compute a PSNR from that.

不爱吃猫的鱼

unread,
Apr 11, 2018, 8:37:58 AM4/11/18
to Challenge on Learned Image Compression 2018

I don't think it is because of it. because the avg mse of all images is 42.8738409156, then the corresponding PSNR is 10*math.log10(255. ** 2 / 42.87) = 31.81, there is still a gap between 26.72, could you public the evaluating calculation code of
PSNR and MS-SSIM? Thanks!
在 2018年4月11日星期三 UTC+8下午7:02:19,ltheis写道:

ltheis

unread,
Apr 11, 2018, 8:59:20 AM4/11/18
to Challenge on Learned Image Compression 2018

不爱吃猫的鱼

unread,
Apr 11, 2018, 10:43:13 AM4/11/18
to Challenge on Learned Image Compression 2018
thanks

在 2018年4月11日星期三 UTC+8下午8:59:20,ltheis写道:

不爱吃猫的鱼

unread,
Apr 11, 2018, 11:39:25 PM4/11/18
to Challenge on Learned Image Compression 2018
I found the error , because I use uint8 dtype array, then the diff is always between 0~255, which reduced my mse. Hoping it is help for other ones!

在 2018年4月11日星期三 UTC+8下午6:58:46,不爱吃猫的鱼写道:
Reply all
Reply to author
Forward
0 new messages