ensure image is numpy array

This commit is contained in:
Josh Hawkins 2025-03-26 07:00:56 -05:00
parent b30de96525
commit b522aaa1b6

View File

@ -261,8 +261,10 @@ class LicensePlateDetector(BaseEmbedding):
def _preprocess_inputs(self, raw_inputs):
if isinstance(raw_inputs, list):
raise ValueError("License plate embedding does not support batch inputs.")
# Get image as numpy array
img = self._process_image(raw_inputs)
pil = self._process_image(raw_inputs)
# image as numpy array
img = np.array(pil)
height, width, channels = img.shape
# Resize maintaining aspect ratio