π Geometric Computer Vision Library for Spatial AI
Python artificial-intelligencecomputer-visiondeep-learninghacktoberfestimage-processingmachine-learningneural-networkpythonpytorchroboticsspatial-ai
pin versions for pytest plugins and fix flake8 issues (#580)
Edgar Riba94a3d79129a2
diff --git a/kornia/augmentation/functional.py b/kornia/augmentation/functional.pyindex 1ca7c335e..bf05f7bee 100644--- a/kornia/augmentation/functional.py+++ b/kornia/augmentation/functional.py@@ -630,7 +630,7 @@ def apply_erase_rectangles(input: torch.Tensor, params: Dict[str, torch.Tensor])"""if not (params['widths'].size() == params['heights'].size() == params['xs'].size() == params['ys'].size()):raise TypeError(- f"''rectangle params components must have same shape"+ "rectangle params components must have same shape")input = _transform_input(input)diff --git a/kornia/augmentation/random_generator.py b/kornia/augmentation/random_generator.pyindex 3e9a520d3..84c911732 100644--- a/kornia/augmentation/random_generator.py+++ b/kornia/augmentation/random_generator.py@@ -482,11 +482,11 @@ def random_rectangles_params_generator("""if not (isinstance(scale[0], float) and isinstance(scale[1], float) and scale[0] > 0. and scale[1] > 0.):raise TypeError(- f"'erase_scale_range' must be a Tuple[float, float] with positive values"+ "'erase_scale_range' must be a Tuple[float, float] with positive values")if not (isinstance(ratio[0], float) and isinstance(ratio[1], float) and ratio[0] > 0. and ratio[1] > 0.):raise TypeError(- f"'ratio' must be a Tuple[float, float] with positive values"+ "'ratio' must be a Tuple[float, float] with positive values")batch_prob = random_prob_generator(batch_size, p, same_on_batch)['batch_prob']diff --git a/kornia/geometry/camera/pinhole.py b/kornia/geometry/camera/pinhole.pyindex a14153e76..05f637700 100644--- a/kornia/geometry/camera/pinhole.py+++ b/kornia/geometry/camera/pinhole.py@@ -52,7 +52,7 @@ class PinholeCamera:def _check_valid_params(data: torch.Tensor,data_name: str) -> bool:- if len(data.shape) not in (3, 4,) and data.shape[-2:] is not (4, 4):+ if len(data.shape) not in (3, 4,) and data.shape[-2:] != (4, 4):raise ValueError("Argument {0} shape must be in the following shape"" Bx4x4 or BxNx4x4. Got {1}".format(data_name,data.shape))diff --git a/requirements.txt b/requirements.txtindex ac2d75cd4..634d90399 100644--- a/requirements.txt+++ b/requirements.txt@@ -9,10 +9,10 @@ jupytermatplotlib# test-pytest>=5.1.2-pytest-flake8-pytest-cov-pytest-mypy+pytest==5.4.2+pytest-flake8==1.0.6+pytest-cov==2.9.0+pytest-mypy==0.6.2autopep8pydocstyle