We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 64b110a commit 85dc3d5Copy full SHA for 85dc3d5
fast_plate_ocr/inference/process.py
@@ -2,6 +2,8 @@
2
Utility functions for processing model input/output.
3
"""
4
5
+import os
6
+
7
import cv2
8
import numpy as np
9
import numpy.typing as npt
@@ -14,6 +16,8 @@ def read_plate_image(image_path: str) -> npt.NDArray:
14
16
:param str image_path: The path to the license plate image.
15
17
:return: The image as a NumPy array.
18
19
+ if os.path.exists(image_path):
20
+ raise ValueError(f"{image_path} file doesn't exist!")
21
return cv2.imread(image_path, cv2.IMREAD_GRAYSCALE)
22
23
0 commit comments