TRI-ML / dgp

ML Dataset Governance Policy for Autonomous Vehicle Datasets
https://tri-ml.github.io/dgp/
MIT License
93 stars 62 forks source link

How to view and access 'depth' information #52

Open hcv1027 opened 2 years ago

hcv1027 commented 2 years ago

I'm trying to use the 'depth' information, but the visualization result looks very strange. I follow DDAD.ipynb example to draw depth image, but it looks like an empty image.

from matplotlib.cm import get_cmap
plasma_color_map = get_cmap('plasma')

ddad_train = SynchronizedSceneDataset(
    json_path,
    split='train',
    datum_names=['lidar', 'CAMERA_01', 'CAMERA_05', 'CAMERA_06', 'CAMERA_07', 'CAMERA_08', 'CAMERA_09'],
    generate_depth_from_datum='lidar'
)

sample_0 = ddad_train[0]
camera_01 = sample_0[0][0]

depth_map = plasma_color_map(camera_01['depth'])[:, :, :3]
plt.imshow((camera_01['depth']*255).astype(np.uint8))
)

This is what it looks like: depth

Is there a way to get DDAD depth information and show it like below image? 000007

yuchen2580 commented 1 year ago

Hi I am facing same issue, have you solved it?

kis-balazs commented 3 weeks ago

Hi, @hcv1027 and @yuchen2580! Please find the following snippet in order to load the lidar Point Cloud onto the image. Data loading: grafik grafik

Relevant cell: grafik

Please do let me know if this helped!