py123detection.mmcv_plugin.dataset

A NuScenesDataset subclass for py123detection exports.

Py123DNuScenesDataset is only defined when mmdet3d is importable, so rebuild_arrays() can also be used from a conversion environment.

Functions

rebuild_arrays(info)

Restore the numpy arrays of an info from a portable export, in place.

Classes

Py123DNuScenesDataset(*args[, ...])

NuScenesDataset for py123detection exports.

py123detection.mmcv_plugin.dataset.rebuild_arrays(info)[source]

Restore the numpy arrays of an info from a portable export, in place.

Safe on numpy exports too: np.asarray returns the arrays unchanged.

Return type:

Dict[str, Any]

class py123detection.mmcv_plugin.dataset.Py123DNuScenesDataset(*args, use_taxonomy_classes=True, eval_mode='self_contained', eval_class_range=None, **kwargs)[source]

Bases: NuScenesDataset

NuScenesDataset for py123detection exports.

On top of the stock dataset it rebuilds portable arrays, takes CLASSES from the pickle’s taxonomy when the config sets none, and by default evaluates against the ground truth in the pickle instead of a nuScenes database (eval_mode="nuscenes" restores the stock evaluation).

Parameters:

eval_class_range (Optional[Dict[str, float]]) – Per-class evaluation radius in metres. Classes with nuScenes names default to the detection_cvpr_2019 radii.

get_data_info(index)[source]

Stock get_data_info plus intrinsics / extrinsics / img_timestamp.

Those are the only additions the PETR family’s CustomNuScenesDataset makes, so their configs can use this dataset directly.

Return type:

Dict[str, Any]

load_annotations(ann_file)[source]
Return type:

List[Dict[str, Any]]