TRI-ML / packnet-sfm

TRI-ML Monocular Depth Estimation Repository
https://tri-ml.github.io/packnet-sfm/
MIT License
1.24k stars 243 forks source link

About producing depth map files (.npz file) #59

Closed soheilAppear closed 3 years ago

soheilAppear commented 4 years ago

Is it possible for us to produce depth map files (.npz or .png) files using PackNet for our dataset? Since I noticed the KITTI dataset already provided depth map files in the separated directory. What should we do if don't have depth map files for our own dataset? Is it still trainable on our own dataset without a depth map?

Thanks.

VitorGuizilini-TRI commented 4 years ago

For self-supervised training you don't need depth maps at all, only for evaluation. If you don't have depth maps for evaluation then you can visually inspect the resulting predictions and see if they look alright (or you can lift them to 3D and inspect the unscaled pointclouds). You can then save these predictions as depth maps in .png or .npz using our repository.

soheilAppear commented 4 years ago

But the issue is if I do not use depth map files during the training process, I will not be able to run the training? So how can I prevent this issue from happening? That was the reason I thought maybe wee need a depth map even only for the training process.

soheilAppear commented 4 years ago

also, did you convert .bin files in KITTI dataset to .npz yourself?

My question is how can I convert them from .npz to .PNG and what are the values inside these .npz files.

I tried to open .npz files and this is the output:

Screenshot from 2020-08-03 00-54-49

what are these 6 columns in this .npz file? I thought maybe they are RGB and X,Y,Z coordinates. Is it right?

VitorGuizilini-TRI commented 4 years ago

These should be metric depth for each pixel (zeros are pixels without valid depth). What is the shape of the matrix you get when loading the .npz file?

soheilAppear commented 4 years ago

each matrix consists of 207 6 elements and the whole files have 155250 rows 6 columns. This file is 0000000000.npz