π Geometric Computer Vision Library for Spatial AI
Python artificial-intelligencecomputer-visiondeep-learninghacktoberfestimage-processingmachine-learningneural-networkpythonpytorchroboticsspatial-ai
[Docs] Minor spelling tweaks (#818)
brett koonce40cd17df51f4
diff --git a/docs/source/augmentation.rst b/docs/source/augmentation.rstindex 29a074688..5d5d339d3 100644--- a/docs/source/augmentation.rst+++ b/docs/source/augmentation.rst@@ -5,17 +5,17 @@ kornia.augmentationThe classes in this section perform various data augmentation operations.-Kornia provides Torchvision-like augmentation APIs while may not reproduce Torchvision, because Kornia is a library aligns to OpenCV functionalities, not PIL. Besides, pure floating computation is used in Kornia which gaurentees a better precision without any float -> uint8 conversions. To be specified, the different functions are:+Kornia provides Torchvision-like augmentation APIs while may not reproduce Torchvision, because Kornia is a library aligns to OpenCV functionalities, not PIL. Besides, pure floating computation is used in Kornia which guarantees a better precision without any float -> uint8 conversions. To be specified, the different functions are:- AdjustContrast- AdjustBrightness-For detailed comparision, please checkout the `Colab: Kornia Playground <https://colab.research.google.com/drive/1T20UNAG4SdlE2n2wstuhiewve5Q81VpS#revisionId=0B4unZG1uMc-WR3NVeTBDcmRwN0NxcGNNVlUwUldPMVprb1dJPQ>`_.+For detailed comparison, please checkout the `Colab: Kornia Playground <https://colab.research.google.com/drive/1T20UNAG4SdlE2n2wstuhiewve5Q81VpS#revisionId=0B4unZG1uMc-WR3NVeTBDcmRwN0NxcGNNVlUwUldPMVprb1dJPQ>`_.Containers-----------This is the base class for creating a new transform. The user only needs to overrive: `generate_parameters`, `apply_transform` and optionally, `compute_transformation`.+This is the base class for creating a new transform. The user only needs to override: `generate_parameters`, `apply_transform` and optionally, `compute_transformation`... autoclass:: AugmentationBase2Ddiff --git a/docs/source/faqs.rst b/docs/source/faqs.rstindex c11180d0f..f09ecb739 100644--- a/docs/source/faqs.rst+++ b/docs/source/faqs.rst@@ -27,7 +27,7 @@ we decided to rename the whole package and focus to more generic vision functionKornia relation to Other Computer Vision Projects--------------------------------------------------The project mimics some of the functionalities found in OpenCV. Eventhough+The project mimics some of the functionalities found in OpenCV. Even thoughthe project is backed up by the `OpenCV.org <www.opencv.org/>`_, there is nointention at all to merge in any form both projects. *Kornia* is meant toprovide differentiable operators to train nets, while *OpenCV* scope is inference.diff --git a/docs/source/geometry.camera.pinhole.rst b/docs/source/geometry.camera.pinhole.rstindex 3835bc59b..1a3f1acde 100644--- a/docs/source/geometry.camera.pinhole.rst+++ b/docs/source/geometry.camera.pinhole.rst@@ -40,11 +40,11 @@ orwhere:* :math:`M'` is a 3D point in space with coordinates :math:`[X,Y,Z]^T` expressed in a Euclidean coordinate system.* :math:`m'` is the projection of the 3D point :math:`M'` onto the *image plane* with coordinates :math:`[u,v]^T` expressed in pixel units.- * :math:`K` is the *camera calibration matrix*, also refered as the instrinsics parameters matrix.+ * :math:`K` is the *camera calibration matrix*, also referred as the intrinsics parameters matrix.* :math:`C` is the *principal point offset* with coordinates :math:`[u_0, v_0]^T` at the origin in the image plane.* :math:`fx, fy` are the focal lengths expressed in pixel units.-The camera rotation and translation are expressed in terms of Euclidean coordinate frame, also known as the *world coordinates system*. This terms are usually expressed by the joint rotation-translation matrix :math:`[R|t]`, or also called as the extrinsics parameters matrix. It is used to describe the camera pose around a static scene and translates the coordinates of a 3D point :math:`(X,Y,Z)` to a coordinate sytstem respect to the camera.+The camera rotation and translation are expressed in terms of Euclidean coordinate frame, also known as the *world coordinates system*. This terms are usually expressed by the joint rotation-translation matrix :math:`[R|t]`, or also called as the extrinsics parameters matrix. It is used to describe the camera pose around a static scene and translates the coordinates of a 3D point :math:`(X,Y,Z)` to a coordinate system respect to the camera... autoclass:: PinholeCamera:members:diff --git a/docs/source/introduction.rst b/docs/source/introduction.rstindex 7a1cccf43..f695d9c21 100644--- a/docs/source/introduction.rst+++ b/docs/source/introduction.rst@@ -18,13 +18,13 @@ and low level image processing such as filtering and edge detection that operate1. **Differentiability** for commodity avoiding to write derivative functions for complex loss functions.- 2. **Transparency** to perform parallel or serial computing eitherin CPU or GPU devices using batches in a common API.+ 2. **Transparency** to perform parallel or serial computing in either CPU or GPU devices using batches in a common API.3. **Distributed** for computing large-scale applications.4. **Production** ready using the *JIT* compiler.-Hightlighted Features+Highlighted Features---------------------At a granular level, Kornia is a library that consists of the following components:diff --git a/kornia/augmentation/augmentation3d.py b/kornia/augmentation/augmentation3d.pyindex 0d731efe5..b0d576f05 100644--- a/kornia/augmentation/augmentation3d.py+++ b/kornia/augmentation/augmentation3d.py@@ -229,7 +229,7 @@ class RandomAffine3D(AugmentationBase3D):If ((a, b), (c, d), (e, f)), the scale is randomly sampled from the range a <= scale_x <= b,c <= scale_y <= d, e <= scale_z <= f. Will keep original scale by default.shear (sequence or float, optional): Range of degrees to select from.- If shear is a number, a shear to the 6 facets in the range (-shear, +shear) will be apllied.+ If shear is a number, a shear to the 6 facets in the range (-shear, +shear) will be applied.If shear is a tuple of 2 values, a shear to the 6 facets in the range (shear[0], shear[1]) will be applied.If shear is a tuple of 6 values, a shear to the i-th facet in the range (-shear[i], shear[i])will be applied.diff --git a/kornia/augmentation/functional/functional.py b/kornia/augmentation/functional/functional.pyindex ccaced34f..097b99001 100644--- a/kornia/augmentation/functional/functional.py+++ b/kornia/augmentation/functional/functional.py@@ -402,7 +402,7 @@ def apply_perspective(input (torch.Tensor): Tensor to be transformed with shape (H, W), (C, H, W), (B, C, H, W).params (Dict[str, torch.Tensor]):- params['start_points']: Tensor containing [top-left, top-right, bottom-right,- bottom-left] of the orignal image with shape Bx4x2.+ bottom-left] of the original image with shape Bx4x2.- params['end_points']: Tensor containing [top-left, top-right, bottom-right,bottom-left] of the transformed image with shape Bx4x2.flags (Dict[str, torch.Tensor]):@@ -788,7 +788,7 @@ def apply_motion_blur(input: torch.Tensor, params: Dict[str, torch.Tensor],CONSTANT = 0, REFLECT = 1, REPLICATE = 2, CIRCULAR = 3. Default: BorderType.CONSTANT.Returns:- torch.Tensor: Adjusted image with the shape as the inpute (\*, C, H, W).+ torch.Tensor: Adjusted image with the shape as the input (\*, C, H, W)."""kernel_size: int = cast(int, params['ksize_factor'].unique().item())diff --git a/kornia/augmentation/functional/functional3d.py b/kornia/augmentation/functional/functional3d.pyindex 010e831e1..6376aa19b 100644--- a/kornia/augmentation/functional/functional3d.py+++ b/kornia/augmentation/functional/functional3d.py@@ -447,7 +447,7 @@ def apply_perspective3d(input (torch.Tensor): Tensor to be transformed with shape (D, H, W), (C, D, H, W), (B, C, D, H, W).params (Dict[str, torch.Tensor]):- params['start_points']: Tensor containing [top-left, top-right, bottom-right,- bottom-left] of the orignal image with shape Bx8x3.+ bottom-left] of the original image with shape Bx8x3.- params['end_points']: Tensor containing [top-left, top-right, bottom-right,bottom-left] of the transformed image with shape Bx8x3.flags (Dict[str, torch.Tensor]):diff --git a/kornia/augmentation/random_generator/random_generator3d.py b/kornia/augmentation/random_generator/random_generator3d.pyindex c21b6a3e4..b31e199fd 100644--- a/kornia/augmentation/random_generator/random_generator3d.py+++ b/kornia/augmentation/random_generator/random_generator3d.py@@ -32,9 +32,9 @@ def random_rotation_generator3d(Returns:params Dict[str, torch.Tensor]: parameters to be passed for transformation.- - yaw (torch.Tensor): element-wise roataion yaws with a shape of (B,).- - pitch (torch.Tensor): element-wise roataion pitchs with a shape of (B,).- - roll (torch.Tensor): element-wise roataion rolls with a shape of (B,).+ - yaw (torch.Tensor): element-wise rotation yaws with a shape of (B,).+ - pitch (torch.Tensor): element-wise rotation pitches with a shape of (B,).+ - roll (torch.Tensor): element-wise rotation rolls with a shape of (B,)."""assert degrees.shape == torch.Size([3, 2]), f"'degrees' must be the shape of (3, 2). Got {degrees.shape}."_device, _dtype = _extract_device_dtype([degrees])@@ -439,8 +439,8 @@ def random_perspective_generator3d(Returns:params Dict[str, torch.Tensor]: parameters to be passed for transformation.- - src (torch.Tensor): perspecive source bounding boxes with a shape of (B, 8, 3).- - dst (torch.Tensor): perspecive target bounding boxes with a shape (B, 8, 3).+ - src (torch.Tensor): perspective source bounding boxes with a shape of (B, 8, 3).+ - dst (torch.Tensor): perspective target bounding boxes with a shape (B, 8, 3).Note:The generated random numbers are not reproducible across different devices and dtypes.diff --git a/kornia/augmentation/utils/helpers.py b/kornia/augmentation/utils/helpers.pyindex e05e63ce4..213cb842c 100644--- a/kornia/augmentation/utils/helpers.py+++ b/kornia/augmentation/utils/helpers.py@@ -197,7 +197,7 @@ def _adapted_rsampling(dist: torch.distributions.Distribution,same_on_batch=False) -> torch.Tensor:- r"""The uniform reparamiterized sampling function that accepts 'same_on_batch'.+ r"""The uniform reparameterized sampling function that accepts 'same_on_batch'.If same_on_batch is True, all values generated will be exactly same given a batch_size (shape[0]).By default, same_on_batch is set to False.diff --git a/kornia/augmentation/utils/param_validation.py b/kornia/augmentation/utils/param_validation.pyindex 3092d1b3c..a8884ccd3 100644--- a/kornia/augmentation/utils/param_validation.py+++ b/kornia/augmentation/utils/param_validation.py@@ -4,8 +4,8 @@ import torchdef _common_param_check(batch_size: int, same_on_batch: Optional[bool] = None):- """Valid batch_szie and same_on_batch params."""- assert type(batch_size) == int and batch_size >= 0, f"`batchsize` shall be a positive integer. Got {batch_size}."+ """Valid batch_size and same_on_batch params."""+ assert type(batch_size) == int and batch_size >= 0, f"`batch_size` shall be a positive integer. Got {batch_size}."if same_on_batch is not None:assert type(same_on_batch) == bool, f"`same_on_batch` shall be boolean. Got {same_on_batch}."@@ -87,7 +87,7 @@ def _tuple_range_reader(target_size: int) -> torch.Tensor:"""- Given target_size, it will generate the correponding (target_size, 2) range tensor for element-wise params.+ Given target_size, it will generate the corresponding (target_size, 2) range tensor for element-wise params.Example:>>> degree = torch.tensor([0.2, 0.3])diff --git a/kornia/enhance/adjust.py b/kornia/enhance/adjust.pyindex c07a4f6a3..f82d48279 100644--- a/kornia/enhance/adjust.py+++ b/kornia/enhance/adjust.py@@ -274,7 +274,7 @@ def adjust_contrast(input: torch.Tensor,Args:input (torch.Tensor): Image to be adjusted in the shape of :math:`(*, N)`.contrast_factor (Union[float, torch.Tensor]): Contrast adjust factor per element- in the batch. 0 generates a compleatly black image, 1 does not modify+ in the batch. 0 generates a completely black image, 1 does not modifythe input image while any other non-negative number modify thebrightness by this factor.@@ -695,7 +695,7 @@ def equalize(input: torch.Tensor) -> torch.Tensor:https://github.com/tensorflow/tpu/blob/5f71c12a020403f863434e96982a840578fdd127/models/official/efficientnet/autoaugment.py#L355Args:- input (torch.Tensor): image tensor to equalizr with shapes like :math:`(C, H, W)` or :math:`(B, C, H, W)`.+ input (torch.Tensor): image tensor to equalize with shapes like :math:`(C, H, W)` or :math:`(B, C, H, W)`.Returns:torch.Tensor: Sharpened image or images with shape as the input.@@ -758,7 +758,7 @@ class AdjustSaturation(nn.Module):Shape:- Input: Image/Tensor to be adjusted in the shape of :math:`(*, 3, H, W)`.- - Ouput: Adjusted image in the shape of :math:`(*, 3, H, W)`.+ - Output: Adjusted image in the shape of :math:`(*, 3, H, W)`.Example:>>> x = torch.ones(1, 3, 3, 3)@@ -880,7 +880,7 @@ class AdjustContrast(nn.Module):Args:contrast_factor (Union[float, torch.Tensor]): Contrast adjust factor per element- in the batch. 0 generates a compleatly black image, 1 does not modify+ in the batch. 0 generates a completely black image, 1 does not modifythe input image while any other non-negative number modify thebrightness by this factor.diff --git a/kornia/enhance/zca.py b/kornia/enhance/zca.pyindex b8011f760..f5a53d478 100644--- a/kornia/enhance/zca.py+++ b/kornia/enhance/zca.py@@ -28,13 +28,13 @@ class ZCAWhitening(nn.Module):\mathbf{X}_{\text{zca}} = (\mathbf{X - \mu})(US^{-\frac{1}{2}}U^T)^T- where :math:`U` are the eigenvectors of :math:`\Sigma` and :math:`S` contain the correpsonding+ where :math:`U` are the eigenvectors of :math:`\Sigma` and :math:`S` contain the correspondingeigenvalues of :math:`\Sigma`. After the transform is applied, the output is reshaped to same shape.args:dim (int): Determines the dimension that represents the samples axis. Default = 0- eps (float) : a small number used for numerial stablility. Default=1e-6+ eps (float) : a small number used for numerical stability. Default=1e-6unbiased (bool): Whether to use the biased estimate of the covariance matrix. Default=Falsecompute_inv (bool): Compute the inverse transform matrix. Default=Falsedetach_transforms (bool): Detaches gradient from the ZCA fitting. Default=True@@ -58,7 +58,7 @@ class ZCAWhitening(nn.Module):Note:This implementation uses :py:meth:`~torch.svd` which yields NaNs in the backwards step- if the sigular values are not unique. See `here <https://pytorch.org/docs/stable/torch.html#torch.svd>`_ for+ if the singular values are not unique. See `here <https://pytorch.org/docs/stable/torch.html#torch.svd>`_ formore information.References:@@ -273,7 +273,7 @@ def zca_whiten(inp: torch.Tensor, dim: int = 0,inp (torch.Tensor) : input data tensordim (int): Specifies the dimension that serves as the samples dimension. Default = 0unbiased (bool): Whether to use the unbiased estimate of the covariance matrix. Default = True- eps (float) : a small number used for numerial stablility. Default = 0+ eps (float) : a small number used for numerical stability. Default = 0returns:diff --git a/kornia/feature/hardnet.py b/kornia/feature/hardnet.pyindex b9d392849..f9ade3d2b 100644--- a/kornia/feature/hardnet.py+++ b/kornia/feature/hardnet.py@@ -20,7 +20,7 @@ class HardNet(nn.Module):pretrained: (bool) Download and set pretrained weights to the model. Default: false.Returns:- torch.Tensor: HardeNet descriptor of the patches.+ torch.Tensor: HardNet descriptor of the patches.Shape:- Input: (B, 1, 32, 32)diff --git a/kornia/feature/matching.py b/kornia/feature/matching.pyindex e3898eef8..df217ffde 100644--- a/kornia/feature/matching.py+++ b/kornia/feature/matching.py@@ -4,7 +4,7 @@ from typing import Tuple, Optionaldef match_nn(desc1: torch.Tensor, desc2: torch.Tensor,dm: Optional[torch.Tensor] = None) -> Tuple[torch.Tensor, torch.Tensor]:- r"""Function, which finds nearest neightbors in desc2 for each vector in desc1.+ r"""Function, which finds nearest neighbors in desc2 for each vector in desc1.If the distance matrix dm is not provided, torch.cdist(desc1, desc2) is used.@@ -35,7 +35,7 @@ def match_nn(desc1: torch.Tensor, desc2: torch.Tensor,def match_mnn(desc1: torch.Tensor, desc2: torch.Tensor,dm: Optional[torch.Tensor] = None) -> Tuple[torch.Tensor, torch.Tensor]:- """Function, which finds mutual nearest neightbors in desc2 for each vector in desc1.+ """Function, which finds mutual nearest neighbors in desc2 for each vector in desc1.If the distance matrix dm is not provided, torch.cdist(desc1, desc2) is used.@@ -77,7 +77,7 @@ def match_mnn(desc1: torch.Tensor, desc2: torch.Tensor,def match_snn(desc1: torch.Tensor, desc2: torch.Tensor,th: float = 0.8, dm: Optional[torch.Tensor] = None) -> Tuple[torch.Tensor, torch.Tensor]:- """Function, which finds nearest neightbors in desc2 for each vector in desc1.+ """Function, which finds nearest neighbors in desc2 for each vector in desc1.which satisfy first to second nearest neighbor distance <= th.If the distance matrix dm is not provided, torch.cdist(desc1, desc2) is used.@@ -116,7 +116,7 @@ def match_snn(desc1: torch.Tensor, desc2: torch.Tensor,def match_smnn(desc1: torch.Tensor, desc2: torch.Tensor,th: float = 0.8, dm: Optional[torch.Tensor] = None) -> Tuple[torch.Tensor, torch.Tensor]:- """Function, which finds mutual nearest neightbors in desc2 for each vector in desc1.+ """Function, which finds mutual nearest neighbors in desc2 for each vector in desc1.which satisfy first to second nearest neighbor distance <= th.If the distance matrix dm is not provided, torch.cdist(desc1, desc2) is used.diff --git a/kornia/feature/responses.py b/kornia/feature/responses.pyindex a5fd724dc..b96633407 100644--- a/kornia/feature/responses.py+++ b/kornia/feature/responses.py@@ -263,7 +263,7 @@ def hessian_response(input: torch.Tensor,def dog_response(input: torch.Tensor) -> torch.Tensor:- r"""Computes the Difference-of-Gaussian responce given the Gaussian 5d input:+ r"""Computes the Difference-of-Gaussian response given the Gaussian 5d input:Args:diff --git a/kornia/feature/scale_space_detector.py b/kornia/feature/scale_space_detector.pyindex 767f22646..deb78b2d2 100644--- a/kornia/feature/scale_space_detector.py+++ b/kornia/feature/scale_space_detector.py@@ -15,7 +15,7 @@ from kornia.geometry.transform import ScalePyramiddef _scale_index_to_scale(max_coords: torch.Tensor, sigmas: torch.Tensor, num_levels: int) -> torch.Tensor:- """Auxilary function for ScaleSpaceDetector. Converts scale level index from ConvSoftArgmax3d+ """Auxiliary function for ScaleSpaceDetector. Converts scale level index from ConvSoftArgmax3dto the actual scale, using the sigmas from the ScalePyramid outputArgs:max_coords: (torch.Tensor): tensor [BxNx3].@@ -56,7 +56,7 @@ class ScaleSpaceDetector(nn.Module):Args:num_features: (int) Number of features to detect. default = 500. In order to keep everything batchable,- output would always have num_features outputed, even for completely homogeneous images.+ output would always have num_features output, even for completely homogeneous images.mr_size: (float), default 6.0. Multiplier for local feature scale compared to the detection scale.6.0 is matching OpenCV 12.0 convention for SIFT.scale_pyr_module: (nn.Module), which generates scale pyramid.@@ -193,7 +193,7 @@ class ScaleSpaceDetector(nn.Module):Args:img (torch.Tensor): image to extract features with shape [BxCxHxW]mask (torch.Tensor, optional): a mask with weights where to apply the- response function. The shae must same as the input image.+ response function. The shape must be the same as the input image.Returns:lafs (torch.Tensor): shape [BxNx2x3]. Detected local affine frames.diff --git a/kornia/filters/gaussian.py b/kornia/filters/gaussian.pyindex 058b0ebdd..c09093969 100644--- a/kornia/filters/gaussian.py+++ b/kornia/filters/gaussian.py@@ -11,7 +11,7 @@ class GaussianBlur2d(nn.Module):r"""Creates an operator that blurs a tensor using a Gaussian filter.The operator smooths the given tensor with a gaussian kernel by convolving- it to each channel. It suports batched operation.+ it to each channel. It supports batched operation.Arguments:kernel_size (Tuple[int, int]): the size of the kernel.diff --git a/kornia/filters/motion.py b/kornia/filters/motion.pyindex d0f9f8e47..3fb26661f 100644--- a/kornia/filters/motion.py+++ b/kornia/filters/motion.py@@ -126,11 +126,11 @@ def motion_blur(Example:>>> input = torch.randn(1, 3, 80, 90).repeat(2, 1, 1, 1)- >>> # perform exact motion blur accross the batch+ >>> # perform exact motion blur across the batch>>> out_1 = motion_blur(input, 5, 90., 1)>>> torch.allclose(out_1[0], out_1[1])True- >>> # perform element-wise motion blur accross the batch+ >>> # perform element-wise motion blur across the batch>>> out_1 = motion_blur(input, 5, torch.tensor([90., 180,]), torch.tensor([1., -1.]))>>> torch.allclose(out_1[0], out_1[1])False@@ -164,11 +164,11 @@ def motion_blur3d(Example:>>> input = torch.randn(1, 3, 120, 80, 90).repeat(2, 1, 1, 1, 1)- >>> # perform exact motion blur accross the batch+ >>> # perform exact motion blur across the batch>>> out_1 = motion_blur3d(input, 5, (0., 90., 90.), 1)>>> torch.allclose(out_1[0], out_1[1])True- >>> # perform element-wise motion blur accross the batch+ >>> # perform element-wise motion blur across the batch>>> out_1 = motion_blur3d(input, 5, torch.tensor([[0., 90., 90.], [90., 180., 0.]]), torch.tensor([1., -1.]))>>> torch.allclose(out_1[0], out_1[1])Falsediff --git a/kornia/filters/sobel.py b/kornia/filters/sobel.pyindex bea48e94d..8284e7aa5 100644--- a/kornia/filters/sobel.py+++ b/kornia/filters/sobel.py@@ -124,7 +124,7 @@ class Sobel(nn.Module):r"""Computes the Sobel operator and returns the magnitude per channel.Return:- torch.Tensor: the sobel edge gradient maginitudes map.+ torch.Tensor: the sobel edge gradient magnitudes map.Args:normalized (bool): if True, L1 norm of the kernel is set to 1.diff --git a/kornia/geometry/camera/pinhole.py b/kornia/geometry/camera/pinhole.pyindex faac2c854..b69d4ad41 100644--- a/kornia/geometry/camera/pinhole.py+++ b/kornia/geometry/camera/pinhole.py@@ -23,7 +23,7 @@ class PinholeCamera:.. note::We assume that the class attributes are in batch form in order to take- advantage of PyTorch parallelism to boost computing performce.+ advantage of PyTorch parallelism to boost computing performance."""def __init__(self, intrinsics: torch.Tensor,@@ -107,7 +107,7 @@ class PinholeCamera:@propertydef fy(self) -> torch.Tensor:- r"""Returns the focal lenght in the y-direction.+ r"""Returns the focal length in the y-direction.Returns:torch.Tensor: tensor of shape :math:`(B)`diff --git a/kornia/geometry/epipolar/essential.py b/kornia/geometry/epipolar/essential.pyindex e8106215f..5499a87a9 100644--- a/kornia/geometry/epipolar/essential.py+++ b/kornia/geometry/epipolar/essential.py@@ -231,7 +231,7 @@ def relative_camera_motion(t2 (torch.Tensor): The second camera translation vector with shape :math:`(*, 3, 1)`.Returns:- Tuple[torch.Tensor, torch.Tensor]: A tuple with the relatice rotation matrix and+ Tuple[torch.Tensor, torch.Tensor]: A tuple with the relative rotation matrix andtranslation vector with the shape of :math:`[(*, 3, 3), (*, 3, 1)]`."""diff --git a/kornia/geometry/epipolar/fundamental.py b/kornia/geometry/epipolar/fundamental.pyindex c22911782..b8be680de 100644--- a/kornia/geometry/epipolar/fundamental.py+++ b/kornia/geometry/epipolar/fundamental.py@@ -18,7 +18,7 @@ def normalize_points(points: torch.Tensor, eps: float = 1e-8) -> Tuple[torch.TenArgs:points (torch.Tensor): Tensor containing the points to be normalized with shape :math:`(B, N, 2)`.- eps (float): epsilon value to avoid numerical unstabilities. Default: 1e-8.+ eps (float): epsilon value to avoid numerical instabilities. Default: 1e-8.Returns:Tuple[torch.Tensor, torch.Tensor]: tuple containing the normalized points in thediff --git a/kornia/geometry/epipolar/metrics.py b/kornia/geometry/epipolar/metrics.pyindex bdcd777be..301c51f94 100644--- a/kornia/geometry/epipolar/metrics.py+++ b/kornia/geometry/epipolar/metrics.py@@ -13,9 +13,9 @@ def sampson_epipolar_distance(pts1: torch.Tensor,Args:pts1 (torch.Tensor): correspondences from the left images with shape- (B, N, 2 or 3). If they are not homogenuous, converted automatically.+ (B, N, 2 or 3). If they are not homogeneous, converted automatically.pts2 (torch.Tensor): correspondences from the right images with shape- (B, N, 2 or 3). If they are not homogenuous, converted automatically.+ (B, N, 2 or 3). If they are not homogeneous, converted automatically.Fm (torch.Tensor): Fundamental matrices with shape :math:`(B, 3, 3)`. Called Fm toavoid ambiguity with torch.nn.functional.squared (bool): if True (default), the squared distance is returned.@@ -70,9 +70,9 @@ def symmetrical_epipolar_distance(pts1: torch.Tensor,Args:pts1 (torch.Tensor): correspondences from the left images with shape- (B, N, 2 or 3). If they are not homogenuous, converted automatically.+ (B, N, 2 or 3). If they are not homogeneous, converted automatically.pts2 (torch.Tensor): correspondences from the right images with shape- (B, N, 2 or 3). If they are not homogenuous, converted automatically.+ (B, N, 2 or 3). If they are not homogeneous, converted automatically.Fm (torch.Tensor): Fundamental matrices with shape :math:`(B, 3, 3)`. Called Fm toavoid ambiguity with torch.nn.functional.squared (bool): if True (default), the squared distance is returned.diff --git a/kornia/geometry/epipolar/projection.py b/kornia/geometry/epipolar/projection.pyindex 99b569413..d88e406ea 100644--- a/kornia/geometry/epipolar/projection.py+++ b/kornia/geometry/epipolar/projection.py@@ -177,10 +177,10 @@ def _nullspace(A):def projections_from_fundamental(F_mat: torch.Tensor) -> torch.Tensor:- r"""Get the projection matrices from the Fundamenal Matrix.+ r"""Get the projection matrices from the Fundamental Matrix.Args:- F_mat (torch.Tensor): the fundamenal matrix with the shape :math:`(*, 3, 3)`.+ F_mat (torch.Tensor): the fundamental matrix with the shape :math:`(*, 3, 3)`.Returns:torch.Tensor: The projection matrices with shape :math:`(*, 4, 4, 2)`.diff --git a/kornia/geometry/epipolar/triangulation.py b/kornia/geometry/epipolar/triangulation.pyindex 2d8b6b34e..cc35b8686 100644--- a/kornia/geometry/epipolar/triangulation.py+++ b/kornia/geometry/epipolar/triangulation.py@@ -13,7 +13,7 @@ def triangulate_points(P1: torch.Tensor, P2: torch.Tensor, points1: torch.TensorTriangulates the 3d position of 2d correspondences between several images.Reference: Internally it uses DLT method from Hartley/Zisserman 12.2 pag.312- The input points are assumend to be in homogeneous coordinate system and being inliers+ The input points are assumed to be in homogeneous coordinate system and being inlierscorrespondences. The method does not perform any robust estimation.Args:diff --git a/kornia/geometry/linalg.py b/kornia/geometry/linalg.pyindex d371e9a2f..33b81eaf4 100644--- a/kornia/geometry/linalg.py+++ b/kornia/geometry/linalg.py@@ -327,7 +327,7 @@ def perspective_transform_lafs(trans_01: torch.Tensor,if not trans_01.shape[0] == lafs_1.shape[0]:raise ValueError("Input batch size must be the same for both tensors")if (not (trans_01.shape[-1] == 3)) or (not (trans_01.shape[-2] == 3)):- raise ValueError("Tranformation should be homography")+ raise ValueError("Transformation should be homography")bs, n, _, _ = lafs_1.size()# First, we convert LAF to pointsthreepts_1 = kornia.feature.laf.laf_to_three_points(lafs_1)diff --git a/kornia/geometry/subpix/spatial_soft_argmax.py b/kornia/geometry/subpix/spatial_soft_argmax.pyindex e127ac7e3..3a1183246 100644--- a/kornia/geometry/subpix/spatial_soft_argmax.py+++ b/kornia/geometry/subpix/spatial_soft_argmax.py@@ -246,7 +246,7 @@ def conv_soft_argmax2d(input: torch.Tensor,normalized_coordinates (bool): whether to return the coordinates normalized in the range of [-1, 1]. Otherwise,it will return the coordinates in the range of the input shape. Default is True.eps (float): small value to avoid zero division. Default is 1e-8.- output_value (bool): if True, val is outputed, if False, only ij+ output_value (bool): if True, val is output, if False, only ijShape:- Input: :math:`(N, C, H_{in}, W_{in})`@@ -370,7 +370,7 @@ def conv_soft_argmax3d(input: torch.Tensor,normalized_coordinates (bool): whether to return the coordinates normalized in the range of [-1, 1]. Otherwise,it will return the coordinates in the range of the input shape. Default is False.eps (float): small value to avoid zero division. Default is 1e-8.- output_value (bool): if True, val is outputed, if False, only ij+ output_value (bool): if True, val is output, if False, only ijstrict_maxima_bonus (float): pixels, which are strict maxima will score (1 + strict_maxima_bonus) * value.This is needed for mimic behavior of strict NMS in classic local featuresShape:diff --git a/kornia/geometry/transform/imgwarp.py b/kornia/geometry/transform/imgwarp.pyindex 2bb172c4d..0ada14cc8 100644--- a/kornia/geometry/transform/imgwarp.py+++ b/kornia/geometry/transform/imgwarp.py@@ -33,7 +33,7 @@ def transform_warp_impl(src: torch.Tensor, dst_pix_trans_src_pix: torch.Tensor,dsize_src: Tuple[int, int], dsize_dst: Tuple[int, int],grid_mode: str, padding_mode: str,align_corners: bool) -> torch.Tensor:- """Compute the transform in normalized cooridnates and perform the warping.+ """Compute the transform in normalized coordinates and perform the warping."""dst_norm_trans_src_norm: torch.Tensor = normalize_homography(dst_pix_trans_src_pix, dsize_src, dsize_dst)diff --git a/kornia/geometry/transform/pyramid.py b/kornia/geometry/transform/pyramid.pyindex ce994c940..029428d25 100644--- a/kornia/geometry/transform/pyramid.py+++ b/kornia/geometry/transform/pyramid.py@@ -283,7 +283,7 @@ def build_pyramid(by recursively applying pyrDown to the previously built pyramid layers.Args:- input (torch.Tensor): the tensor to be used to constructuct the pyramid.+ input (torch.Tensor): the tensor to be used to construct the pyramid.max_level (int): 0-based index of the last (the smallest) pyramid layer.It must be non-negative.border_type (str): the padding mode to be applied before convolving.diff --git a/kornia/geometry/warp/depth_warper.py b/kornia/geometry/warp/depth_warper.pyindex 9603c480f..e8b31d3ad 100644--- a/kornia/geometry/warp/depth_warper.py+++ b/kornia/geometry/warp/depth_warper.py@@ -68,7 +68,7 @@ class DepthWarper(nn.Module):def compute_projection_matrix(self, pinhole_src: PinholeCamera) -> 'DepthWarper':- r"""Computes the projection matrix from the source to destinaion frame.+ r"""Computes the projection matrix from the source to destination frame."""if not isinstance(self._pinhole_dst, PinholeCamera):raise TypeError("Member self._pinhole_dst expected to be of class "diff --git a/kornia/geometry/warp/homography_warper.py b/kornia/geometry/warp/homography_warper.pyindex 45e58a75c..d2164ff46 100644--- a/kornia/geometry/warp/homography_warper.py+++ b/kornia/geometry/warp/homography_warper.py@@ -262,7 +262,7 @@ class HomographyWarper(nn.Module):elif _warped_grid is not None:if not _warped_grid.device == patch_src.device:raise TypeError("Patch and warped grid must be on the same device. \- Got patch.device: {} warped_grid.device: {}. Wheter \+ Got patch.device: {} warped_grid.device: {}. Whether \recall precompute_warp_grid() with the correct device \for the homograhy or change the patch device.".format(patch_src.device, _warped_grid.device))@@ -271,7 +271,7 @@ class HomographyWarper(nn.Module):align_corners=self.align_corners)else:raise RuntimeError("Unknown warping. If homographies are not provided \- they must be presetted using the method: \+ they must be preset using the method: \precompute_warp_grid().")return warped_patch@@ -336,7 +336,7 @@ def normalize_homography(dst_pix_trans_src_pix: torch.Tensor,r"""Normalize a given homography in pixels to [-1, 1].Args:- dst_pix_trans_src_pix (torch.Tensor): homography/ies from source to destiantion to be+ dst_pix_trans_src_pix (torch.Tensor): homography/ies from source to destination to benormalized. :math:`(B, 3, 3)`dsize_src (tuple): size of the source image (height, width).dsize_dst (tuple): size of the destination image (height, width).@@ -373,7 +373,7 @@ def normalize_homography3d(dst_pix_trans_src_pix: torch.Tensor,r"""Normalize a given homography in pixels to [-1, 1].Args:- dst_pix_trans_src_pix (torch.Tensor): homography/ies from source to destiantion to be+ dst_pix_trans_src_pix (torch.Tensor): homography/ies from source to destination to benormalized. :math:`(B, 4, 4)`dsize_src (tuple): size of the source image (depth, height, width).dsize_src (tuple): size of the destination image (depth, height, width).diff --git a/kornia/losses/tversky.py b/kornia/losses/tversky.pyindex 0a0d0b051..6167b3681 100644--- a/kornia/losses/tversky.py+++ b/kornia/losses/tversky.py@@ -54,7 +54,7 @@ def tversky_loss(input: torch.Tensor, target: torch.Tensor,class TverskyLoss(nn.Module):- r"""Criterion that computes Tversky Coeficient loss.+ r"""Criterion that computes Tversky Coefficient loss.According to [1], we compute the Tversky Coefficient as follows:diff --git a/kornia/testing/__init__.py b/kornia/testing/__init__.pyindex eacc8e21c..fc86bfe62 100644--- a/kornia/testing/__init__.py+++ b/kornia/testing/__init__.py@@ -23,7 +23,7 @@ def xla_is_available() -> bool:def create_checkerboard(h, w, nw):- """Creates a synthetic checkerd board of shape HxW and window size `nw`.+ """Creates a synthetic checkered board of shape HxW and window size `nw`."""return np.kron([[1, 0] * nw, [0, 1] * nw] * nw,np.ones((h // (2 * nw), w // (2 * nw)))).astype(np.float32)diff --git a/kornia/utils/metrics/confusion_matrix.py b/kornia/utils/metrics/confusion_matrix.pyindex ad32302dc..b0d705c79 100644--- a/kornia/utils/metrics/confusion_matrix.py+++ b/kornia/utils/metrics/confusion_matrix.py@@ -19,7 +19,7 @@ def confusion_matrix(values between 0 and K-1.target (torch.Tensor) : tensor with ground truth (correct) targetvalues. The shape can be :math:`(B, *)` and must contain integer- values between 0 and K-1, whete targets are assumed to be provided as+ values between 0 and K-1, where targets are assumed to be provided asone-hot vectors.num_classes (int): total possible number of classes in target.normalized: (Optional[bool]): wether to return the confusion matrix@@ -42,7 +42,7 @@ def confusion_matrix(raise ValueError("Inputs must be in the same device. ""Got: {} - {}".format(input.device, target.device))if not isinstance(num_classes, int) or num_classes < 2:- raise ValueError("The number of classes must be an intenger bigger "+ raise ValueError("The number of classes must be an integer bigger ""than two. Got: {}".format(num_classes))batch_size: int = input.shape[0]diff --git a/kornia/utils/metrics/mean_iou.py b/kornia/utils/metrics/mean_iou.pyindex d68b75079..c14730820 100644--- a/kornia/utils/metrics/mean_iou.py+++ b/kornia/utils/metrics/mean_iou.py@@ -19,7 +19,7 @@ def mean_iou(values between 0 and K-1.target (torch.Tensor) : tensor with ground truth (correct) targetvalues. The shape can be :math:`(B, *)` and must contain integer- values between 0 and K-1, whete targets are assumed to be provided as+ values between 0 and K-1, where targets are assumed to be provided asone-hot vectors.num_classes (int): total possible number of classes in target.@@ -40,7 +40,7 @@ def mean_iou(raise ValueError("Inputs must be in the same device. ""Got: {} - {}".format(input.device, target.device))if not isinstance(num_classes, int) or num_classes < 2:- raise ValueError("The number of classes must be an intenger bigger "+ raise ValueError("The number of classes must be an integer bigger ""than two. Got: {}".format(num_classes))# we first compute the confusion matrixconf_mat: torch.Tensor = confusion_matrix(input, target, num_classes)