mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-05-06 05:27:44 +03:00
ensure image is numpy array
This commit is contained in:
parent
b30de96525
commit
b522aaa1b6
@ -261,8 +261,10 @@ class LicensePlateDetector(BaseEmbedding):
|
|||||||
def _preprocess_inputs(self, raw_inputs):
|
def _preprocess_inputs(self, raw_inputs):
|
||||||
if isinstance(raw_inputs, list):
|
if isinstance(raw_inputs, list):
|
||||||
raise ValueError("License plate embedding does not support batch inputs.")
|
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
|
height, width, channels = img.shape
|
||||||
|
|
||||||
# Resize maintaining aspect ratio
|
# Resize maintaining aspect ratio
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user