zubair-irshad / CenterSnap

Pytorch code for ICRA'22 paper: "Single-Shot Multi-Object 3D Shape Reconstruction and Categorical 6D Pose and Size Estimation"
https://zubair-irshad.github.io/projects/CenterSnap.html
286 stars 47 forks source link

Depth when pre-processing NOCS Data #12

Closed Kasai2020 closed 2 years ago

Kasai2020 commented 2 years ago

I had a question about how you are preprocessing the depth from the NOCS dataset. In generate_data_nocs.py, you divide the depth (which I believe is in mm) by 255 before writing it as a panoptic datapoint. This is on line 234:

depth_array = np.array(depth, dtype=np.float32)/255.0

Is this intended? and why 255.0?

zubair-irshad commented 2 years ago

Hi @Kasai2020, Since depth is used as an additional input to our network i.e. we used RGB-D as an input, we normalize it by a scale of 255.0. To visualize this depth, we un-normalize and multiply by 255.0. Note that this normalization is different from depth encoding i.e. 16 bit etc. We do this normalization after loading the 16-bit depth. Usually normalization helps with network stability during training. Hope it helps!

Kasai2020 commented 2 years ago

Thank you for the in depth and fast reply!