ops3d

pointcloud2img

stardust.geometry.ops3d.projection.project2img.pointcloud2img(frame_info, cam_idx, points_3d, img_path=None, res_save_path=None, visual=False)[source]

Project 3D points on images

Args:

frame_info: Dict

cam_idx: int

dfsghj

points_3d: np.ndarray (N, 3)

ghj

Return:

img_pixels: (N, 2)

corner_align

stardust.geometry.ops3d.bbox.box_size_alignment.corner_align(box_3d, align_size)[source]

Implementation of corner align from paper https://arxiv.org/abs/2101.06586 Align shape based on original box: box_3d and new size: align_size

Args:
box_3d:

box in stardust coordiante, (x, y, z, …, heading)

align_size:

new size, (length on x axis, length on y axis, ..)

Return:

Aligned bounding box

obj_occluded_check

stardust.geometry.ops3d.bbox.occlusion.obj_occluded_check(points, img_info, save_bboxes, save_labels, save_scores, area_thr=0.7)[source]

Check if lidar objects are occluded on img

Args:
points:

point cloud points

img_info:

list of dicts contain img and cam info, you can get this through func: ./utils/projection/helper/decode_img_sources

save_bboxes:

bounding boxes

save_labels:

labels

save_scores:

conf scores

area_thr:

threshold for occlusion decision

Return:

occlusion mask, True means it is occluded

exclude_reflector

stardust.geometry.ops3d.bbox.reflector.exclude_reflector(points, boxes, imagine, render_path)[source]

In some training scenario, model will have a higher precision when reflector of vehicles isn’t within the bounding box This function changes the size of bounding boxes to exclude reflectors This function assume there is at least one point in bbox

Args:
points:

point cloud points, (N, 3)

boxes:

bounding boxes, (M, 7)

imagine:

True means bounding box will imagine there is a reflector manually even though it is invisible from point cloud False means bounding box will not imagine there is a reflector manually if it is invisible

Return:

New bounding boxes, (M, 7)