def assign_label_to_voxel_v3(gt_boxes, coors, voxel_size, coors_range):
    'assign a 0/1 label to each voxel based on whether\n    the center of voxel is in gt_box. LIDAR.\n    '
    voxel_size = np.array(voxel_size, dtype=gt_boxes.dtype)
    coors_range = np.array(coors_range, dtype=gt_boxes.dtype)
    shift = coors_range[:3]
    voxel_origins = ((coors[:, ::(- 1)] * voxel_size) + shift)
    voxel_maxes = (voxel_origins + voxel_size)
    voxel_minmax = np.concatenate([voxel_origins, voxel_maxes], axis=(- 1))
    voxel_corners = minmax_to_corner_3d(voxel_minmax)
    gt_box_corners = center_to_corner_box3d(gt_boxes[:, :3], gt_boxes[:, 3:6], gt_boxes[:, 6], origin=[0.5, 0.5, 0.5], axis=2)
    gt_surfaces = corner_to_surfaces_3d(gt_box_corners)
    voxel_corners_flat = voxel_corners.reshape([(- 1), 3])
    ret = points_in_convex_polygon_3d_jit(voxel_corners_flat, gt_surfaces)
    ret = ret.reshape([(- 1), 8, ret.shape[(- 1)]])
    return ret.any((- 1)).any((- 1)).astype(np.int64)
assign a 0/1 label to each voxel based on whether
the center of voxel is in gt_box. LIDAR.
def assign_label_to_voxel_v3(gt_boxes, coors, voxel_size, coors_range):
    'assign a 0/1 label to each voxel based on whether\n    the center of voxel is in gt_box. LIDAR.\n    '
    voxel_size = np.array(voxel_size, dtype=gt_boxes.dtype)
    coors_range = np.array(coors_range, dtype=gt_boxes.dtype)
    shift = coors_range[:3]
    voxel_origins = ((coors[:, ::(- 1)] * voxel_size) + shift)
    voxel_maxes = (voxel_origins + voxel_size)
    voxel_minmax = np.concatenate([voxel_origins, voxel_maxes], axis=(- 1))
    voxel_corners = minmax_to_corner_3d(voxel_minmax)
    gt_box_corners = center_to_corner_box3d(gt_boxes[:, :3], gt_boxes[:, 3:6], gt_boxes[:, 6], origin=[0.5, 0.5, 0.5], axis=2)
    gt_surfaces = corner_to_surfaces_3d(gt_box_corners)
    voxel_corners_flat = voxel_corners.reshape([(- 1), 3])
    ret = points_in_convex_polygon_3d_jit(voxel_corners_flat, gt_surfaces)
    ret = ret.reshape([(- 1), 8, ret.shape[(- 1)]])
    return ret.any((- 1)).any((- 1)).astype(np.int64)