|
autonomy_evaluation v2.0.0
|
This repository supports the following evaluations of automated driving systems:
perception_msgs/ObjectClassification
Evaluates 3D bounding boxes, e.g. detected in lidar point clouds, camera images or both, against the labels of a dataset. Predictions and labels are compared on the classes of perception_msgs/ObjectClassification, so a model can be evaluated on datasets of different class taxonomies. The metrics follow the nuScenes detection benchmark, which serves as reference; the evaluation is no implementation of the official nuScenes challenge and deviates from it as listed below.
Supported datasets: every dataset of autonomy_datasets that publishes 3D object labels:
| Topic | Type | Description |
|---|---|---|
prediction | perception_msgs/ObjectList | 3D objects detected by the system under test |
label | perception_msgs/ObjectList | 3D object labels of the dataset; predictions in another frame are transformed into the frame of the labels with the transforms published on /tf and /tf_static |
label_meta_info (optional) | autonomy_datasets_msgs/ObjectListMetaInfo | dataset annotations of the labels, subscribed next to label on <label topic>/meta_info; only read to recognize bike racks. Samples of a dataset that publishes no meta information are evaluated without it |
Metrics are computed based on the following assumptions:
perception_msgs/ObjectClassification: pedestrian, bicycle, motorcycle, car, utility, bus, animal, vru and micro.car, motorcycle, utility, bus and micro. A detection usually has a single most probable class.UNKNOWN.UNKNOWN (definitely none of the defined classes) and UNCLASSIFIED (unknown classification, i.e. any class) are never evaluated. Predictions of neither evaluated class, e.g. barriers and traffic cones of a nuScenes-trained detector, are dropped.utility prediction matches a Waymo vehicle but not a nuScenes car. An UNCLASSIFIED label may be any class.UNKNOWN or UNCLASSIFIED is a don't-care object: a prediction matched to it is ignored, and it is never a false negative. A label that can only be UNKNOWN, e.g. a nuScenes barrier, is matched by no prediction, so a car predicted on it is a false positive.Evaluated classes: classes that the labels of a dataset do not distinguish are evaluated together, as one class named after its members joined by |. All possible classes of a positive label end up in the same evaluated class, and the evaluated classes are derived from the labels of all evaluated samples, so the results of each scene use the same classes as the results of all samples. Each label and each detection of a single class therefore counts for exactly one evaluated class.
| Dataset | Evaluated classes |
|---|---|
| nuScenes, MAN TruckScenes, Zenseact Open Dataset, FZI-AURA, DrivIng, TUM Traffic | one per class, e.g. car, utility (trucks, trailers, construction and emergency vehicles), bus, pedestrian, bicycle, motorcycle, vru (strollers, wheelchairs), micro (personal mobility), animal |
| Waymo Open Dataset | motorcycle\|car\|utility\|bus\|micro (vehicles), pedestrian\|vru (pedestrians), bicycle (cyclists); its unknown objects, labeled UNKNOWN or ANIMAL, are don't-care |
| NVIDIA PhysicalAI AV Dataset | car, utility, bus, pedestrian\|vru (persons and strollers), bicycle\|motorcycle (riders), animal; its other vehicles, labeled UNKNOWN or MOTORCYCLE, are don't-care |
Objects that Zenseact Open Dataset flags as unclear and FZI-AURA objects of unknown categories are UNCLASSIFIED, hence don't-care. A dataset should only list several possible classes for objects whose class it systematically cannot tell, since a single such label joins its classes for the whole evaluation.
{0.5, 1.0, 2.0, 4.0} meters; of equally distant labels, positive ones are claimed first. For labels of a single class, this is the per-class matching of nuScenes. A true positive belongs to the evaluated class of its label, a false positive counts against the evaluated class of each of its classes.Detection range: labels and predictions are only considered within the range of their classes. An object of several possible classes uses the largest of their ranges, an UNCLASSIFIED label the largest of all.
< 50 m< 40 m< 40 m (not evaluated by nuScenes, ranged like pedestrians)original_class (static_object.bicycle_rack) in the optional label meta information, as published for nuScenes and MAN TruckScenes.ap) is calculated by integrating the recall-precision curve for recalls and precisions > 0.1 (points at or below either threshold are excluded). The mean average precision (mAP) is the average over match thresholds and evaluated classes with labels; an evaluated class without labels has no AP, so its predictions do not dilute the mAP. Evaluated classes with labels that the model never predicts count with AP 0.ate, ...) are calculated using a match threshold of 2.0 m. The velocity error ave is only computed against labels whose velocity is set: perception_msgs marks a state entry that is not set with CONTINUOUS_STATE_COVARIANCE_INVALID on the diagonal of the state covariance. Without any label with velocity, ave is unavailable.(5·mAP + Σ max(1−m{metric},0)) / (5 + number of TP metrics) over the available TP metrics ate, ase, aoe and ave, i.e. the formula of the nuScenes detection score (NDS) without the attribute error.perception_msgs/ObjectClassification replace the 10 nuScenes detection classes, e.g. trucks, trailers and construction vehicles are evaluated together as utility, barriers and traffic cones are not evaluated, and strollers, wheelchairs, personal mobility devices, animals and emergency vehicles are. Classes without labels in the evaluated samples are skipped instead of entering the mean with AP 0.perception_msgs/Object cannot carry attributes, so the attribute error aae is not evaluated and the detection score is not comparable to the official NDS.ave is left out of the detection score instead of counting as error 1.min_lidar_points_in_bbox lidar points (default 1), so labels that only radar points fall into are missing. Bike racks are only known if their labels are published, and their footprint is checked in 2D.The results hold the metrics over all evaluated samples and, under scenes, the num_samples, sample_ids and metrics of each scene. Each metric holds its aggregated value under _value_, next to its sub-metrics per match threshold or per evaluated class {class}, e.g. car or pedestrian|vru.
| Metric | Description |
|---|---|
_value_ | Detection score combining the mAP and the available mean TP errors with weights 5-1-1-1-1, normalised by the sum of the weights: (5·mAP + Σ max(1−mTP,0)) / (5 + number of TP errors), null without labels. |
num_labels._value_ | Number of positive labels, i.e. without don't-care labels. |
num_labels.{class}._value_ | Number of positive labels of the class, for every evaluated class with labels or predictions. A class with predictions but 0 labels has no AP and TP errors, so its predictions do not enter the metrics. |
num_labels.{class}.{classes} | Number of positive labels of the class by their possible classes {classes}, joined by \|, e.g. NVIDIA's persons as pedestrian\|vru and its strollers as vru within pedestrian\|vru. |
num_predictions._value_ | Number of predictions of an evaluated class. |
num_predictions.{class} | Number of predictions of the class, for every evaluated class with labels or predictions; a prediction of classes of several evaluated classes counts for each of them. A class with labels but 0 predictions counts with AP 0. |
ap._value_ | Mean average precision over all match distance thresholds and all evaluated classes with labels, null without labels. |
ap.classes.{class} | Mean average precision of the class over all match distance thresholds. |
ap.dist_{threshold}._value_ | Mean average precision over all evaluated classes with labels, with a maximum match distance of {threshold} meters (0.5, 1.0, 2.0, 4.0). |
ap.dist_{threshold}.classes.{class} | Average precision of the class with a maximum match distance of {threshold} meters. |
ate._value_, ate.{class} | Average translation error as Euclidean distance in meters, mean over the evaluated classes with labels and per class. |
ase._value_, ase.{class} | Average scale error as 1 - IoU after aligning centers and orientation. |
aoe._value_, aoe.{class} | Average orientation error as smallest yaw angle difference between prediction and ground truth in radians. |
ave._value_, ave.{class} | Average velocity error as absolute velocity error in m/s, null for a class without labels with velocity and as mean if no label has a velocity. |
The TP errors are measured with a maximum match distance of 2 meters; their means skip null classes.
An evaluation declares the topics it reads and computes metrics from their messages. It may read the topics of the system under test only, e.g. the ego state and the surrounding objects to evaluate a closed-loop planner by its time to collision, or compare them with ground truth, e.g. the predictions of a perception algorithm with the labels of a dataset. The node subscribes to all declared topics, matches their messages into samples by their stamp, and passes the messages of each sample by the names of their topics.
To contribute a new evaluation for a dataset or evaluation protocol:
Evaluation.prediction:=/topic, mapped to its ROS message type:required_inputs(): the topics of the system under test that are evaluated (required).required_ground_truth(): the reference the inputs are compared with, e.g. dataset labels (optional, none by default).optional_ground_truth(): ground truth that enriches the evaluation without being necessary for it, e.g. dataset annotations that not every dataset publishes (optional, none by default). A sample only waits for its message while its topic has a publisher; otherwise, the message is passed as None.derived_topics(): topics published next to another one, e.g. meta information on <label topic>/meta_info, which follow that topic instead of being configured on their own (optional).compute_sample_metrics(), whose parameters are named after the declared topics, and compute_aggregated_metrics(). Optionally, implement visualization_outputs() and visualize_sample() to publish a per-sample visualization for RViz.__init__ (thresholds, per-class ranges, and metric rules as instance attributes); keep static lookup tables (e.g. class names) as module-level _CONSTANT_NAME constants.EVALUATIONS of registry.py so it can be selected via the evaluation:=<name> launch argument, add comprehensive tests in tests/evaluations/ following existing test patterns, and update the documentation with evaluation details, metrics table, dataset requirements, and the topics it reads.An evaluation that is specific to a system under test can also stay in a package of its own. The node loads it by its module and class, e.g. evaluation:=my_package.evaluations:TimeToCollision, as long as the module is importable in the environment of the node: