CMU-punit-bhatt / datasets

0 stars 0 forks source link

NUSCENES - Script Real Images + Label extraction #2

Open punit-bhatt opened 2 years ago

punit-bhatt commented 2 years ago

Check out: https://github.com/wayveai/fiery/blob/master/fiery/data.py#L248

Nuscenes docs: https://www.nuscenes.org/nuimages?externalData=all&mapData=all&modalities=Any

Some starter code:

import numpy as np
import torch
from nuimages import NuImages

nuim = NuImages(dataroot='data/sets/nuimages', version='v1.0-mini', verbose=True, lazy=True)

sample_idx = 1
sample = nuim.sample[sample_idx]
key_camera_token = sample['key_camera_token']

import matplotlib.pyplot as plt

semantic_mask, instance_mask = nuim.get_segmentation(key_camera_token)

plt.figure(figsize=(32, 9))
plt.imshow(semantic_mask)
plt.show()
adithyasampath commented 2 years ago

Yup this for front view segmentation, not BeV. Do you need for front view as well? I've done the above in the test_nuscenes jupyter notebook. I've tested it for the mini dataset. So I'll extract for train and test datasets?

adithyasampath commented 2 years ago

Need some help BeV segmentation. Kinda stuck on it.