py123detection.mmcv_plugin.evaluation¶
nuScenes-style detection evaluation against the ground truth stored in an exported pickle.
mmdetection3d’s NuScenesDataset.evaluate hands predictions to the devkit’s NuScenesEval,
which reads ground truth from the nuScenes database and requires an official split. Here the
devkit’s EvalBoxes are built from data_infos instead and its metric code
(accumulate / calc_ap / calc_tp) runs on them, so any dataset can be evaluated as long
as its class names are nuScenes detection names (DetectionBox asserts that).
Ground truth goes through the same path as predictions (LiDARInstance3DBoxes ->
output_to_nusc_box -> lidar_nusc_box_to_global), so a box layout mismatch cannot skew the
metric.
Differences from the official protocol:
add_center_distuses the frame’sego2global_translationinstead of theLIDAR_TOPego pose record, the same quantity read from the pickle;no bike-rack filter, since there is no
static_object.bicycle_rackto look up;exports carry no attributes, so
attr_errisnanper box and the devkit scores it as 1.0, as in CoIn3D’s Lyft / Waymo tables. NDS includes that fixed penalty.
Functions
|
A devkit |
|
Evaluate a nuScenes result JSON against the ground truth in the infos. |
|
The metrics table as the devkit's |
|
The devkit's ground-truth |
- py123detection.mmcv_plugin.evaluation.build_detection_config(class_names, class_range=None, base='detection_cvpr_2019')[source]¶
A devkit
DetectionConfigrestricted toclass_names.DetectionConfig.__init__insists on the ten nuScenes classes, so the named base config is created first and its plain attributes are narrowed afterwards.
- py123detection.mmcv_plugin.evaluation.ground_truth_from_infos(data_infos, class_names, cfg, eval_version='detection_cvpr_2019')[source]¶
The devkit’s ground-truth
EvalBoxes, built from mmdet3d infos.Boxes are converted exactly like mmdet3d converts predictions. Every frame gets an entry, empty when it has no box of an evaluated class.
- py123detection.mmcv_plugin.evaluation.evaluate_from_infos(result_path, data_infos, class_names, output_dir, class_range=None, eval_version='detection_cvpr_2019', verbose=True)[source]¶
Evaluate a nuScenes result JSON against the ground truth in the infos.
Follows
nuscenes.eval.detection.evaluate.DetectionEvaland writes the samemetrics_summary.json/metrics_details.jsonintooutput_dir.- Parameters:
- Return type:
- Returns:
The serialized
DetectionMetricsplusmetaandevaluationblocks.