Drive-MLLM
Drive-MLLM copied to clipboard
NuScenes Scene/Sample Token with your Dataset Samples
Hi @XiandaGuo @bonbon-rj , your work incredibly useful and well-structured. I have a question/request regarding the integration of NuScenes data. I'd like to know if there's a way to establish connections between the raw NuScenes scene/sample tokens and the samples in your dataset. Specifically, I'm looking for a method or a mapping that would allow me to link these two sets of data seamlessly.
We ues the official nuScenes library. The code for extracting training and evaluation samples is as follows, and then we iterate through each index to use as the file name:
from nuscenes.nuscenes import NuScenes
from nuscenes.utils import splits
nusc = NuScenes(version='v1.0-trainval', dataroot='xxx', verbose=True)
train_val_scenes = splits.train if args.train_val == 'train' else splits.val
train_val_scene_tokens = [scene['token'] for scene in nusc.scene if scene['name'] in train_val_scenes]
train_val_samples = [sample for sample in nusc.sample if sample['scene_token'] in train_val_scene_tokens]