ZoneMinder / pyzm

Python API, Log, Event Server and Memory wrapper for ZoneMinder
GNU General Public License v2.0
32 stars 21 forks source link

Update virel.ai to parse response data. #45

Closed baudneo closed 1 year ago

baudneo commented 1 year ago

Virel.ai does not reply with bounding box info. This will cause issues, for now the bbox data is set to 0,0,0,0. Hopefully this allows ZMES to complete the detection and add it as a hit. Image will not be annotated correctly if it does. This code parses the current response from virel.ai to grab Label and confidence, type cast confidence into a float and populate bbox data with 0,0,0,0.

This may not work for ZMES post processing, I do not have ZMES to test with but, it will return what data it can.

Added model_name to grab the model str that virel.ai returns. Made use of time.perf_counter() for performance timing.

Confidence threshold needs to be added for confidence comparison.