🐍 Geometric Computer Vision Library for Spatial AI
Python artificial-intelligencecomputer-visiondeep-learninghacktoberfestimage-processingmachine-learningneural-networkpythonpytorchroboticsspatial-ai
add keypoints to the docs (#2330)
João Gustavo A. Amorim3dabbd45ec3e
diff --git a/docs/source/geometry.rst b/docs/source/geometry.rstindex a1b817585..eb3163e28 100644--- a/docs/source/geometry.rst+++ b/docs/source/geometry.rst@@ -46,6 +46,7 @@ transforms, camera, conversions, linalg and depth. We next describe each of themgeometry.bboxgeometry.boxes+ geometry.keypointsgeometry.calibrationgeometry.camerageometry.conversionsdiff --git a/kornia/geometry/keypoints.py b/kornia/geometry/keypoints.pyindex e3a6b2c5c..7710af75a 100644--- a/kornia/geometry/keypoints.py+++ b/kornia/geometry/keypoints.py@@ -5,12 +5,21 @@ import torchfrom kornia.core import Tensorfrom kornia.geometry import transform_points+__all__ = ['Keypoints', 'Keypoints3D']+def _merge_keypoint_list(keypoints: List[Tensor]) -> Tensor:raise NotImplementedErrorclass Keypoints:+ """2D Keypoints containing Nx2 or BxNx2 points.++ Args:+ keypoints: Raw tensor or a list of Tensors with the Nx2 coordinates+ raise_if_not_floating_point: will raise if the Tensor isn't float+ """+def __init__(self, keypoints: Union[Tensor, List[Tensor]], raise_if_not_floating_point: bool = True) -> None:self._N: Optional[List[int]] = None@@ -198,6 +207,13 @@ class VideoKeypoints(Keypoints):class Keypoints3D:+ """3D Keypoints containing Nx3 or BxNx3 points.++ Args:+ keypoints: Raw tensor or a list of Tensors with the Nx3 coordinates+ raise_if_not_floating_point: will raise if the Tensor isn't float+ """+def __init__(self, keypoints: Union[Tensor, List[Tensor]], raise_if_not_floating_point: bool = True) -> None:self._N: Optional[List[int]] = None