EPFL-VILAB / omnidata

A Scalable Pipeline for Making Steerable Multi-Task Mid-Level Vision Datasets from 3D Scans [ICCV 2021]
Other
395 stars 49 forks source link

Output normal vector not normalized #14

Closed stalkerrush closed 1 year ago

stalkerrush commented 2 years ago

Hi,

Thanks for releasing this great work. To get the real normal vectors from the output normal images, I do normal = (normal_image - 0.5) * 2, but the output after this transform does not seem to have a norm of 1. Is this expected? Or is it the community standard that surface normal is not a unit vector?

alexsax commented 1 year ago

Hi @stalkerrush, do you mean outputs from the annotator, or the pretrained models? The annotator should have outputs that are 1 or close to 1, but just in case way we apply normalization anyway during training :)

stalkerrush commented 1 year ago

Hi @alexsax , thanks for the reply. I was actually talking about the pretrained model inference with your demo code. It seems that if I load the normal from the saved images with normal = (normal_image/255 - 0.5) * 2, it does not lead to a unit normal. I just want to know whether it's because I did the conversion in the wrong way or it's actually expected.

alexsax commented 1 year ago

Hi @stalkerrush, you did it correctly! The output isn’t normalized. We train with both an L1 loss and a cos angle loss and we only apply normalization in the cosine loss here