imaginaire.model_utils.wc_vid2vid package

Submodules

imaginaire.model_utils.wc_vid2vid.render module

class imaginaire.model_utils.wc_vid2vid.render.SplatRenderer[source]

Bases: object

Splatting 3D point cloud into image using precomputed mapping.

num_points()[source]

Number of points with assigned colors.

render_image(point_info, w, h, return_mask=False)[source]

Creates image of (h, w) and fills in colors. :param point_info: (i, j, 3D point idx) per row containing :type point_info: N x 3 :param mapping of image pixel to 3D point in point cloud.: :param w: Width of output image. :type w: int :param h: Height of output image. :type h: int :param return_mask: Return binary mask of coloring. :type return_mask: bool

Returns

  • output (H x W x 3, uint8): Image formed with mapping and colors.

  • mask (H x W x 1, uint8): Binary (255 or 0) mask of colorization.

Return type

(tuple)

reset()[source]

Reset the renderer.

update_point_cloud(image, point_info)[source]

Updates point cloud with new points and colors. :param image: Select colors from this image to assign to :type image: H x W x 3, uint8 :param 3D points which do not have previously assigned colors.: :param point_info: (i, j, 3D point idx) per row containing :type point_info: N x 3 :param mapping of image pixel to 3D point in point cloud.:

imaginaire.model_utils.wc_vid2vid.render.decode_unprojections(data)[source]

Unpickle unprojections and make array. :param data: Each pickled string has keypoint mapping :type data: array of pickled info :param info.:

Returns

Keys are the different resolutions, and values are padded mapping information.

Return type

output (dict)

Module contents