nutonomy / nuscenes-devkit

The devkit of the nuScenes dataset.
https://www.nuScenes.org
Other
2.24k stars 617 forks source link

Why is class ID 0 skipped for the sMOTSA panoptic tracking eval? #910

Closed Ali2500 closed 1 year ago

Ali2500 commented 1 year ago

I noticed the following two lines of code in python-sdk/nuscenes/eval/panoptic/panoptic_track_evaluator.py#L339:

iou = self.pan_iou[1:self.min_stuff_cls_id].astype(np.double)
ids = self.pan_ids[1:self.min_stuff_cls_id].astype(np.double)

where self.pan_iou and self.pan_ids both have shape [num_classes]. I wanted to know why the first class ID is being skipped here? This corresponds to the BARRIER class. Is there something special about it?

whyekit-motional commented 1 year ago

@Ali2500 class ID 1 is not being skipped - in the code snippet you showed above, the arrays are being indexed starting from 1 ( [1:self.min_stuff_cls_id]), i.e. 1 is included

Ali2500 commented 1 year ago

@whyekit-motional Class ID 1 is not skipped, but class ID 0 is. My question was why ID 0 is being skipped. Since python has zero-based indexing, the 'first' ID would be 0.

whyekit-motional commented 1 year ago

@Ali2500 class ID 0 is the void / ignore class (see here), and so it is skipped during evaluation