vis4d.data.transforms.post_process

Post process after transformation.

Classes

PostProcessBoxes2D(*[, in_keys, out_keys, ...])

Post process after transformation.

RescaleTrackIDs(*[, in_keys, out_keys, ...])

Rescale track ids.

class PostProcessBoxes2D(*, in_keys=['boxes2d', 'boxes2d_classes', 'boxes2d_track_ids', 'input_hw', 'boxes3d', 'boxes3d_classes', 'boxes3d_track_ids'], out_keys=['boxes2d', 'boxes2d_classes', 'boxes2d_track_ids', 'boxes3d', 'boxes3d_classes', 'boxes3d_track_ids'], sensors=None, same_on_batch=True, **kwargs)[source]

Post process after transformation.

__call__(boxes_list, classes_list, track_ids_list, input_hw_list, boxes3d_list, boxes3d_classes_list, boxes3d_track_ids_list)[source]

Post process according to boxes2D after transformation.

Parameters:
  • boxes_list (list[NDArrayF32]) – The bounding boxes to be post processed.

  • classes_list (list[NDArrayF32]) – The classes of the bounding boxes.

  • track_ids_list (list[NDArrayI64] | None) – The track ids of the bounding boxes.

  • input_hw_list (list[tuple[int, int]]) – The height and width of the input image.

  • boxes3d_list (list[NDArrayF32] | None) – The 3D bounding boxes to be post processed.

  • boxes3d_classes_list (list[NDArrayI64] | None) – The classes of the 3D bounding boxes.

  • boxes3d_track_ids_list (list[NDArrayI64] | None) – The track ids of the 3D bounding boxes.

Return type:

tuple[list[ndarray[Any, dtype[float32]]], list[ndarray[Any, dtype[int64]]], list[ndarray[Any, dtype[int64]]] | None, list[ndarray[Any, dtype[float32]]] | None, list[ndarray[Any, dtype[int64]]] | None, list[ndarray[Any, dtype[int64]]] | None]

Returns:

tuple[list[NDArrayF32], list[NDArrayI64], list[NDArrayI64] | None,

list[NDArrayF32] | None, list[NDArrayI64] | None, list[NDArrayI64] | None]: The post processed results.

class RescaleTrackIDs(*, in_keys=['boxes2d_track_ids'], out_keys=['boxes2d_track_ids'], sensors=None, same_on_batch=True, **kwargs)[source]

Rescale track ids.

__call__(track_ids_list)[source]

Rescale the track ids.

Parameters:

track_ids_list (list[NDArrayI64]) – The track ids to be rescaled.

Returns:

The rescaled track ids.

Return type:

list[NDArrayI64]