Ruyi-Zha / endosurf

MIT License
47 stars 3 forks source link

Question Regarding PSNR and RMSE #3

Closed mhayoz closed 1 year ago

mhayoz commented 1 year ago

I have a question regarding the implementations of PSNR and RMSE in src/trainer/utils.py. In line 368 the RMSE is computed as: rmse = (((a - b)2 mask).sum() / (mask_sum 3.0))0.5

Why is there a factor 3 in the division? I would expect this to be: rmse = (((a - b)*2 mask).sum() / (mask.sum()))**0.5

Am I missing something?

Ruyi-Zha commented 1 year ago

Hi, thanks for your interest. Yes, you are right it's a small bug and I have fixed it now. I copied the code from cal_psnr() but forgot that depth is one channel. Thankfully it does not affect the conclusions.

mhayoz commented 1 year ago

Thank you for your answer. Does that mean that the true RMSE is sqrt(3) times higher than reported in the paper?

Ruyi-Zha commented 1 year ago

Yes, I think so. However, it does not affect any conclusions we drew because all methods used the same code.

mhayoz commented 1 year ago

I see. Thank you for the clarification