π Geometric Computer Vision Library for Spatial AI
Python artificial-intelligencecomputer-visiondeep-learninghacktoberfestimage-processingmachine-learningneural-networkpythonpytorchroboticsspatial-ai
Ensure CenterCrop indices are integers (#1208)
dribnet5d94f8df18d4
diff --git a/kornia/augmentation/random_generator/random_generator.py b/kornia/augmentation/random_generator/random_generator.pyindex 6db364791..f81600a3d 100644--- a/kornia/augmentation/random_generator/random_generator.py+++ b/kornia/augmentation/random_generator/random_generator.py@@ -693,8 +693,8 @@ def center_crop_generator(src_h_half = src_h / 2src_w_half = src_w / 2- start_x = src_w_half - dst_w_half- start_y = src_h_half - dst_h_half+ start_x = int(src_w_half - dst_w_half)+ start_y = int(src_h_half - dst_h_half)end_x = start_x + dst_w - 1end_y = start_y + dst_h - 1