Skip to content

Commit 0794bef

Browse files
author
Beat Buesser
committed
Update typing
Signed-off-by: Beat Buesser <[email protected]>
1 parent 5a7327d commit 0794bef

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

art/estimators/object_tracking/pytorch_goturn.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -505,8 +505,12 @@ def crop_pad_image(
505505
roi_bottom = min(pad_image_location[1], (image.shape[0] - 1)) # type: ignore
506506
# roi_width = min(image.shape[1], max(1.0, math.ceil(pad_image_location.x2 - pad_image_location.x1)))
507507
# roi_height = min(image.shape[0], max(1.0, math.ceil(pad_image_location.y2 - pad_image_location.y1)))
508-
roi_width = min(image.shape[1], max(1.0, math.ceil(pad_image_location[2] - pad_image_location[0]))) # type: ignore
509-
roi_height = min(image.shape[0], max(1.0, math.ceil(pad_image_location[3] - pad_image_location[1]))) # type: ignore
508+
roi_width = min( # type: ignore
509+
image.shape[1], max(1.0, math.ceil(pad_image_location[2] - pad_image_location[0]))
510+
)
511+
roi_height = min( # type: ignore
512+
image.shape[0], max(1.0, math.ceil(pad_image_location[3] - pad_image_location[1]))
513+
)
510514

511515
err = 0.000000001 # To take care of floating point arithmetic errors
512516
cropped_image = image[

0 commit comments

Comments
 (0)