visualize
Visualize code snippets for various task.
visualize
| Member | Summary |
|---|
argoverse.ArgoverseViz | The visiualize method of Argoverse result. |
argoverse2.Argoverse2Viz | The visiualize method of Argoverse2 result. |
cam3d.Cam3dViz | |
cls.ClsViz | The viz method of classification result. |
utils.ANCBEVImgStitcher | Restore multi view pictures for bev tasks. |
det.DetViz | The visiualize method of det result. |
disparity.DispViz | The visualize method of disparity or depth pred result. |
keypoints.KeypointsViz | The viz method of Keypoints predict result. |
lane_lines.LanelineViz | The visualize method of Laneline detection result. |
nuscenes.NuscenesViz | The visiualize method of Nuscenes result. |
nuscenes_map.NuscenesMapViz | The visiualize method of Nuscenes result. |
occ.OccViz | The visiualize method of occ result. |
opticalflow.FlowViz | The visualize method of Flow_pred result. |
seg.SegViz | The visualize method of segmentation result. |
track.TrackViz | The 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.
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.