draw_keypoints(image: torch.Tensor, keypoints: torch.Tensor, connectivity: Optional[List[Tuple[int, int]]] = None, colors: Optional[Union[str, Tuple[int, int, int]]] = None, radius: int = 2, width: int = 3) → torch.Tensor¶
Draws Keypoints on given RGB image. The values of the input image should be uint8 between 0 and 255.
image (Tensor) – Tensor of shape (3, H, W) and dtype uint8.
keypoints (Tensor) – Tensor of shape (num_instances, K, 2) the K keypoints location for each of the N instances, in the format [x, y].
colors (str, Tuple) – The color can be represented as PIL strings e.g. “red” or “#FF00FF”, or as RGB tuples e.g.
(240, 10, 157).
radius (int) – Integer denoting radius of keypoint.
width (int) – Integer denoting width of line connecting keypoints.
Image Tensor of dtype uint8 with keypoints drawn.
- Return type
img (Tensor[C, H, W])