mirror of
https://github.com/StefBuwalda/ProjectIOT.git
synced 2025-10-30 11:19:57 +00:00
Removed old ANPR system
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
from application import anpr
|
||||
import io
|
||||
|
||||
|
||||
@@ -7,14 +6,14 @@ async def process_image(image: bytes) -> str:
|
||||
image_file = io.BytesIO(image)
|
||||
|
||||
print("Processing image")
|
||||
anpr_info = await anpr.detect(image_file) # type: ignore
|
||||
# anpr_info = await anpr.detect(image_file) # type: ignore
|
||||
|
||||
if anpr_info is None:
|
||||
print("Something went wrong with ANPR")
|
||||
return ""
|
||||
# if anpr_info is None:
|
||||
# print("Something went wrong with ANPR")
|
||||
# return ""
|
||||
|
||||
if not anpr_info["is_plate"]:
|
||||
return ""
|
||||
# if not anpr_info["is_plate"]:
|
||||
# return ""
|
||||
|
||||
print(anpr_info["plate_number"])
|
||||
return str(anpr_info["plate_number"])
|
||||
# print(anpr_info["plate_number"])
|
||||
return "" # str(anpr_info["plate_number"])
|
||||
|
||||
Reference in New Issue
Block a user