kylevedder / BucketedSceneFlowEval

MIT License
14 stars 0 forks source link

Adds nuscenes log level train/val split #7

Closed ikhatri closed 5 months ago

ikhatri commented 5 months ago

The previous nuscenes dataloader treated the trainval set as 1 split without using the log-level split provided by the nuscenes API. This function resolves that by allowing for splits to be specified for each nuscenes version. The options are given in this block:

# Check compatibility of split with nusc_version.
    version = nusc.version
    if split in {'train', 'val', 'train_detect', 'train_track'}:
        assert version.endswith('trainval'), \
            'Requested split {} which is not compatible with NuScenes version {}'.format(split, version)
    elif split in {'mini_train', 'mini_val'}:
        assert version.endswith('mini'), \
            'Requested split {} which is not compatible with NuScenes version {}'.format(split, version)
    elif split == 'test':
        assert version.endswith('test'), \
            'Requested split {} which is not compatible with NuScenes version {}'.format(split, version)
    else:
        raise ValueError('Requested split {} which this function cannot map to logs.'.format(split))