Depth map 2 normal map
X-zhangyang opened this issue · 1 comments
Thanks for sharing.
I downloaded the training data you provide, and use the Eq (4) https://github.com/yasaminjafarian/HDNet_TikTok/blob/main/training/training_code/utils/Geometry_MB.py#L94 to convert a depth map to a normal map.
The results show below:
From left to right are: Image, depth map, gt normal map(N1) and convert normal map(N2).
The error between N1 and N2 is 4120.162. Error equals to (abs(N1-N2).sum()), The pixel value of N1 and N2 range from 0 to 1.
I use a GT depth and covert it to a normal map. I think the difference between N1 and N2 should not be that huge.
I wonder why? Or I misunderstood something?
Looking forward to your reply.
I am not sure about this computation of error (You can check the L2 error or cosine error for a better representation). But this computation of normal from depth is a differentiable approximation that we proposed to compute the normal from depth without computing the nearest neighbors. So it should be close to GT but it will not be similar to it.