Skip to content

Commit c5426fb

Browse files
committed
Fix typing issues in vision
1 parent 3ef6bc1 commit c5426fb

File tree

1 file changed

+3
-3
lines changed
  • bitbots_vision/bitbots_vision/vision_modules/yoeo

1 file changed

+3
-3
lines changed

bitbots_vision/bitbots_vision/vision_modules/yoeo/utils.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import cv2
66
import numpy as np
77
import rclpy
8-
from jaxtyping import UInt8
8+
from jaxtyping import Float64, UInt8
99

1010
logger = rclpy.logging.get_logger("yoeo_handler_utils")
1111

@@ -158,10 +158,10 @@ def get_info(self) -> ImagePreProcessorData:
158158
padding_bottom=self._padding_bottom,
159159
padding_left=self._padding_left,
160160
padding_right=self._padding_right,
161-
max_dim=np.max(self._image_dimensions_HW),
161+
max_dim=int(np.max(self._image_dimensions_HW)),
162162
)
163163

164-
def process(self, image: UInt8[np.ndarray, "h w 3"]) -> UInt8[np.ndarray, "3 network_input_h network_input_w"]:
164+
def process(self, image: UInt8[np.ndarray, "h w 3"]) -> Float64[np.ndarray, "3 network_input_h network_input_w"]:
165165
self._image_dimensions_HW = image.shape[:2] # type: ignore[assignment]
166166
self._calculate_paddings()
167167

0 commit comments

Comments
 (0)