def center_to_corner_box2d(centers, dims, angles=None, origin=0.5):
    'convert kitti locations, dimensions and angles to corners.\n    format: center(xy), dims(xy), angles(clockwise when positive)\n\n    Args:\n        centers (float array, shape=[N, 2]): locations in kitti label file.\n        dims (float array, shape=[N, 2]): dimensions in kitti label file.\n        angles (float array, shape=[N]): rotation_y in kitti label file.\n\n    Returns:\n        [type]: [description]\n    '
    corners = corners_nd(dims, origin=origin)
    if (angles is not None):
        corners = rotation_2d(corners, angles)
    corners += centers.reshape([(- 1), 1, 2])
    return corners
convert kitti locations, dimensions and angles to corners.
format: center(xy), dims(xy), angles(clockwise when positive)

Args:
    centers (float array, shape=[N, 2]): locations in kitti label file.
    dims (float array, shape=[N, 2]): dimensions in kitti label file.
    angles (float array, shape=[N]): rotation_y in kitti label file.

Returns:
    [type]: [description]
def center_to_corner_box2d(centers, dims, angles=None, origin=0.5):
    'convert kitti locations, dimensions and angles to corners.\n    format: center(xy), dims(xy), angles(clockwise when positive)\n\n    Args:\n        centers (float array, shape=[N, 2]): locations in kitti label file.\n        dims (float array, shape=[N, 2]): dimensions in kitti label file.\n        angles (float array, shape=[N]): rotation_y in kitti label file.\n\n    Returns:\n        [type]: [description]\n    '
    corners = corners_nd(dims, origin=origin)
    if (angles is not None):
        corners = rotation_2d(corners, angles)
    corners += centers.reshape([(- 1), 1, 2])
    return corners