mirror of
https://github.com/StefBuwalda/ProjectIOT.git
synced 2025-10-30 03:09:58 +00:00
17 lines
326 B
Python
17 lines
326 B
Python
from pyplatex import ANPR
|
|
import asyncio
|
|
import torch
|
|
from ultralytics.nn.tasks import DetectionModel
|
|
|
|
torch.serialization.add_safe_globals({"DetectionModel": DetectionModel})
|
|
|
|
|
|
async def main():
|
|
anpr = ANPR()
|
|
plates = await anpr.detect("car.jpg")
|
|
print(plates)
|
|
|
|
|
|
# Run the async main function
|
|
asyncio.run(main())
|