visualize

Visualize code snippets for various task.

visualize

MemberSummary
argoverse.ArgoverseVizThe visiualize method of Argoverse result.
argoverse2.Argoverse2VizThe visiualize method of Argoverse2 result.
cam3d.Cam3dViz
cls.ClsVizThe viz method of classification result.
utils.ANCBEVImgStitcherRestore multi view pictures for bev tasks.
det.DetVizThe visiualize method of det result.
disparity.DispVizThe visualize method of disparity or depth pred result.
keypoints.KeypointsVizThe viz method of Keypoints predict result.
lane_lines.LanelineVizThe visualize method of Laneline detection result.
nuscenes.NuscenesVizThe visiualize method of Nuscenes result.
nuscenes_map.NuscenesMapVizThe visiualize method of Nuscenes result.
occ.OccVizThe visiualize method of occ result.
opticalflow.FlowVizThe visualize method of Flow_pred result.
seg.SegVizThe visualize method of segmentation result.
track.TrackVizThe visiualize method of object track result.

API Reference

class hat.visualize.argoverse.ArgoverseViz(traj_scale=50, is_plot=True)

The visiualize method of Argoverse result.

  • Parameters:
    • traj_scale – Scale for traj input feature.
    • is_plot – Whether to plot image.

class hat.visualize.argoverse2.Argoverse2Viz(num_historical_steps, num_future_steps, is_plot=True)

The visiualize method of Argoverse2 result.

  • Parameters:
    • traj_scale – Scale for traj input feature.
    • is_plot – Whether to plot image.

class hat.visualize.cls.ClsViz(is_plot: bool = False)

The viz method of classification result.

  • Parameters: is_plot (bool) – Whether to plot image.

class hat.visualize.utils.ANCBEVImgStitcher(camera_view_names: list, camera_layouts: list | None = None, per_extra_img_size: tuple = (960, 512), is_bev_horizon: bool = False, interpolation: int = 1, **kwargs)

Restore multi view pictures for bev tasks.

  • Parameters:
    • camera_view_names – the camera view names of the model.
    • camera_layouts – the customized layout of cameras for visualization. Support to visualize part of camera views. “tmp_img” denotes placeholder img with all zeros. Further, we support view expansion, if the name of the view in a line or a square area is the same.
    • per_extra_img_size – Multiview img sizes to visualize,(w, h).
    • is_bev_horizon – indicates whether the BEV image occupies the bottom row or the rightmost column.
    • interpolation – the interpolation mode of resizing bev_img.

class hat.visualize.det.DetViz(score_thresh: float = 0.5, absolute_coord: bool = True, is_plot: bool = True)

The visiualize method of det result.

  • Parameters:
    • score_thresh (float) – Score thresh for filtering box in plot.
    • absolute_coord (bool) – Coordinates of pred_box is absolute or not.
    • is_plot (bool) – Whether to plot image.

class hat.visualize.disparity.DispViz(is_plot: bool = True)

The visualize method of disparity or depth pred result.

  • Parameters: is_plot – Whether to plot image.

class hat.visualize.keypoints.KeypointsViz(threshold: float = 0.0, is_plot: bool = False)

The viz method of Keypoints predict result.

  • Parameters:
    • threshold – threshold of ploting keypoint prediction.
    • is_plot – Whether to plot image.

class hat.visualize.lane_lines.LanelineViz(is_plot: bool = True, thickness: int = 10, color: Tuple[int, int, int] = (255, 0, 0))

The visualize method of Laneline detection result.

  • Parameters:
    • is_plot – Whether to plot image.
    • thickness – The thickness of lane line.
    • color – The color of lane line.

class hat.visualize.nuscenes.NuscenesViz(bev_size: Tuple[float, float, float] | None = None, score_thresh: float = 0.4, is_plot: bool = True, use_bce: bool = False)

The visiualize method of Nuscenes result.

  • Parameters:
    • bev_size – Size of Bev size.
    • score_thresh – Score thresh for filtering box in plot.
    • is_plot – Whether to plot image.
    • use_bce – Whether use bce as segmentation result.

class hat.visualize.nuscenes_map.NuscenesMapViz(pc_range: Tuple[float, float, float] | None = None, score_thresh: float = 0.4, is_plot: bool = True, car_img_path: str | None = None, use_lidar: bool = True)

The visiualize method of Nuscenes result.

  • Parameters:
    • pc_range – Size of pc_range.
    • score_thresh – Score thresh for filtering box in plot.
    • is_plot – Whether to plot image.
    • car_img_path – Path of car img showed in bev coords.
    • use_lidar – Whether to use lidar coords.

class hat.visualize.occ.OccViz(ignore_idx: int = -1, vcs_range: Tuple[float] = (-40.0, -40.0, -1.0, 40.0, 40.0, 5.4), voxel_size: Tuple[float] = (0.4, 0.4, 0.4), vis_bev_2d: bool = False, vis_occ_3d: bool = False)

The visiualize method of occ result.

  • Parameters:
    • ignore_idx – the idx will ignore.
    • vcs_range – vcs range.
    • voxel_size – voxel size.

prepare_for_3d_vis(occ_result)

Save the results as an npz file for further visualization.

show_occ_remap(fov_grid_coords)

Depicting three-dimensional semantic space through rendering.

class hat.visualize.opticalflow.FlowViz(is_plot: bool = True)

The visualize method of Flow_pred result.

  • Parameters: is_plot – Whether to plot image.

class hat.visualize.seg.SegViz(is_plot: bool, image_process: ~typing.Callable = <function _default_image_process>, label_process: ~typing.Callable = <function _seg_target_process>)

The visualize method of segmentation result.

  • Parameters:
    • image_process (Callable) – Process of image.
    • label_process (Callable) – Process of label.

class hat.visualize.track.TrackViz(is_plot: bool = True)

The visiualize method of object track result.

  • Parameters: is_plot (bool) – Whether to plot image.
页面目录