MCPcopy Create free account
hub / github.com/MAC-VO/MAC-VO / plot_keypoints

Function plot_keypoints

Utility/Plot/PlotAxes.py:109–121  ·  view source on GitHub ↗
(ax: Axes, keypoints: torch.Tensor, depth_cov: torch.Tensor | None, **plot_kwargs)

Source from the content-addressed store, hash-verified

107@as_chain_func
108@IgnoreException
109def plot_keypoints(ax: Axes, keypoints: torch.Tensor, depth_cov: torch.Tensor | None, **plot_kwargs) -> Axes:
110 keypoints = keypoints.detach().cpu()
111 if depth_cov is not None:
112 ax.scatter(
113 keypoints[..., 0], keypoints[..., 1],
114 c=depth_cov.detach().cpu().numpy(),
115 cmap="plasma", plotnonfinite=True, edgecolors='none',
116 **plot_kwargs
117 )
118 else:
119 ax.scatter(keypoints[..., 0], keypoints[..., 1], plotnonfinite=True,
120 **plot_kwargs)
121 return ax
122
123@as_chain_func
124@IgnoreException

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected