prs-eth / Diffusion-Super-Resolution

[CVPR 2023] Guided Depth Super-Resolution by Deep Anisotropic Diffusion
MIT License
90 stars 8 forks source link

about the visualization #12

Closed caijianghe closed 1 year ago

caijianghe commented 1 year ago

Hello,dear author, I have some questions about visualization. for the residual plots, how can I ensure that vmax and vmin are centered around 0? the following is my code, but the visualization results do not quite match what is shown in your paper.

vvmin = -np.max(np.abs(residual)) vvmax = np.max(np.abs(residual)) plt.imsave(os.path.join(rootresidual, f'{idx}{dxi}.png'), residual, cmap='RdBu', vmin=vvmin, vmax= vvmax)

nandometzger commented 1 year ago

Hi, you need to assure that abs(vvmin)==abs(vvmax), otherwise the colormap is not symmetrical around zero.

if (-vvmin)>vmax:
    vmax = -vvmin
else:
    vvmin = -vvmax

also I recommend working with 95 or 98 percentil or similar since min max is not robust to outliers.

caijianghe commented 1 year ago

Thank you very much for receiving your reply