Giter Site home page Giter Site logo

pyzm's Introduction

What

Pythonic ZoneMinder wrapper

  • API
  • Event Server
  • Logger
  • Memory
  • Machine Learning Modules

Documentation & Examples

Latest documentation is available here. The documentation includes a full example.

Features

  • API auth using tokens or legacy (manages refresh logins automatically)
  • Monitors
  • Events with filters
  • States
  • Configs
  • EventNotification callbacks
  • Mapped Memory access
  • Direct access to ML algorithms
  • Amazon Rekognition support for object detection

Limitations

  • Only for Python3

pyzm's People

Contributors

baudneo avatar connortechnology avatar fiatguy85 avatar jantman avatar joro75 avatar lukearohl avatar mludvig avatar mnoorenberghe avatar pliablepixels avatar rowandavies avatar simpler1 avatar sujikinen avatar themoosman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pyzm's Issues

Unable to download event video

Issue: I am unable to download a Zoneminder (v1.34.26) event video. I am able to authenticate no problem. The thumbnail even downloads just fine, but the video [ERR] Event 146494 does not have a video file

Below is the code I am using in order to download the video.
`
from pyzm.api import ZMApi

options = {
# FIXME use secrets instead
"apiurl": "https://nvr_url/zm/api",
"portalurl": "https://nvr_url/zm",
"user": "zm_bot",
"password": "zm_bot_pass",
"disable_ssl_check": True,

}
zm = ZMApi(options)

event_filter = {
'min_alarmed_frames': 0,
'max_events': 10,
}

print ('I got {} events'.format(len(cam_events.list())))
for e in cam_events.list():
print('\nID:{} Event:{} Cause:{} Notes:{}'.format( e.id(), e.name(), e.cause(), e.notes()))
print('\tDuration: {} Link: {}'.format(e.duration(), e.get_video_url()))

# Download thumbnail and video
e.download_image(dir=events_path)
e.download_video(dir=events_path)

`

If there is any additional information or step I should try please let me know.

Unable to add a monitor

I'm trying to test your pyzm functionality, but when I try to add a monitor using the example program with a basic call, eg:

print ("--------| Getting Monitors |-----------")
ms = zmapi.monitors()
for m in ms.list():
    print ('Name:{} Enabled:{} Type:{} Dims:{}'.format(m.name(), m.enabled(), m.type(), m.dimensions()))
    print (m.status())

zmapi.monitors().add()

I'm getting the following error. I don't see anything in the docs about an 'api_url' field in the docs, but it seems to reference it in the code.

Running examples on http://192.168.1.247/zm/api
Try monitor shared memory tests? [y/N]n
Test the Event Server? [y/N]n
[INFO] Using simple log output (default)
[DEBUG 1] Not using auth
[DEBUG 1] make_request called with url=http://192.168.1.247/zm/api/host/gettimezone.json payload={} type=get query={}
[INFO] Using simple log output (default)
[DEBUG 1] Retrieving monitors via API
[DEBUG 1] make_request called with url=http://192.168.1.247/zm/api/monitors.json payload={} type=get query={}
[INFO] Using simple log output (default)
[DEBUG 1] Retrieving config via API
[DEBUG 1] make_request called with url=http://192.168.1.247/zm/api/configs.json payload={} type=get query={}
--------| Getting Monitors |-----------
Name:CAM1 Enabled:True Type:Remote Dims:{'width': 1920, 'height': 1080}
[DEBUG 1] make_request called with url=http://192.168.1.247/zm/api/monitors/daemonStatus/id:1/daemon:zmc.json payload={} type=get query={}
{'status': True, 'statustext': "'zmc -m 1' running since 20/07/01 14:10:28, pid = 776"}
Traceback (most recent call last):
  File "my-example.py", line 142, in <module>
    zmapi.monitors().add()
  File "/export/home/mclark/Code/Zoneminder/pyzm/pyzm/helpers/Monitors.py", line 60, in add
    url = self.api_url+'/monitors/.json'
AttributeError: 'Monitors' object has no attribute 'api_url'

Infinite loop on gettimezone.json > Error 401

Event Server version

6.1.14

Hooks version (if you are using Object Detection)

app:6.1.14, pyzm:0.3.36

The version of ZoneMinder you are using:

1.34.23

What is the nature of your issue

Bug/question

Details

Got an 401 error calling api 'gettimezone.json ' > Infinite loop
What do I wrong ?

Debug Logs (if applicable)

03/11/21 09:59:38 zmesdetect_m5[2666] DBG2 api.py:200 [Using new token API]
03/11/21 09:59:38 zmesdetect_m5[2666] DBG1 api.py:207 [Access token expires on:2021-03-11 11:59:38.160035 [7200s]]
03/11/21 09:59:38 zmesdetect_m5[2666] DBG3 api.py:134 [No need to relogin as access token still has 119.99905236666667 minutes remaining]
03/11/21 09:59:38 zmesdetect_m5[2691] DBG1 api.py:306 [HTTP error: 401 Client Error: Unauthorized for url: https://xxxx.xxxx.xxx/zm/api/host/login.json/host/gettimezone.json?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJab25lTWluZGVyIiwiaWF0IjoxNjE1NDUzMTc3LCJleHAiOjE2MTU0NjAzNzcsInVzZXIiOiJldmVudCIsInR5cGUiOiJhY2Nlc3MifQ.u9QUthvpQTmDzfZl4wHssMH4DHtzIcKggOYJydSTEvc]
03/11/21 09:59:38 zmesdetect_m5[2666] DBG4 api.py:270 [make_request called with url=https://xxxx.xxxx.xxx/zm/api/host/login.json/host/gettimezone.json payload={} type=get query={'token': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJab25lTWluZGVyIiwiaWF0IjoxNjE1NDUzMTc4LCJleHAiOjE2MTU0NjAzNzgsInVzZXIiOiJldmVudCIsInR5cGUiOiJhY2Nlc3MifQ.rR39TAcjVBm7G5ZXvepz2fGABJ2vifNzXvsooQ0iWWI'}]
03/11/21 09:59:38 zmesdetect_m5[2691] DBG1 api.py:308 [Got 401 (Unauthorized) - retrying login once]
03/11/21 09:59:38 zmesdetect_m5[2691] DBG2 api.py:150 [Going to use refresh token as it still has 1438.6680266833332 minutes remaining]
03/11/21 09:59:38 zmesdetect_m5[2666] DBG1 api.py:306 [HTTP error: 401 Client Error: Unauthorized for url: https://xxxx.xxxx.xxx/zm/api/host/login.json/host/gettimezone.json?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJab25lTWluZGVyIiwiaWF0IjoxNjE1NDUzMTc4LCJleHAiOjE2MTU0NjAzNzgsInVzZXIiOiJldmVudCIsInR5cGUiOiJhY2Nlc3MifQ.rR39TAcjVBm7G5ZXvepz2fGABJ2vifNzXvsooQ0iWWI]
03/11/21 09:59:38 zmesdetect_m5[2691] DBG1 api.py:166 [Using token for login [eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJab25lTWluZGVyIiwiaWF0IjoxNjE1NDUzMDk4LCJleHAiOjE2MTU1Mzk0OTgsInVzZXIiOiJldmVudCIsInR5cGUiOiJyZWZyZXNoIn0.GMjlKgWRWKH_FgiQAV_5I3z_7ye8CaKGaT83jAFyPzY]]
03/11/21 09:59:38 zmesdetect_m5[2666] DBG1 api.py:308 [Got 401 (Unauthorized) - retrying login once]
03/11/21 09:59:38 zmesdetect_m5[2691] DBG2 api.py:200 [Using new token API]
03/11/21 09:59:38 zmesdetect_m5[2666] DBG2 api.py:150 [Going to use refresh token as it still has 1438.5858064833333 minutes remaining]
03/11/21 09:59:38 zmesdetect_m5[2691] DBG1 api.py:207 [Access token expires on:2021-03-11 11:59:38.511812 [7200s]]
03/11/21 09:59:38 zmesdetect_m5[2666] DBG1 api.py:166 [Using token for login [eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJab25lTWluZGVyIiwiaWF0IjoxNjE1NDUzMDkzLCJleHAiOjE2MTU1Mzk0OTMsInVzZXIiOiJldmVudCIsInR5cGUiOiJyZWZyZXNoIn0.B72Q7C0djkyEBBcXN_eMDaR_AHPnhUTfSoewdE8RBp8]]
03/11/21 09:59:38 zmesdetect_m5[2691] DBG3 api.py:134 [No need to relogin as access token still has 119.99908488333334 minutes remaining]
03/11/21 09:59:38 zmesdetect_m5[2666] DBG2 api.py:200 [Using new token API]
03/11/21 09:59:38 zmesdetect_m5[2691] DBG4 api.py:270 [make_request called with url=https://xxxx.xxxx.xxx/zm/api/host/login.json/host/gettimezone.json payload={} type=get query={'token': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJab25lTWluZGVyIiwiaWF0IjoxNjE1NDUzMTc4LCJleHAiOjE2MTU0NjAzNzgsInVzZXIiOiJldmVudCIsInR5cGUiOiJhY2Nlc3MifQ.rR39TAcjVBm7G5ZXvepz2fGABJ2vifNzXvsooQ0iWWI'}]
03/11/21 09:59:38 zmesdetect_m5[2666] DBG1 api.py:207 [Access token expires on:2021-03-11 11:59:38.699222 [7200s]]
03/11/21 09:59:38 zmesdetect_m5[2666] DBG3 api.py:134 [No need to relogin as access token still has 119.99904713333333 minutes remaining]
03/11/21 09:59:38 zmesdetect_m5[2691] DBG1 api.py:306 [HTTP error: 401 Client Error: Unauthorized for url: https://xxxx.xxxx.xxx/zm/api/host/login.json/host/gettimezone.json?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJab25lTWluZGVyIiwiaWF0IjoxNjE1NDUzMTc4LCJleHAiOjE2MTU0NjAzNzgsInVzZXIiOiJldmVudCIsInR5cGUiOiJhY2Nlc3MifQ.rR39TAcjVBm7G5ZXvepz2fGABJ2vifNzXvsooQ0iWWI]
03/11/21 09:59:38 zmesdetect_m5[2666] DBG4 api.py:270 [make_request called with url=https://xxxx.xxxx.xxx/zm/api/host/login.json/host/gettimezone.json payload={} type=get query={'token': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJab25lTWluZGVyIiwiaWF0IjoxNjE1NDUzMTc4LCJleHAiOjE2MTU0NjAzNzgsInVzZXIiOiJldmVudCIsInR5cGUiOiJhY2Nlc3MifQ.rR39TAcjVBm7G5ZXvepz2fGABJ2vifNzXvsooQ0iWWI'}]
03/11/21 09:59:38 zmesdetect_m5[2691] DBG1 api.py:308 [Got 401 (Unauthorized) - retrying login once]
03/11/21 09:59:39 zmesdetect_m5[2691] DBG2 api.py:150 [Going to use refresh token as it still has 1438.6571430166666 minutes remaining]
03/11/21 09:59:39 zmesdetect_m5[2666] DBG1 api.py:306 [HTTP error: 401 Client Error: Unauthorized for url: https://xxxx.xxxx.xxx/zm/api/host/login.json/host/gettimezone.json?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJab25lTWluZGVyIiwiaWF0IjoxNjE1NDUzMTc4LCJleHAiOjE2MTU0NjAzNzgsInVzZXIiOiJldmVudCIsInR5cGUiOiJhY2Nlc3MifQ.rR39TAcjVBm7G5ZXvepz2fGABJ2vifNzXvsooQ0iWWI]
03/11/21 09:59:39 zmesdetect_m5[2691] DBG1 api.py:166 [Using token for login [eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJab25lTWluZGVyIiwiaWF0IjoxNjE1NDUzMDk4LCJleHAiOjE2MTU1Mzk0OTgsInVzZXIiOiJldmVudCIsInR5cGUiOiJyZWZyZXNoIn0.GMjlKgWRWKH_FgiQAV_5I3z_7ye8CaKGaT83jAFyPzY]]

Thanks!

ZMMemory alarm_state is not defined

Simple program for catching an alarm doesnt work for me.

File "Zoneminder_Connector.py", line 35, in isAlarmed
return self.listener.is_alarmed()
File "/usr/local/lib/python3.8/dist-packages/pyzm/ZMMemory.py", line 122, in is_alarmed
return d['shared_data']['state'] == alarm_state['STATE_ALARM']
NameError: name 'alarm_state' is not defined

Cannot connect to ZM server that does not have authentication setup

When calling zapi = zmapi.ZMApi(options=cfg.api_options) with api_options that don't include a user id and password the following stack it thrown. My ZM server does not require authentication.

  File "/home/moos/git/house-monitor/status.py", line 68, in zm
    zapi = zmapi.ZMApi(options=cfg.api_options)
  File "/home/moos/.local/lib/python3.8/site-packages/pyzm/api.py", line 58, in __init__
    self._login()
  File "/home/moos/.local/lib/python3.8/site-packages/pyzm/api.py", line 134, in _login
    data={'user': self.options['user'],
KeyError: 'user'

Add Event.delete() method

It would be very useful to have Event.delete() method. I wanted to use pyzm in my client for periodical cleanup of unwanted events (e.g. false positives or known motion) but am unable to remove them as there is no delete() event.

Thanks!

Problem with Token after sometime

Hello Guys,

I have a routine coded with scheduler and twice a day i Start 7 AM and Stop 10 AM my monitors using:

m.set_parameter({'enabled': False, 'function': "None"})

Then i getting the error:

Traceback (most recent call last):
  File "/home/myuser/.local/lib/python3.6/site-packages/pyzm/api.py", line 252, in _make_request
    r.raise_for_status()
  File "/home/myuser/.local/lib/python3.6/site-packages/requests/models.py", line 941, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: http://192.168.15.5/zm/api/monitors/1.json?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJab25lTWluZGVyIiwiaWF0IjoxNTk3MDIzM$

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "routines.py", line 64, in <module>
    schedule.run_pending()
  File "/home/myuser/.local/lib/python3.6/site-packages/schedule/__init__.py", line 563, in run_pending
    default_scheduler.run_pending()
  File "/home/myuser/.local/lib/python3.6/site-packages/schedule/__init__.py", line 94, in run_pending
    self._run_job(job)
  File "/home/myuser/.local/lib/python3.6/site-packages/schedule/__init__.py", line 147, in _run_job
    ret = job.run()
  File "/home/myuser/.local/lib/python3.6/site-packages/schedule/__init__.py", line 466, in run
    ret = self.job_func()
  File "routines.py", line 38, in stop_video_recording
    m.set_parameter({'enabled': False, 'function': "None"})
  File "/home/myuser/.local/lib/python3.6/site-packages/pyzm/helpers/Monitor.py", line 158, in set_parameter
    return self.api._make_request(url=url, payload=payload, type='post')
  File "/home/myuser/.local/lib/python3.6/site-packages/pyzm/api.py", line 258, in _make_request
    self._relogin()
  File "/home/myuser/.local/lib/python3.6/site-packages/pyzm/api.py", line 134, in _relogin
    self._login()

In a space of 1 hour, the error doesn't occur. In order to reproduce the error i used a space of 3 hours between turn ON and OFF the monitor!

Seems like token is expiring and can't perform calls to API, because before this error Unauthorized operation exception occurs.

I did the operation with 1 Hour manually in python3 terminal and everything worked, like images below. I think is something with the Token Refresh Operation!

AUTH_RELAY is set to hashed
A valid AUTH_HASH_SECRET is provided (not empty)
AUTH_HASH_IPS is disabled
OPT_USE_APIS is enabled

image

image

image

I found something my be related to this ISSUE: ZoneMinder/zoneminder#2866

ZM Version 1.34.16

past detections should be checked inside media loop?

Scenario: I have a car parked most of the time on my driveway, thus I have the setting match_past_detections enabled. At night, before my wife's car turns into the driveway, its headlight triggers a motion, the car is not in the frame until later (e.g. frame 220).

To be efficient, I set frame_strategy=first. But the parked car got detected first, breaking out of the media loop. The parked car is then compared against past detections, and the whole event is dropped. It would be better to have the parked car compared against past detections inside the media loop, then proceed to other frames until it finds the first frame with object not matching past detections (the coming car).

I can work around by setting frame_strategy=most, but that would defeat the efficiency: it could stop processing the remaining frames once it found an object that doesn't match past detections.

Maybe we can add another frame_strategy option, e.g. "first_new"? That would check the detected objects against past detections inside the media loop, while still allow breaking out of the loop at the first frame that doesn't match past detections. The later call to _process_past_detections can then be skipped for this option.

(for reference, I'm talking about the codes near the bottom of detect_sequence.py)

past_det_max_diff_area not working

If I dont have any overrides for past_det_max_diff_area then it completes the sequence. Once I add a person_past_det_max_diff_area to objectconfig.ini I get this error ->

03/29/21 19:08:19 zmesdetect_m6[584] DBG2 object.py:71 [Converted 90% to 324000.0]

03/29/21 19:08:19 zmesdetect_m6[584] DBG2 object.py:92 [Ignoring dog [653, 119, 683, 169] as conf. level 0.35663270950317383 is lower than 0.4]

03/29/21 19:08:19 zmesdetect_m6[584] DBG2 object.py:94 [Returning filtered list of 2 objects.]

03/29/21 19:08:19 zmesdetect_m6[584] DBG4 detect_sequence.py:637 [This model iteration inside object found: labels: ['person', 'boat'],conf:[0.9952523112297058, 0.4280830919742584]]

03/29/21 19:08:19 zmesdetect_m6[584] DBG3 detect_sequence.py:368 [Max object size found to be: 90%]

03/29/21 19:08:19 zmesdetect_m6[584] DBG2 detect_sequence.py:376 [Converted 90% to 324000.0]

03/29/21 19:08:19 zmesdetect_m6[584] FAT zm_detect.py:546 [Unrecoverable error:not enough values to unpack (expected 2, got 1) Traceback:Traceback (most recent call last):
  File "/var/lib/zmeventnotification/bin/zm_detect.py", line 541, in <module>
    main_handler()
  File "/var/lib/zmeventnotification/bin/zm_detect.py", line 412, in main_handler
    matched_data,all_data = m.detect_stream(stream=stream, options=stream_options)
  File "/usr/local/lib/python3.8/dist-packages/pyzm/ml/detect_sequence.py", line 645, in detect_stream
    _b,_l,_c, _e = self._filter_detections(m, seq,_b,_l,_c, polygons, h, w)
  File "/usr/local/lib/python3.8/dist-packages/pyzm/ml/detect_sequence.py", line 403, in _filter_detections
    polygons[:] = self._rescale_polygons(polygons, neww / oldw, newh / oldh)
  File "/usr/local/lib/python3.8/dist-packages/pyzm/ml/detect_sequence.py", line 200, in _rescale_polygons
    for x, y in p['value']:
ValueError: not enough values to unpack (expected 2, got 1)
]

Usage: es.debug.objdet <Event ID> <Monitor ID>

I am trying to debug it somewhat to see if I can get you better info.

Update event names/notes

I'd like to be able to use pyzm to update an event's name or notes. Is that possible? I can get an event name(). How can I set it?

take into account confidences when selecting final match for most* strategy

For frame_strategy of "most", "most_models", and "most_unique", since we have to loop through all the matches anyway, might as well take into consideration the confidences to pick out the best. For example, if three matches all have 1 detected object, the match with the highest confidence should be selected instead of the first one.

It's obviously more complicated when there are multiple detected objects, perhaps compare the sum of the confidences as a simple criteria. Something like this?

for idx,item in enumerate(all_matches):
  if  ((frame_strategy == 'first') or
  ((frame_strategy == 'most') and (len(item['labels']) > len(matched_l))) or
  ((frame_strategy == 'most') and (len(item['labels']) == len(matched_l)) and (sum(matched_c) < sum(item['confidences']))) or
  ((frame_strategy == 'most_models') and (len(item['detection_types']) > len(matched_detection_types))) or
  ((frame_strategy == 'most_models') and (len(item['detection_types']) == len(matched_detection_types)) and (sum(matched_c) < sum(item['confidences']))) or
  ((frame_strategy == 'most_unique') and (len(set(item['labels'])) > len(set(matched_l)))) or
  ((frame_strategy == 'most_unique') and (len(set(item['labels'])) == len(set(matched_l))) and (sum(matched_c) < sum(item['confidences'])))):

I've been testing the above mod in my local installation and it seems to work well in picking out the best detected frame for better accuracy.

Jetson Nano: Timeout waiting for gpu lock

Event Server version

6.0.7 (currently testing commit 534c0b595e3c07d6a5a9ed285884532c4d3b0ee7)

Hooks version (if you are using Object Detection)

hooks:6.0.7 pyzm:0.3.8

The version of ZoneMinder you are using:

v1.34.22.

What is the nature of your issue

Question(s)

Details

TL;DR Can you suggest a way to determine if and where pyzm/yolo is getting stuck? The first event or two is processed, so it seems like the lock is never released after the first events. Is there a proc I can look for to see if it's actually still processing?

I maintain a docker-compose stack that runs ZoneMinder and Event Notification Server in a container on a Jetson Nano. I'm testing with 3 RTSP cameras at 4fps x 720p.

The issue I'm having is the gpu lock appears to get stuck when running basic object (no face or alpr) detection via tinyyolov4 and I've opened this issue against my repo for tracking:

klutchell/balena-zoneminder#2

On startup, the first 1 or 2 events are processed correctly and shows detected objects and boxed images in ZM and all of that. So know the basic gpu detection is working. However following the first couple events, most if not all future events are not processed and I receive fatal logs Timeout waiting for gpu lock for 100 seconds. I also see some CUBLAS_STATUS_NOT_INITIALIZED errors but I don't know if they are related and they only happen on first startup.

OpenCV seems to be correctly compiled for the platform with CUDA and CUDNN, I've tried compiling it myself and using alwaysai/edgeiq base images with the same result.

  • I've tried increasing the timeout to 300s, same result. I could go higher if you think that will help?
  • I've tried legacy objectconfig format as well as the new ml_sequence with the same result
  • I've tried the stable v6.0.6 release as well as some recent master snapshots
  • I've tried tinyyolov3 with the same result

My current, default objectconfig is available here:

https://github.com/klutchell/balena-zoneminder/blob/main/zm/objectconfig.ini

I've looked into the pyzm code a bit but it's not obvious to me where it could be getting stuck that the locks are not released. I'm hoping this is where you can help with the investigation next steps! Do you think the CUBLAS_STATUS_NOT_INITIALIZED errors are related to the locks?

Debug Logs

root@3ac69193ff00:/var/log/zm# more zmesdetect_m1.log 
12/29/20 11:34:25 zmesdetect_m1[153] INF zm_detect.py:208 [---------| pyzm version:0.3.8, hook version:6.0.7,  ES version:6.0.7 , OpenCV version:4.4.0|------------]
12/29/20 11:34:25 zmesdetect_m1[153] DBG1 utils.py:405 [secret filename: /etc/zm/secrets.ini]
12/29/20 11:34:25 zmesdetect_m1[153] DBG2 utils.py:378 [Secret token found in config: !ZM_PORTAL]
12/29/20 11:34:25 zmesdetect_m1[153] DBG2 utils.py:378 [Secret token found in config: !ZM_USER]
12/29/20 11:34:25 zmesdetect_m1[153] DBG2 utils.py:378 [Secret token found in config: !ZM_PASSWORD]
12/29/20 11:34:25 zmesdetect_m1[153] DBG2 utils.py:378 [Secret token found in config: !ZM_API_PORTAL]
12/29/20 11:34:25 zmesdetect_m1[153] DBG2 utils.py:378 [Secret token found in config: !ML_USER]
12/29/20 11:34:25 zmesdetect_m1[153] DBG2 utils.py:378 [Secret token found in config: !ML_PASSWORD]
12/29/20 11:34:25 zmesdetect_m1[153] DBG2 utils.py:378 [Secret token found in config: !PLATEREC_ALPR_KEY]
12/29/20 11:34:25 zmesdetect_m1[153] DBG1 utils.py:440 [allowing self-signed certs to work...]
12/29/20 11:34:25 zmesdetect_m1[153] DBG4 utils.py:450 [Now checking for monitor overrides]
12/29/20 11:34:25 zmesdetect_m1[153] DBG4 utils.py:513 [Finally, doing parameter substitution]
12/29/20 11:34:25 zmesdetect_m1[153] INF zm_detect.py:234 [Importing local classes for Object/Face]
12/29/20 11:34:25 zmesdetect_m1[153] DBG1 utils.py:280 [Trying to download http://localhost/zm/index.php?view=image&eid=886&fid=alarm&username=admin&password=*****]
12/29/20 11:34:26 zmesdetect_m1[153] DBG1 utils.py:299 [Trying to download http://localhost/zm/index.php?view=image&eid=886&fid=snapshot&username=admin&password=*****]
12/29/20 11:34:26 zmesdetect_m1[153] DBG1 zm_detect.py:295 [No polygon area specfied, so adding a full image polygon:[{'name': 'full_image', 'value': [(0, 0), (1280, 0), (1280, 720), (0, 720)], 'patter
n': None}]]
12/29/20 11:34:26 zmesdetect_m1[153] DBG1 zm_detect.py:298 [resizing to 800 before analysis...]
12/29/20 11:34:26 zmesdetect_m1[153] DBG2 utils.py:138 [resized polygons x=0.625/y=0.625: [{'name': 'full_image', 'value': [(0, 0), (800, 0), (800, 450), (0, 450)], 'pattern': None}]]
12/29/20 11:34:26 zmesdetect_m1[153] DBG1 zm_detect.py:319 [User ALPR if vehicle found: False]
12/29/20 11:34:26 zmesdetect_m1[153] DBG4 yolo.py:26 [Yolo init params: {'pyzm_overrides': {'log_level_debug': 5}, 'secrets': '/etc/zm/secrets.ini', 'version': '1.2', 'cpu_max_processes': 3, 'gpu_max_p
rocesses': 1, 'tpu_max_processes': 1, 'cpu_max_lock_wait': 100, 'gpu_max_lock_wait': 100, 'tpu_max_lock_wait': 100, 'base_data_path': '/var/lib/zmeventnotification', 'portal': 'http://localhost/zm', 'a
pi_portal': 'http://localhost/zm/api', 'user': 'admin', 'password': 'plexnchi11', 'basic_user': '', 'basic_password': '', 'image_path': '/var/lib/zmeventnotification/images', 'match_past_detections': '
no', 'past_det_max_diff_area': '5%', 'max_detection_size': '90%', 'frame_id': 'bestmatch', 'bestmatch_order': 'a,s', 'wait': '0', 'resize': '800', 'delete_after_analyze': 'yes', 'show_percent': 'yes', 
'allow_self_signed': 'yes', 'write_image_to_zm': 'yes', 'write_debug_image': 'no', 'detection_sequence': ['object'], 'detection_mode': 'all', 'import_zm_zones': 'no', 'only_triggered_zm_zones': 'no', '
poly_color': (255, 255, 255), 'poly_thickness': 2, 'create_animation': 'no', 'animation_types': "'mp4,gif'", 'animation_width': 640, 'animation_retry_sleep': 15, 'animation_max_tries': 4, 'fast_gif': '
no', 'ml_gateway': None, 'ml_fallback_local': 'no', 'ml_user': '"your_mlapi_user"', 'ml_password': '"your_mlapi_password"', 'use_sequence': 'yes', 'ml_sequence': '{\n\'general\': {\n\'model_sequence\':
 \'object\',\n\n},\n\'object\': {\n\'general\':{\n\'pattern\':\'.*\',\n\'same_model_sequence_strategy\': \'first\' # also \'most\', \'most_unique\'s\n},\n\'sequence\': [{\n\'object_config\':\'/var/lib/
zmeventnotification/models/tinyyolov4/yolov4-tiny.cfg\',\n\'object_weights\':\'/var/lib/zmeventnotification/models/tinyyolov4/yolov4-tiny.weights\',\n\'object_labels\': \'/var/lib/zmeventnotification/m
odels/tinyyolov4/coco.names\',\n\'object_min_confidence\': 0.3,\n\'object_framework\':\'opencv\',\n\'object_processor\': \'gpu\',\n\'gpu_max_processes\': 1,\n\'gpu_max_lock_wait\': 100,\n\'cpu_max_proc
esses\': 3,\n\'cpu_max_lock_wait\': 100\n}]\n},\n\'face\': {\n\'general\':{\n\'pattern\': \'.*\',\n\'same_model_sequence_strategy\': \'first\'\n},\n\'sequence\': [{\n\'save_unknown_faces\':\'yes\',\n\'
save_unknown_faces_leeway_pixels\':100,\n\'face_detection_framework\': \'dlib\',\n\'known_images_path\': \'/var/lib/zmeventnotification/known_faces\',\n\'unknown_images_path\': \'/var/lib/zmeventnotifi
cation/unknown_faces\',\n\'face_model\': \'cnn\',\n\'face_train_model\': \'cnn\',\n\'face_recog_dist_threshold\': \'0.6\',\n\'face_num_jitters\': \'1\',\n\'face_upsample_times\':\'1\',\n\'gpu_max_proce
sses\': 1,\n\'gpu_max_lock_wait\': 100,\n\'cpu_max_processes\': 3,\n\'cpu_max_lock_wait\': 100,\n\'max_size\':800\n}]\n},\n\n\'alpr\': {\n\'general\':{\n\'same_model_sequence_strategy\': \'first\',\n\'
pre_existing_labels\':[\'car\', \'motorbike\', \'bus\', \'truck\', \'boat\'],\n\'pattern\': \'.*\'\n\n},\n\'sequence\': [{\n\'alpr_api_type\': \'cloud\',\n\'alpr_service\': \'plate_recognizer\',\n\'alp
r_key\': \'"your_plate_recognizer_api_key"\',\n\'platrec_stats\': \'yes\',\n\'platerec_min_dscore\': 0.1,\n\'platerec_min_score\': 0.2,\n\'max_size\':1600\n}]\n}\n}', 'stream_sequence': "{\n'frame_stra
tegy': 'most_models',\n'frame_set': 'snapshot,alarm',\n'resize':800\n\n}", 'object_detection_pattern': '.*', 'object_framework': 'opencv', 'object_processor': 'gpu', 'object_config': '/var/lib/zmeventn
otification/models/tinyyolov4/yolov4-tiny.cfg', 'object_weights': '/var/lib/zmeventnotification/models/tinyyolov4/yolov4-tiny.weights', 'object_labels': '/var/lib/zmeventnotification/models/tinyyolov4/
coco.names', 'object_min_confidence': 0.3, 'face_detection_pattern': '.*', 'face_detection_framework': 'dlib', 'face_recognition_framework': 'dlib', 'face_processor': 'cpu', 'face_num_jitters': 1, 'fac
e_upsample_times': 1, 'face_model': 'cnn', 'face_train_model': 'cnn', 'face_recog_dist_threshold': 0.6, 'face_recog_knn_algo': 'ball_tree', 'known_images_path': '/var/lib/zmeventnotification/known_face
s', 'unknown_images_path': '/var/lib/zmeventnotification/unknown_faces', 'unknown_face_name': 'unknown face', 'save_unknown_faces': 'yes', 'save_unknown_faces_leeway_pixels': 100, 'alpr_service': 'plat
e_recognizer', 'alpr_detection_pattern': '.*', 'alpr_url': None, 'alpr_key': '"your_plate_recognizer_api_key"', 'alpr_use_after_detection_only': 'yes', 'alpr_api_type': 'cloud', 'platerec_stats': 'yes'
, 'platerec_regions': None, 'platerec_min_dscore': 0.1, 'platerec_min_score': 0.2, 'openalpr_recognize_vehicle': '0', 'openalpr_country': 'us', 'openalpr_state': None, 'openalpr_min_confidence': '0.3',
 'openalpr_cmdline_binary': 'alpr', 'openalpr_cmdline_params': '-j -d', 'openalpr_cmdline_min_confidence': 0.3, 'tpu_object_weights': '/var/lib/zmeventnotification/models/coral_edgetpu/ssd_mobilenet_v2
_coco_quant_postprocess_edgetpu.tflite', 'tpu_object_labels': '/var/lib/zmeventnotification/models/coral_edgetpu/coco_indexed.names', 'tpu_object_framework': 'coral_edgetpu', 'tpu_object_processor': 't
pu', 'tpu_min_confidence': '0.6', 'yolo4_object_weights': '/var/lib/zmeventnotification/models/yolov4/yolov4.weights', 'yolo4_object_labels': '/var/lib/zmeventnotification/models/yolov4/coco.names', 'y
olo4_object_config': '/var/lib/zmeventnotification/models/yolov4/yolov4.cfg', 'yolo4_object_framework': 'opencv', 'yolo4_object_processor': 'gpu', 'yolo3_object_weights': '/var/lib/zmeventnotification/
models/yolov3/yolov3.weights', 'yolo3_object_labels': '/var/lib/zmeventnotification/models/yolov3/coco.names', 'yolo3_object_config': '/var/lib/zmeventnotification/models/yolov3/yolov3.cfg', 'yolo3_obj
ect_framework': 'opencv', 'yolo3_object_processor': 'gpu', 'tinyyolo_object_config': '/var/lib/zmeventnotification/models/tinyyolov4/yolov4-tiny.cfg', 'tinyyolo_object_weights': '/var/lib/zmeventnotifi
cation/models/tinyyolov4/yolov4-tiny.weights', 'tinyyolo_object_labels': '/var/lib/zmeventnotification/models/tinyyolov4/coco.names', 'tinyyolo_object_framework': 'opencv', 'tinyyolo_object_processor':
 'gpu'}]
12/29/20 11:34:26 zmesdetect_m1[153] DBG2 yolo.py:35 [Semaphore: max:1, name:pyzm_uid33_gpu_lock, timeout:100]
12/29/20 11:34:26 zmesdetect_m1[153] DBG2 zm_detect.py:370 [using g.config['object_detection_pattern']=.*]
12/29/20 11:34:26 zmesdetect_m1[153] DBG1 zm_detect.py:403 [Using model: object with /var/lib/zmeventnotification/images/886-alarm.jpg]
12/29/20 11:34:26 zmesdetect_m1[153] DBG2 yolo.py:45 [Waiting for gpu lock...]
12/29/20 11:34:26 zmesdetect_m1[153] DBG2 yolo.py:47 [Got gpu lock ..]
12/29/20 11:34:26 zmesdetect_m1[153] DBG1 yolo.py:74 [|--------- Loading Yolo model from disk ---------|]
12/29/20 11:34:26 zmesdetect_m1[153] DBG1 yolo.py:82 [Yolo initialization (loading model from disk) took: 0:00:00.271814]
12/29/20 11:34:26 zmesdetect_m1[153] DBG2 yolo.py:96 [Setting CUDA backend for OpenCV]
12/29/20 11:34:26 zmesdetect_m1[153] DBG3 yolo.py:97 [If you did not set your CUDA_ARCH_BIN correctly during OpenCV compilation, you will get errors during detection related to invalid device/make_poli
cy]
12/29/20 11:34:26 zmesdetect_m1[153] DBG1 yolo.py:135 [|---------- YOLO (input image: 800w*450h, model resize dimensions: 416w*416h) ----------|]
12/29/20 11:34:37 zmesdetect_m1[153] DBG2 yolo.py:61 [Released lock]
12/29/20 11:34:37 zmesdetect_m1[153] DBG2 yolo.py:153 [detect lock released]
12/29/20 11:34:37 zmesdetect_m1[153] DBG1 yolo.py:156 [YOLO detection took: 0:00:10.821964 milliseconds]
12/29/20 11:34:38 zmesdetect_m1[153] DBG2 yolo.py:190 [YOLO NMS filtering took: 0:00:00.000979]
12/29/20 11:34:38 zmesdetect_m1[153] DBG3 object.py:55 [core model detection over, got 9 objects. Now filtering]
12/29/20 11:34:38 zmesdetect_m1[153] DBG3 object.py:59 [Max object size found to be: 90%]
12/29/20 11:34:38 zmesdetect_m1[153] DBG2 object.py:67 [Converted 90% to 324000.0]
12/29/20 11:34:38 zmesdetect_m1[153] DBG2 object.py:88 [Ignoring chair [89, 344, 209, 448] as conf. level 0.2591783404350281 is lower than 0.3]
12/29/20 11:34:38 zmesdetect_m1[153] DBG2 object.py:90 [Returning filtered list of 8 objects.]
12/29/20 11:34:38 zmesdetect_m1[153] DBG2 image_manip.py:294 [intersection: polygon in process=[(388, 2), (458, 2), (458, 84), (388, 84)]]
12/29/20 11:34:38 zmesdetect_m1[153] DBG2 image_manip.py:308 [full_image intersects object:tvmonitor[[(388, 2), (458, 2), (458, 84), (388, 84)]]]
12/29/20 11:34:38 zmesdetect_m1[153] DBG2 image_manip.py:294 [intersection: polygon in process=[(527, 158), (725, 158), (725, 446), (527, 446)]]
12/29/20 11:34:38 zmesdetect_m1[153] DBG2 image_manip.py:308 [full_image intersects object:person[[(527, 158), (725, 158), (725, 446), (527, 446)]]]
12/29/20 11:34:38 zmesdetect_m1[153] DBG2 image_manip.py:294 [intersection: polygon in process=[(372, 194), (472, 194), (472, 348), (372, 348)]]
12/29/20 11:34:38 zmesdetect_m1[153] DBG2 image_manip.py:308 [full_image intersects object:chair[[(372, 194), (472, 194), (472, 348), (372, 348)]]]
12/29/20 11:34:38 zmesdetect_m1[153] DBG2 image_manip.py:294 [intersection: polygon in process=[(640, 50), (684, 50), (684, 138), (640, 138)]]
12/29/20 11:34:38 zmesdetect_m1[153] DBG2 image_manip.py:308 [full_image intersects object:pottedplant[[(640, 50), (684, 50), (684, 138), (640, 138)]]]
12/29/20 11:34:38 zmesdetect_m1[153] DBG2 image_manip.py:294 [intersection: polygon in process=[(510, 51), (592, 51), (592, 109), (510, 109)]]
12/29/20 11:34:38 zmesdetect_m1[153] DBG2 image_manip.py:308 [full_image intersects object:tvmonitor[[(510, 51), (592, 51), (592, 109), (510, 109)]]]
12/29/20 11:34:38 zmesdetect_m1[153] DBG2 image_manip.py:294 [intersection: polygon in process=[(570, 134), (688, 134), (688, 256), (570, 256)]]
12/29/20 11:34:38 zmesdetect_m1[153] DBG2 image_manip.py:308 [full_image intersects object:chair[[(570, 134), (688, 134), (688, 256), (570, 256)]]]
12/29/20 11:34:38 zmesdetect_m1[153] DBG2 image_manip.py:294 [intersection: polygon in process=[(73, 262), (497, 262), (497, 454), (73, 454)]]
12/29/20 11:34:38 zmesdetect_m1[153] DBG2 image_manip.py:308 [full_image intersects object:diningtable[[(73, 262), (497, 262), (497, 454), (73, 454)]]]
12/29/20 11:34:38 zmesdetect_m1[153] DBG2 image_manip.py:294 [intersection: polygon in process=[(212, 295), (250, 295), (250, 319), (212, 319)]]
12/29/20 11:34:38 zmesdetect_m1[153] DBG2 image_manip.py:308 [full_image intersects object:bowl[[(212, 295), (250, 295), (250, 319), (212, 319)]]]
12/29/20 11:34:38 zmesdetect_m1[153] DBG2 zm_detect.py:618 [ALPR not in use, no need for look aheads in processing]
12/29/20 11:34:38 zmesdetect_m1[153] INF zm_detect.py:635 [labels found: ['tvmonitor', 'person', 'chair', 'pottedplant', 'tvmonitor', 'chair', 'diningtable', 'bowl']]
12/29/20 11:34:38 zmesdetect_m1[153] DBG2 zm_detect.py:638 [match found in /var/lib/zmeventnotification/images/886-alarm.jpg, breaking file loop...]
12/29/20 11:34:38 zmesdetect_m1[153] DBG2 zm_detect.py:703 [Drawing boxes around objects]
12/29/20 11:34:38 zmesdetect_m1[153] DBG1 zm_detect.py:728 [Writing detected image to /var/cache/zoneminder/events/1/2020-12-29/886/objdetect.jpg]
12/29/20 11:34:38 zmesdetect_m1[153] DBG1 zm_detect.py:732 [Writing JSON output to /var/cache/zoneminder/events/1/2020-12-29/886/objects.json]
12/29/20 11:34:38 zmesdetect_m1[153] INF zm_detect.py:784 [Prediction string:[a] detected:tvmonitor:91% person:87% chair:80% pottedplant:65% diningtable:40% bowl:33% ]
12/29/20 11:34:38 zmesdetect_m1[153] DBG1 zm_detect.py:787 [Prediction string JSON:[{"type": "object", "label": "tvmonitor", "box": [388, 2, 458, 84], "confidence": "91.12%"}, {"type": "object", "label
": "person", "box": [527, 158, 725, 446], "confidence": "86.71%"}, {"type": "object", "label": "chair", "box": [372, 194, 472, 348], "confidence": "79.73%"}, {"type": "object", "label": "pottedplant", 
"box": [640, 50, 684, 138], "confidence": "64.56%"}, {"type": "object", "label": "tvmonitor", "box": [510, 51, 592, 109], "confidence": "64.55%"}, {"type": "object", "label": "chair", "box": [570, 134,
 688, 256], "confidence": "58.50%"}, {"type": "object", "label": "diningtable", "box": [73, 262, 497, 454], "confidence": "39.99%"}, {"type": "object", "label": "bowl", "box": [212, 295, 250, 319], "co
nfidence": "32.81%"}]]
12/29/20 11:36:00 zmesdetect_m1[248] INF zm_detect.py:208 [---------| pyzm version:0.3.8, hook version:6.0.7,  ES version:6.0.7 , OpenCV version:4.4.0|------------]
12/29/20 11:36:01 zmesdetect_m1[248] DBG1 utils.py:405 [secret filename: /etc/zm/secrets.ini]
12/29/20 11:36:01 zmesdetect_m1[248] DBG2 utils.py:378 [Secret token found in config: !ZM_PORTAL]
12/29/20 11:36:01 zmesdetect_m1[248] DBG2 utils.py:378 [Secret token found in config: !ZM_USER]
12/29/20 11:36:01 zmesdetect_m1[248] DBG2 utils.py:378 [Secret token found in config: !ZM_PASSWORD]
12/29/20 11:36:01 zmesdetect_m1[248] DBG2 utils.py:378 [Secret token found in config: !ZM_API_PORTAL]
12/29/20 11:36:01 zmesdetect_m1[248] DBG2 utils.py:378 [Secret token found in config: !ML_USER]
12/29/20 11:36:01 zmesdetect_m1[248] DBG2 utils.py:378 [Secret token found in config: !ML_PASSWORD]
12/29/20 11:36:01 zmesdetect_m1[248] DBG2 utils.py:378 [Secret token found in config: !PLATEREC_ALPR_KEY]
12/29/20 11:36:01 zmesdetect_m1[248] DBG1 utils.py:440 [allowing self-signed certs to work...]
12/29/20 11:36:01 zmesdetect_m1[248] DBG4 utils.py:450 [Now checking for monitor overrides]
12/29/20 11:36:01 zmesdetect_m1[248] DBG4 utils.py:513 [Finally, doing parameter substitution]
12/29/20 11:36:01 zmesdetect_m1[248] INF zm_detect.py:234 [Importing local classes for Object/Face]
12/29/20 11:36:01 zmesdetect_m1[248] DBG1 utils.py:280 [Trying to download http://localhost/zm/index.php?view=image&eid=887&fid=alarm&username=admin&password=*****]
12/29/20 11:36:01 zmesdetect_m1[248] DBG1 utils.py:299 [Trying to download http://localhost/zm/index.php?view=image&eid=887&fid=snapshot&username=admin&password=*****]
12/29/20 11:36:01 zmesdetect_m1[248] DBG1 zm_detect.py:295 [No polygon area specfied, so adding a full image polygon:[{'name': 'full_image', 'value': [(0, 0), (1280, 0), (1280, 720), (0, 720)], 'patter
n': None}]]
12/29/20 11:36:01 zmesdetect_m1[248] DBG1 zm_detect.py:298 [resizing to 800 before analysis...]
12/29/20 11:36:01 zmesdetect_m1[248] DBG2 utils.py:138 [resized polygons x=0.625/y=0.625: [{'name': 'full_image', 'value': [(0, 0), (800, 0), (800, 450), (0, 450)], 'pattern': None}]]
12/29/20 11:36:01 zmesdetect_m1[248] DBG1 zm_detect.py:319 [User ALPR if vehicle found: False]
12/29/20 11:36:01 zmesdetect_m1[248] DBG4 yolo.py:26 [Yolo init params: {'pyzm_overrides': {'log_level_debug': 5}, 'secrets': '/etc/zm/secrets.ini', 'version': '1.2', 'cpu_max_processes': 3, 'gpu_max_p
rocesses': 1, 'tpu_max_processes': 1, 'cpu_max_lock_wait': 100, 'gpu_max_lock_wait': 100, 'tpu_max_lock_wait': 100, 'base_data_path': '/var/lib/zmeventnotification', 'portal': 'http://localhost/zm', 'a
pi_portal': 'http://localhost/zm/api', 'user': 'admin', 'password': 'plexnchi11', 'basic_user': '', 'basic_password': '', 'image_path': '/var/lib/zmeventnotification/images', 'match_past_detections': '
no', 'past_det_max_diff_area': '5%', 'max_detection_size': '90%', 'frame_id': 'bestmatch', 'bestmatch_order': 'a,s', 'wait': '0', 'resize': '800', 'delete_after_analyze': 'yes', 'show_percent': 'yes', 
'allow_self_signed': 'yes', 'write_image_to_zm': 'yes', 'write_debug_image': 'no', 'detection_sequence': ['object'], 'detection_mode': 'all', 'import_zm_zones': 'no', 'only_triggered_zm_zones': 'no', '
poly_color': (255, 255, 255), 'poly_thickness': 2, 'create_animation': 'no', 'animation_types': "'mp4,gif'", 'animation_width': 640, 'animation_retry_sleep': 15, 'animation_max_tries': 4, 'fast_gif': '
no', 'ml_gateway': None, 'ml_fallback_local': 'no', 'ml_user': '"your_mlapi_user"', 'ml_password': '"your_mlapi_password"', 'use_sequence': 'yes', 'ml_sequence': '{\n\'general\': {\n\'model_sequence\':
 \'object\',\n\n},\n\'object\': {\n\'general\':{\n\'pattern\':\'.*\',\n\'same_model_sequence_strategy\': \'first\' # also \'most\', \'most_unique\'s\n},\n\'sequence\': [{\n\'object_config\':\'/var/lib/
zmeventnotification/models/tinyyolov4/yolov4-tiny.cfg\',\n\'object_weights\':\'/var/lib/zmeventnotification/models/tinyyolov4/yolov4-tiny.weights\',\n\'object_labels\': \'/var/lib/zmeventnotification/m
odels/tinyyolov4/coco.names\',\n\'object_min_confidence\': 0.3,\n\'object_framework\':\'opencv\',\n\'object_processor\': \'gpu\',\n\'gpu_max_processes\': 1,\n\'gpu_max_lock_wait\': 100,\n\'cpu_max_proc
esses\': 3,\n\'cpu_max_lock_wait\': 100\n}]\n},\n\'face\': {\n\'general\':{\n\'pattern\': \'.*\',\n\'same_model_sequence_strategy\': \'first\'\n},\n\'sequence\': [{\n\'save_unknown_faces\':\'yes\',\n\'
save_unknown_faces_leeway_pixels\':100,\n\'face_detection_framework\': \'dlib\',\n\'known_images_path\': \'/var/lib/zmeventnotification/known_faces\',\n\'unknown_images_path\': \'/var/lib/zmeventnotifi
cation/unknown_faces\',\n\'face_model\': \'cnn\',\n\'face_train_model\': \'cnn\',\n\'face_recog_dist_threshold\': \'0.6\',\n\'face_num_jitters\': \'1\',\n\'face_upsample_times\':\'1\',\n\'gpu_max_proce
sses\': 1,\n\'gpu_max_lock_wait\': 100,\n\'cpu_max_processes\': 3,\n\'cpu_max_lock_wait\': 100,\n\'max_size\':800\n}]\n},\n\n\'alpr\': {\n\'general\':{\n\'same_model_sequence_strategy\': \'first\',\n\'
pre_existing_labels\':[\'car\', \'motorbike\', \'bus\', \'truck\', \'boat\'],\n\'pattern\': \'.*\'\n\n},\n\'sequence\': [{\n\'alpr_api_type\': \'cloud\',\n\'alpr_service\': \'plate_recognizer\',\n\'alp
r_key\': \'"your_plate_recognizer_api_key"\',\n\'platrec_stats\': \'yes\',\n\'platerec_min_dscore\': 0.1,\n\'platerec_min_score\': 0.2,\n\'max_size\':1600\n}]\n}\n}', 'stream_sequence': "{\n'frame_stra
tegy': 'most_models',\n'frame_set': 'snapshot,alarm',\n'resize':800\n\n}", 'object_detection_pattern': '.*', 'object_framework': 'opencv', 'object_processor': 'gpu', 'object_config': '/var/lib/zmeventn
otification/models/tinyyolov4/yolov4-tiny.cfg', 'object_weights': '/var/lib/zmeventnotification/models/tinyyolov4/yolov4-tiny.weights', 'object_labels': '/var/lib/zmeventnotification/models/tinyyolov4/
coco.names', 'object_min_confidence': 0.3, 'face_detection_pattern': '.*', 'face_detection_framework': 'dlib', 'face_recognition_framework': 'dlib', 'face_processor': 'cpu', 'face_num_jitters': 1, 'fac
e_upsample_times': 1, 'face_model': 'cnn', 'face_train_model': 'cnn', 'face_recog_dist_threshold': 0.6, 'face_recog_knn_algo': 'ball_tree', 'known_images_path': '/var/lib/zmeventnotification/known_face
s', 'unknown_images_path': '/var/lib/zmeventnotification/unknown_faces', 'unknown_face_name': 'unknown face', 'save_unknown_faces': 'yes', 'save_unknown_faces_leeway_pixels': 100, 'alpr_service': 'plat
e_recognizer', 'alpr_detection_pattern': '.*', 'alpr_url': None, 'alpr_key': '"your_plate_recognizer_api_key"', 'alpr_use_after_detection_only': 'yes', 'alpr_api_type': 'cloud', 'platerec_stats': 'yes'
, 'platerec_regions': None, 'platerec_min_dscore': 0.1, 'platerec_min_score': 0.2, 'openalpr_recognize_vehicle': '0', 'openalpr_country': 'us', 'openalpr_state': None, 'openalpr_min_confidence': '0.3',
 'openalpr_cmdline_binary': 'alpr', 'openalpr_cmdline_params': '-j -d', 'openalpr_cmdline_min_confidence': 0.3, 'tpu_object_weights': '/var/lib/zmeventnotification/models/coral_edgetpu/ssd_mobilenet_v2
_coco_quant_postprocess_edgetpu.tflite', 'tpu_object_labels': '/var/lib/zmeventnotification/models/coral_edgetpu/coco_indexed.names', 'tpu_object_framework': 'coral_edgetpu', 'tpu_object_processor': 't
pu', 'tpu_min_confidence': '0.6', 'yolo4_object_weights': '/var/lib/zmeventnotification/models/yolov4/yolov4.weights', 'yolo4_object_labels': '/var/lib/zmeventnotification/models/yolov4/coco.names', 'y
olo4_object_config': '/var/lib/zmeventnotification/models/yolov4/yolov4.cfg', 'yolo4_object_framework': 'opencv', 'yolo4_object_processor': 'gpu', 'yolo3_object_weights': '/var/lib/zmeventnotification/
models/yolov3/yolov3.weights', 'yolo3_object_labels': '/var/lib/zmeventnotification/models/yolov3/coco.names', 'yolo3_object_config': '/var/lib/zmeventnotification/models/yolov3/yolov3.cfg', 'yolo3_obj
ect_framework': 'opencv', 'yolo3_object_processor': 'gpu', 'tinyyolo_object_config': '/var/lib/zmeventnotification/models/tinyyolov4/yolov4-tiny.cfg', 'tinyyolo_object_weights': '/var/lib/zmeventnotifi
cation/models/tinyyolov4/yolov4-tiny.weights', 'tinyyolo_object_labels': '/var/lib/zmeventnotification/models/tinyyolov4/coco.names', 'tinyyolo_object_framework': 'opencv', 'tinyyolo_object_processor':
 'gpu'}]
12/29/20 11:36:01 zmesdetect_m1[248] DBG2 yolo.py:35 [Semaphore: max:1, name:pyzm_uid33_gpu_lock, timeout:100]
12/29/20 11:36:01 zmesdetect_m1[248] DBG2 zm_detect.py:370 [using g.config['object_detection_pattern']=.*]
12/29/20 11:36:01 zmesdetect_m1[248] DBG1 zm_detect.py:403 [Using model: object with /var/lib/zmeventnotification/images/887-alarm.jpg]
12/29/20 11:36:01 zmesdetect_m1[248] DBG2 yolo.py:45 [Waiting for gpu lock...]
12/29/20 11:36:01 zmesdetect_m1[248] DBG2 yolo.py:47 [Got gpu lock ..]
12/29/20 11:36:01 zmesdetect_m1[248] DBG1 yolo.py:74 [|--------- Loading Yolo model from disk ---------|]
12/29/20 11:36:01 zmesdetect_m1[248] DBG1 yolo.py:82 [Yolo initialization (loading model from disk) took: 0:00:00.029805]
12/29/20 11:36:01 zmesdetect_m1[248] DBG2 yolo.py:96 [Setting CUDA backend for OpenCV]
12/29/20 11:36:01 zmesdetect_m1[248] DBG3 yolo.py:97 [If you did not set your CUDA_ARCH_BIN correctly during OpenCV compilation, you will get errors during detection related to invalid device/make_poli
cy]
12/29/20 11:36:01 zmesdetect_m1[248] DBG1 yolo.py:135 [|---------- YOLO (input image: 800w*450h, model resize dimensions: 416w*416h) ----------|]
12/29/20 11:36:05 zmesdetect_m1[248] FAT zm_detect.py:860 [Unrecoverable error:OpenCV(4.4.0) /opencv-build/build/opencv-4.4.0/modules/dnn/src/cuda4dnn/csl/cublas.hpp:78: error: (-217:Gpu API call) CUBL
AS_STATUS_NOT_INITIALIZED in function 'UniqueHandle'
 Traceback:Traceback (most recent call last):
  File "/var/lib/zmeventnotification/bin/zm_detect.py", line 857, in <module>
    main_handler()
  File "/var/lib/zmeventnotification/bin/zm_detect.py", line 432, in main_handler
    b, l, c = m.detect(original_image)
  File "/usr/local/lib/python3.6/dist-packages/pyzm/ml/object.py", line 54, in detect
    b,l,c = self.model.detect(image)
  File "/usr/local/lib/python3.6/dist-packages/pyzm/ml/yolo.py", line 149, in detect
    outs = self.net.forward(ln)
cv2.error: OpenCV(4.4.0) /opencv-build/build/opencv-4.4.0/modules/dnn/src/cuda4dnn/csl/cublas.hpp:78: error: (-217:Gpu API call) CUBLAS_STATUS_NOT_INITIALIZED in function 'UniqueHandle'

]
12/29/20 11:37:00 zmesdetect_m1[307] INF zm_detect.py:208 [---------| pyzm version:0.3.8, hook version:6.0.7,  ES version:6.0.7 , OpenCV version:4.4.0|------------]
12/29/20 11:37:01 zmesdetect_m1[307] DBG1 utils.py:405 [secret filename: /etc/zm/secrets.ini]
12/29/20 11:37:01 zmesdetect_m1[307] DBG2 utils.py:378 [Secret token found in config: !ZM_PORTAL]
12/29/20 11:37:01 zmesdetect_m1[307] DBG2 utils.py:378 [Secret token found in config: !ZM_USER]
12/29/20 11:37:01 zmesdetect_m1[307] DBG2 utils.py:378 [Secret token found in config: !ZM_PASSWORD]
12/29/20 11:37:01 zmesdetect_m1[307] DBG2 utils.py:378 [Secret token found in config: !ZM_API_PORTAL]
12/29/20 11:37:01 zmesdetect_m1[307] DBG2 utils.py:378 [Secret token found in config: !ML_USER]
12/29/20 11:37:01 zmesdetect_m1[307] DBG2 utils.py:378 [Secret token found in config: !ML_PASSWORD]
12/29/20 11:37:01 zmesdetect_m1[307] DBG2 utils.py:378 [Secret token found in config: !PLATEREC_ALPR_KEY]
12/29/20 11:37:01 zmesdetect_m1[307] DBG1 utils.py:440 [allowing self-signed certs to work...]
12/29/20 11:37:01 zmesdetect_m1[307] DBG4 utils.py:450 [Now checking for monitor overrides]
12/29/20 11:37:01 zmesdetect_m1[307] DBG4 utils.py:513 [Finally, doing parameter substitution]
12/29/20 11:37:01 zmesdetect_m1[307] INF zm_detect.py:234 [Importing local classes for Object/Face]
12/29/20 11:37:01 zmesdetect_m1[307] DBG1 utils.py:280 [Trying to download http://localhost/zm/index.php?view=image&eid=888&fid=alarm&username=admin&password=*****]
12/29/20 11:37:01 zmesdetect_m1[307] DBG1 utils.py:299 [Trying to download http://localhost/zm/index.php?view=image&eid=888&fid=snapshot&username=admin&password=*****]
12/29/20 11:37:01 zmesdetect_m1[307] DBG1 zm_detect.py:295 [No polygon area specfied, so adding a full image polygon:[{'name': 'full_image', 'value': [(0, 0), (1280, 0), (1280, 720), (0, 720)], 'patter
n': None}]]
12/29/20 11:37:01 zmesdetect_m1[307] DBG1 zm_detect.py:298 [resizing to 800 before analysis...]
12/29/20 11:37:01 zmesdetect_m1[307] DBG2 utils.py:138 [resized polygons x=0.625/y=0.625: [{'name': 'full_image', 'value': [(0, 0), (800, 0), (800, 450), (0, 450)], 'pattern': None}]]
12/29/20 11:37:01 zmesdetect_m1[307] DBG1 zm_detect.py:319 [User ALPR if vehicle found: False]
12/29/20 11:37:01 zmesdetect_m1[307] DBG4 yolo.py:26 [Yolo init params: {'pyzm_overrides': {'log_level_debug': 5}, 'secrets': '/etc/zm/secrets.ini', 'version': '1.2', 'cpu_max_processes': 3, 'gpu_max_p
rocesses': 1, 'tpu_max_processes': 1, 'cpu_max_lock_wait': 100, 'gpu_max_lock_wait': 100, 'tpu_max_lock_wait': 100, 'base_data_path': '/var/lib/zmeventnotification', 'portal': 'http://localhost/zm', 'a
pi_portal': 'http://localhost/zm/api', 'user': 'admin', 'password': 'plexnchi11', 'basic_user': '', 'basic_password': '', 'image_path': '/var/lib/zmeventnotification/images', 'match_past_detections': '
no', 'past_det_max_diff_area': '5%', 'max_detection_size': '90%', 'frame_id': 'bestmatch', 'bestmatch_order': 'a,s', 'wait': '0', 'resize': '800', 'delete_after_analyze': 'yes', 'show_percent': 'yes', 
'allow_self_signed': 'yes', 'write_image_to_zm': 'yes', 'write_debug_image': 'no', 'detection_sequence': ['object'], 'detection_mode': 'all', 'import_zm_zones': 'no', 'only_triggered_zm_zones': 'no', '
poly_color': (255, 255, 255), 'poly_thickness': 2, 'create_animation': 'no', 'animation_types': "'mp4,gif'", 'animation_width': 640, 'animation_retry_sleep': 15, 'animation_max_tries': 4, 'fast_gif': '
no', 'ml_gateway': None, 'ml_fallback_local': 'no', 'ml_user': '"your_mlapi_user"', 'ml_password': '"your_mlapi_password"', 'use_sequence': 'yes', 'ml_sequence': '{\n\'general\': {\n\'model_sequence\':
 \'object\',\n\n},\n\'object\': {\n\'general\':{\n\'pattern\':\'.*\',\n\'same_model_sequence_strategy\': \'first\' # also \'most\', \'most_unique\'s\n},\n\'sequence\': [{\n\'object_config\':\'/var/lib/
zmeventnotification/models/tinyyolov4/yolov4-tiny.cfg\',\n\'object_weights\':\'/var/lib/zmeventnotification/models/tinyyolov4/yolov4-tiny.weights\',\n\'object_labels\': \'/var/lib/zmeventnotification/m
odels/tinyyolov4/coco.names\',\n\'object_min_confidence\': 0.3,\n\'object_framework\':\'opencv\',\n\'object_processor\': \'gpu\',\n\'gpu_max_processes\': 1,\n\'gpu_max_lock_wait\': 100,\n\'cpu_max_proc
esses\': 3,\n\'cpu_max_lock_wait\': 100\n}]\n},\n\'face\': {\n\'general\':{\n\'pattern\': \'.*\',\n\'same_model_sequence_strategy\': \'first\'\n},\n\'sequence\': [{\n\'save_unknown_faces\':\'yes\',\n\'
save_unknown_faces_leeway_pixels\':100,\n\'face_detection_framework\': \'dlib\',\n\'known_images_path\': \'/var/lib/zmeventnotification/known_faces\',\n\'unknown_images_path\': \'/var/lib/zmeventnotifi
cation/unknown_faces\',\n\'face_model\': \'cnn\',\n\'face_train_model\': \'cnn\',\n\'face_recog_dist_threshold\': \'0.6\',\n\'face_num_jitters\': \'1\',\n\'face_upsample_times\':\'1\',\n\'gpu_max_proce
sses\': 1,\n\'gpu_max_lock_wait\': 100,\n\'cpu_max_processes\': 3,\n\'cpu_max_lock_wait\': 100,\n\'max_size\':800\n}]\n},\n\n\'alpr\': {\n\'general\':{\n\'same_model_sequence_strategy\': \'first\',\n\'
pre_existing_labels\':[\'car\', \'motorbike\', \'bus\', \'truck\', \'boat\'],\n\'pattern\': \'.*\'\n\n},\n\'sequence\': [{\n\'alpr_api_type\': \'cloud\',\n\'alpr_service\': \'plate_recognizer\',\n\'alp
r_key\': \'"your_plate_recognizer_api_key"\',\n\'platrec_stats\': \'yes\',\n\'platerec_min_dscore\': 0.1,\n\'platerec_min_score\': 0.2,\n\'max_size\':1600\n}]\n}\n}', 'stream_sequence': "{\n'frame_stra
tegy': 'most_models',\n'frame_set': 'snapshot,alarm',\n'resize':800\n\n}", 'object_detection_pattern': '.*', 'object_framework': 'opencv', 'object_processor': 'gpu', 'object_config': '/var/lib/zmeventn
otification/models/tinyyolov4/yolov4-tiny.cfg', 'object_weights': '/var/lib/zmeventnotification/models/tinyyolov4/yolov4-tiny.weights', 'object_labels': '/var/lib/zmeventnotification/models/tinyyolov4/
coco.names', 'object_min_confidence': 0.3, 'face_detection_pattern': '.*', 'face_detection_framework': 'dlib', 'face_recognition_framework': 'dlib', 'face_processor': 'cpu', 'face_num_jitters': 1, 'fac
e_upsample_times': 1, 'face_model': 'cnn', 'face_train_model': 'cnn', 'face_recog_dist_threshold': 0.6, 'face_recog_knn_algo': 'ball_tree', 'known_images_path': '/var/lib/zmeventnotification/known_face
s', 'unknown_images_path': '/var/lib/zmeventnotification/unknown_faces', 'unknown_face_name': 'unknown face', 'save_unknown_faces': 'yes', 'save_unknown_faces_leeway_pixels': 100, 'alpr_service': 'plat
e_recognizer', 'alpr_detection_pattern': '.*', 'alpr_url': None, 'alpr_key': '"your_plate_recognizer_api_key"', 'alpr_use_after_detection_only': 'yes', 'alpr_api_type': 'cloud', 'platerec_stats': 'yes'
, 'platerec_regions': None, 'platerec_min_dscore': 0.1, 'platerec_min_score': 0.2, 'openalpr_recognize_vehicle': '0', 'openalpr_country': 'us', 'openalpr_state': None, 'openalpr_min_confidence': '0.3',
 'openalpr_cmdline_binary': 'alpr', 'openalpr_cmdline_params': '-j -d', 'openalpr_cmdline_min_confidence': 0.3, 'tpu_object_weights': '/var/lib/zmeventnotification/models/coral_edgetpu/ssd_mobilenet_v2
_coco_quant_postprocess_edgetpu.tflite', 'tpu_object_labels': '/var/lib/zmeventnotification/models/coral_edgetpu/coco_indexed.names', 'tpu_object_framework': 'coral_edgetpu', 'tpu_object_processor': 't
pu', 'tpu_min_confidence': '0.6', 'yolo4_object_weights': '/var/lib/zmeventnotification/models/yolov4/yolov4.weights', 'yolo4_object_labels': '/var/lib/zmeventnotification/models/yolov4/coco.names', 'y
olo4_object_config': '/var/lib/zmeventnotification/models/yolov4/yolov4.cfg', 'yolo4_object_framework': 'opencv', 'yolo4_object_processor': 'gpu', 'yolo3_object_weights': '/var/lib/zmeventnotification/
models/yolov3/yolov3.weights', 'yolo3_object_labels': '/var/lib/zmeventnotification/models/yolov3/coco.names', 'yolo3_object_config': '/var/lib/zmeventnotification/models/yolov3/yolov3.cfg', 'yolo3_obj
ect_framework': 'opencv', 'yolo3_object_processor': 'gpu', 'tinyyolo_object_config': '/var/lib/zmeventnotification/models/tinyyolov4/yolov4-tiny.cfg', 'tinyyolo_object_weights': '/var/lib/zmeventnotifi
cation/models/tinyyolov4/yolov4-tiny.weights', 'tinyyolo_object_labels': '/var/lib/zmeventnotification/models/tinyyolov4/coco.names', 'tinyyolo_object_framework': 'opencv', 'tinyyolo_object_processor':
 'gpu'}]
12/29/20 11:37:01 zmesdetect_m1[307] DBG2 yolo.py:35 [Semaphore: max:1, name:pyzm_uid33_gpu_lock, timeout:100]
12/29/20 11:37:01 zmesdetect_m1[307] DBG2 zm_detect.py:370 [using g.config['object_detection_pattern']=.*]
12/29/20 11:37:01 zmesdetect_m1[307] DBG1 zm_detect.py:403 [Using model: object with /var/lib/zmeventnotification/images/888-alarm.jpg]
12/29/20 11:37:01 zmesdetect_m1[307] DBG2 yolo.py:45 [Waiting for gpu lock...]
12/29/20 11:37:01 zmesdetect_m1[307] DBG2 yolo.py:47 [Got gpu lock ..]
12/29/20 11:37:01 zmesdetect_m1[307] DBG1 yolo.py:74 [|--------- Loading Yolo model from disk ---------|]
12/29/20 11:37:01 zmesdetect_m1[307] DBG1 yolo.py:82 [Yolo initialization (loading model from disk) took: 0:00:00.035648]
12/29/20 11:37:01 zmesdetect_m1[307] DBG2 yolo.py:96 [Setting CUDA backend for OpenCV]
12/29/20 11:37:01 zmesdetect_m1[307] DBG3 yolo.py:97 [If you did not set your CUDA_ARCH_BIN correctly during OpenCV compilation, you will get errors during detection related to invalid device/make_poli
cy]
12/29/20 11:37:01 zmesdetect_m1[307] DBG1 yolo.py:135 [|---------- YOLO (input image: 800w*450h, model resize dimensions: 416w*416h) ----------|]
12/29/20 11:37:05 zmesdetect_m1[307] DBG2 yolo.py:61 [Released lock]
12/29/20 11:37:05 zmesdetect_m1[307] DBG2 yolo.py:153 [detect lock released]
12/29/20 11:37:05 zmesdetect_m1[307] DBG1 yolo.py:156 [YOLO detection took: 0:00:03.795119 milliseconds]
12/29/20 11:37:05 zmesdetect_m1[307] DBG2 yolo.py:190 [YOLO NMS filtering took: 0:00:00.000881]
12/29/20 11:37:05 zmesdetect_m1[307] DBG3 object.py:55 [core model detection over, got 9 objects. Now filtering]
12/29/20 11:37:05 zmesdetect_m1[307] DBG3 object.py:59 [Max object size found to be: 90%]
12/29/20 11:37:05 zmesdetect_m1[307] DBG2 object.py:67 [Converted 90% to 324000.0]
12/29/20 11:37:05 zmesdetect_m1[307] DBG2 object.py:90 [Returning filtered list of 9 objects.]
12/29/20 11:37:05 zmesdetect_m1[307] DBG2 image_manip.py:294 [intersection: polygon in process=[(388, 1), (458, 1), (458, 87), (388, 87)]]
12/29/20 11:37:05 zmesdetect_m1[307] DBG2 image_manip.py:308 [full_image intersects object:tvmonitor[[(388, 1), (458, 1), (458, 87), (388, 87)]]]
12/29/20 11:37:05 zmesdetect_m1[307] DBG2 image_manip.py:294 [intersection: polygon in process=[(373, 191), (469, 191), (469, 351), (373, 351)]]
12/29/20 11:37:05 zmesdetect_m1[307] DBG2 image_manip.py:308 [full_image intersects object:chair[[(373, 191), (469, 191), (469, 351), (373, 351)]]]
12/29/20 11:37:05 zmesdetect_m1[307] DBG2 image_manip.py:294 [intersection: polygon in process=[(520, 248), (732, 248), (732, 452), (520, 452)]]
12/29/20 11:37:05 zmesdetect_m1[307] DBG2 image_manip.py:308 [full_image intersects object:person[[(520, 248), (732, 248), (732, 452), (520, 452)]]]
12/29/20 11:37:05 zmesdetect_m1[307] DBG2 image_manip.py:294 [intersection: polygon in process=[(509, 52), (591, 52), (591, 108), (509, 108)]]
12/29/20 11:37:05 zmesdetect_m1[307] DBG2 image_manip.py:308 [full_image intersects object:tvmonitor[[(509, 52), (591, 52), (591, 108), (509, 108)]]]
12/29/20 11:37:05 zmesdetect_m1[307] DBG2 image_manip.py:294 [intersection: polygon in process=[(576, 136), (672, 136), (672, 266), (576, 266)]]
12/29/20 11:37:05 zmesdetect_m1[307] DBG2 image_manip.py:308 [full_image intersects object:chair[[(576, 136), (672, 136), (672, 266), (576, 266)]]]
12/29/20 11:37:05 zmesdetect_m1[307] DBG2 image_manip.py:294 [intersection: polygon in process=[(642, 48), (682, 48), (682, 140), (642, 140)]]
12/29/20 11:37:05 zmesdetect_m1[307] DBG2 image_manip.py:308 [full_image intersects object:pottedplant[[(642, 48), (682, 48), (682, 140), (642, 140)]]]
12/29/20 11:37:05 zmesdetect_m1[307] DBG2 image_manip.py:294 [intersection: polygon in process=[(92, 342), (216, 342), (216, 448), (92, 448)]]
12/29/20 11:37:05 zmesdetect_m1[307] DBG2 image_manip.py:308 [full_image intersects object:chair[[(92, 342), (216, 342), (216, 448), (92, 448)]]]
12/29/20 11:37:05 zmesdetect_m1[307] DBG2 image_manip.py:294 [intersection: polygon in process=[(75, 266), (495, 266), (495, 452), (75, 452)]]
12/29/20 11:37:05 zmesdetect_m1[307] DBG2 image_manip.py:308 [full_image intersects object:diningtable[[(75, 266), (495, 266), (495, 452), (75, 452)]]]
12/29/20 11:37:05 zmesdetect_m1[307] DBG2 image_manip.py:294 [intersection: polygon in process=[(210, 296), (250, 296), (250, 318), (210, 318)]]
12/29/20 11:37:05 zmesdetect_m1[307] DBG2 image_manip.py:308 [full_image intersects object:bowl[[(210, 296), (250, 296), (250, 318), (210, 318)]]]
12/29/20 11:37:05 zmesdetect_m1[307] DBG2 zm_detect.py:618 [ALPR not in use, no need for look aheads in processing]
12/29/20 11:37:05 zmesdetect_m1[307] INF zm_detect.py:635 [labels found: ['tvmonitor', 'chair', 'person', 'tvmonitor', 'chair', 'pottedplant', 'chair', 'diningtable', 'bowl']]
12/29/20 11:37:05 zmesdetect_m1[307] DBG2 zm_detect.py:638 [match found in /var/lib/zmeventnotification/images/888-alarm.jpg, breaking file loop...]
12/29/20 11:37:05 zmesdetect_m1[307] DBG2 zm_detect.py:703 [Drawing boxes around objects]
12/29/20 11:37:05 zmesdetect_m1[307] DBG1 zm_detect.py:728 [Writing detected image to /var/cache/zoneminder/events/1/2020-12-29/888/objdetect.jpg]
12/29/20 11:37:05 zmesdetect_m1[307] DBG1 zm_detect.py:732 [Writing JSON output to /var/cache/zoneminder/events/1/2020-12-29/888/objects.json]
12/29/20 11:37:05 zmesdetect_m1[307] INF zm_detect.py:784 [Prediction string:[a] detected:tvmonitor:90% chair:88% person:72% pottedplant:53% diningtable:43% bowl:37% ]
12/29/20 11:37:05 zmesdetect_m1[307] DBG1 zm_detect.py:787 [Prediction string JSON:[{"type": "object", "label": "tvmonitor", "box": [388, 1, 458, 87], "confidence": "89.50%"}, {"type": "object", "label
": "chair", "box": [373, 191, 469, 351], "confidence": "88.35%"}, {"type": "object", "label": "person", "box": [520, 248, 732, 452], "confidence": "72.38%"}, {"type": "object", "label": "tvmonitor", "b
ox": [509, 52, 591, 108], "confidence": "66.28%"}, {"type": "object", "label": "chair", "box": [576, 136, 672, 266], "confidence": "64.83%"}, {"type": "object", "label": "pottedplant", "box": [642, 48,
 682, 140], "confidence": "52.99%"}, {"type": "object", "label": "chair", "box": [92, 342, 216, 448], "confidence": "49.84%"}, {"type": "object", "label": "diningtable", "box": [75, 266, 495, 452], "co
nfidence": "43.46%"}, {"type": "object", "label": "bowl", "box": [210, 296, 250, 318], "confidence": "37.20%"}]]
12/29/20 11:37:26 zmesdetect_m1[348] INF zm_detect.py:208 [---------| pyzm version:0.3.8, hook version:6.0.7,  ES version:6.0.7 , OpenCV version:4.4.0|------------]
12/29/20 11:37:26 zmesdetect_m1[348] DBG1 utils.py:405 [secret filename: /etc/zm/secrets.ini]
12/29/20 11:37:26 zmesdetect_m1[348] DBG2 utils.py:378 [Secret token found in config: !ZM_PORTAL]
12/29/20 11:37:26 zmesdetect_m1[348] DBG2 utils.py:378 [Secret token found in config: !ZM_USER]
12/29/20 11:37:26 zmesdetect_m1[348] DBG2 utils.py:378 [Secret token found in config: !ZM_PASSWORD]
12/29/20 11:37:26 zmesdetect_m1[348] DBG2 utils.py:378 [Secret token found in config: !ZM_API_PORTAL]
12/29/20 11:37:26 zmesdetect_m1[348] DBG2 utils.py:378 [Secret token found in config: !ML_USER]
12/29/20 11:37:26 zmesdetect_m1[348] DBG2 utils.py:378 [Secret token found in config: !ML_PASSWORD]
12/29/20 11:37:26 zmesdetect_m1[348] DBG2 utils.py:378 [Secret token found in config: !PLATEREC_ALPR_KEY]
12/29/20 11:37:26 zmesdetect_m1[348] DBG1 utils.py:440 [allowing self-signed certs to work...]
12/29/20 11:37:26 zmesdetect_m1[348] DBG4 utils.py:450 [Now checking for monitor overrides]
12/29/20 11:37:26 zmesdetect_m1[348] DBG4 utils.py:513 [Finally, doing parameter substitution]
12/29/20 11:37:26 zmesdetect_m1[348] INF zm_detect.py:234 [Importing local classes for Object/Face]
12/29/20 11:37:26 zmesdetect_m1[348] DBG1 utils.py:280 [Trying to download http://localhost/zm/index.php?view=image&eid=889&fid=alarm&username=admin&password=*****]
12/29/20 11:37:26 zmesdetect_m1[348] DBG1 utils.py:299 [Trying to download http://localhost/zm/index.php?view=image&eid=889&fid=snapshot&username=admin&password=*****]
12/29/20 11:37:26 zmesdetect_m1[348] DBG1 zm_detect.py:295 [No polygon area specfied, so adding a full image polygon:[{'name': 'full_image', 'value': [(0, 0), (1280, 0), (1280, 720), (0, 720)], 'patter
n': None}]]
12/29/20 11:37:26 zmesdetect_m1[348] DBG1 zm_detect.py:298 [resizing to 800 before analysis...]
12/29/20 11:37:26 zmesdetect_m1[348] DBG2 utils.py:138 [resized polygons x=0.625/y=0.625: [{'name': 'full_image', 'value': [(0, 0), (800, 0), (800, 450), (0, 450)], 'pattern': None}]]
12/29/20 11:37:26 zmesdetect_m1[348] DBG1 zm_detect.py:319 [User ALPR if vehicle found: False]
12/29/20 11:37:26 zmesdetect_m1[348] DBG4 yolo.py:26 [Yolo init params: {'pyzm_overrides': {'log_level_debug': 5}, 'secrets': '/etc/zm/secrets.ini', 'version': '1.2', 'cpu_max_processes': 3, 'gpu_max_p
rocesses': 1, 'tpu_max_processes': 1, 'cpu_max_lock_wait': 100, 'gpu_max_lock_wait': 100, 'tpu_max_lock_wait': 100, 'base_data_path': '/var/lib/zmeventnotification', 'portal': 'http://localhost/zm', 'a
pi_portal': 'http://localhost/zm/api', 'user': 'admin', 'password': 'plexnchi11', 'basic_user': '', 'basic_password': '', 'image_path': '/var/lib/zmeventnotification/images', 'match_past_detections': '
no', 'past_det_max_diff_area': '5%', 'max_detection_size': '90%', 'frame_id': 'bestmatch', 'bestmatch_order': 'a,s', 'wait': '0', 'resize': '800', 'delete_after_analyze': 'yes', 'show_percent': 'yes', 
'allow_self_signed': 'yes', 'write_image_to_zm': 'yes', 'write_debug_image': 'no', 'detection_sequence': ['object'], 'detection_mode': 'all', 'import_zm_zones': 'no', 'only_triggered_zm_zones': 'no', '
poly_color': (255, 255, 255), 'poly_thickness': 2, 'create_animation': 'no', 'animation_types': "'mp4,gif'", 'animation_width': 640, 'animation_retry_sleep': 15, 'animation_max_tries': 4, 'fast_gif': '
no', 'ml_gateway': None, 'ml_fallback_local': 'no', 'ml_user': '"your_mlapi_user"', 'ml_password': '"your_mlapi_password"', 'use_sequence': 'yes', 'ml_sequence': '{\n\'general\': {\n\'model_sequence\':
 \'object\',\n\n},\n\'object\': {\n\'general\':{\n\'pattern\':\'.*\',\n\'same_model_sequence_strategy\': \'first\' # also \'most\', \'most_unique\'s\n},\n\'sequence\': [{\n\'object_config\':\'/var/lib/
zmeventnotification/models/tinyyolov4/yolov4-tiny.cfg\',\n\'object_weights\':\'/var/lib/zmeventnotification/models/tinyyolov4/yolov4-tiny.weights\',\n\'object_labels\': \'/var/lib/zmeventnotification/m
odels/tinyyolov4/coco.names\',\n\'object_min_confidence\': 0.3,\n\'object_framework\':\'opencv\',\n\'object_processor\': \'gpu\',\n\'gpu_max_processes\': 1,\n\'gpu_max_lock_wait\': 100,\n\'cpu_max_proc
esses\': 3,\n\'cpu_max_lock_wait\': 100\n}]\n},\n\'face\': {\n\'general\':{\n\'pattern\': \'.*\',\n\'same_model_sequence_strategy\': \'first\'\n},\n\'sequence\': [{\n\'save_unknown_faces\':\'yes\',\n\'
save_unknown_faces_leeway_pixels\':100,\n\'face_detection_framework\': \'dlib\',\n\'known_images_path\': \'/var/lib/zmeventnotification/known_faces\',\n\'unknown_images_path\': \'/var/lib/zmeventnotifi
cation/unknown_faces\',\n\'face_model\': \'cnn\',\n\'face_train_model\': \'cnn\',\n\'face_recog_dist_threshold\': \'0.6\',\n\'face_num_jitters\': \'1\',\n\'face_upsample_times\':\'1\',\n\'gpu_max_proce
sses\': 1,\n\'gpu_max_lock_wait\': 100,\n\'cpu_max_processes\': 3,\n\'cpu_max_lock_wait\': 100,\n\'max_size\':800\n}]\n},\n\n\'alpr\': {\n\'general\':{\n\'same_model_sequence_strategy\': \'first\',\n\'
pre_existing_labels\':[\'car\', \'motorbike\', \'bus\', \'truck\', \'boat\'],\n\'pattern\': \'.*\'\n\n},\n\'sequence\': [{\n\'alpr_api_type\': \'cloud\',\n\'alpr_service\': \'plate_recognizer\',\n\'alp
r_key\': \'"your_plate_recognizer_api_key"\',\n\'platrec_stats\': \'yes\',\n\'platerec_min_dscore\': 0.1,\n\'platerec_min_score\': 0.2,\n\'max_size\':1600\n}]\n}\n}', 'stream_sequence': "{\n'frame_stra
tegy': 'most_models',\n'frame_set': 'snapshot,alarm',\n'resize':800\n\n}", 'object_detection_pattern': '.*', 'object_framework': 'opencv', 'object_processor': 'gpu', 'object_config': '/var/lib/zmeventn
otification/models/tinyyolov4/yolov4-tiny.cfg', 'object_weights': '/var/lib/zmeventnotification/models/tinyyolov4/yolov4-tiny.weights', 'object_labels': '/var/lib/zmeventnotification/models/tinyyolov4/
coco.names', 'object_min_confidence': 0.3, 'face_detection_pattern': '.*', 'face_detection_framework': 'dlib', 'face_recognition_framework': 'dlib', 'face_processor': 'cpu', 'face_num_jitters': 1, 'fac
e_upsample_times': 1, 'face_model': 'cnn', 'face_train_model': 'cnn', 'face_recog_dist_threshold': 0.6, 'face_recog_knn_algo': 'ball_tree', 'known_images_path': '/var/lib/zmeventnotification/known_face
s', 'unknown_images_path': '/var/lib/zmeventnotification/unknown_faces', 'unknown_face_name': 'unknown face', 'save_unknown_faces': 'yes', 'save_unknown_faces_leeway_pixels': 100, 'alpr_service': 'plat
e_recognizer', 'alpr_detection_pattern': '.*', 'alpr_url': None, 'alpr_key': '"your_plate_recognizer_api_key"', 'alpr_use_after_detection_only': 'yes', 'alpr_api_type': 'cloud', 'platerec_stats': 'yes'
, 'platerec_regions': None, 'platerec_min_dscore': 0.1, 'platerec_min_score': 0.2, 'openalpr_recognize_vehicle': '0', 'openalpr_country': 'us', 'openalpr_state': None, 'openalpr_min_confidence': '0.3',
 'openalpr_cmdline_binary': 'alpr', 'openalpr_cmdline_params': '-j -d', 'openalpr_cmdline_min_confidence': 0.3, 'tpu_object_weights': '/var/lib/zmeventnotification/models/coral_edgetpu/ssd_mobilenet_v2
_coco_quant_postprocess_edgetpu.tflite', 'tpu_object_labels': '/var/lib/zmeventnotification/models/coral_edgetpu/coco_indexed.names', 'tpu_object_framework': 'coral_edgetpu', 'tpu_object_processor': 't
pu', 'tpu_min_confidence': '0.6', 'yolo4_object_weights': '/var/lib/zmeventnotification/models/yolov4/yolov4.weights', 'yolo4_object_labels': '/var/lib/zmeventnotification/models/yolov4/coco.names', 'y
olo4_object_config': '/var/lib/zmeventnotification/models/yolov4/yolov4.cfg', 'yolo4_object_framework': 'opencv', 'yolo4_object_processor': 'gpu', 'yolo3_object_weights': '/var/lib/zmeventnotification/
models/yolov3/yolov3.weights', 'yolo3_object_labels': '/var/lib/zmeventnotification/models/yolov3/coco.names', 'yolo3_object_config': '/var/lib/zmeventnotification/models/yolov3/yolov3.cfg', 'yolo3_obj
ect_framework': 'opencv', 'yolo3_object_processor': 'gpu', 'tinyyolo_object_config': '/var/lib/zmeventnotification/models/tinyyolov4/yolov4-tiny.cfg', 'tinyyolo_object_weights': '/var/lib/zmeventnotifi
cation/models/tinyyolov4/yolov4-tiny.weights', 'tinyyolo_object_labels': '/var/lib/zmeventnotification/models/tinyyolov4/coco.names', 'tinyyolo_object_framework': 'opencv', 'tinyyolo_object_processor':
 'gpu'}]
12/29/20 11:37:26 zmesdetect_m1[348] DBG2 yolo.py:35 [Semaphore: max:1, name:pyzm_uid33_gpu_lock, timeout:100]
12/29/20 11:37:26 zmesdetect_m1[348] DBG2 zm_detect.py:370 [using g.config['object_detection_pattern']=.*]
12/29/20 11:37:26 zmesdetect_m1[348] DBG1 zm_detect.py:403 [Using model: object with /var/lib/zmeventnotification/images/889-alarm.jpg]
12/29/20 11:37:26 zmesdetect_m1[348] DBG2 yolo.py:45 [Waiting for gpu lock...]
12/29/20 11:37:26 zmesdetect_m1[348] DBG2 yolo.py:47 [Got gpu lock ..]
12/29/20 11:37:26 zmesdetect_m1[348] DBG1 yolo.py:74 [|--------- Loading Yolo model from disk ---------|]
12/29/20 11:37:26 zmesdetect_m1[348] DBG1 yolo.py:82 [Yolo initialization (loading model from disk) took: 0:00:00.033018]
12/29/20 11:37:26 zmesdetect_m1[348] DBG2 yolo.py:96 [Setting CUDA backend for OpenCV]
12/29/20 11:37:26 zmesdetect_m1[348] DBG3 yolo.py:97 [If you did not set your CUDA_ARCH_BIN correctly during OpenCV compilation, you will get errors during detection related to invalid device/make_poli
cy]
12/29/20 11:37:26 zmesdetect_m1[348] DBG1 yolo.py:135 [|---------- YOLO (input image: 800w*450h, model resize dimensions: 416w*416h) ----------|]
12/29/20 11:37:30 zmesdetect_m1[348] DBG2 yolo.py:61 [Released lock]
12/29/20 11:37:30 zmesdetect_m1[348] DBG2 yolo.py:153 [detect lock released]
12/29/20 11:37:30 zmesdetect_m1[348] DBG1 yolo.py:156 [YOLO detection took: 0:00:03.470702 milliseconds]
12/29/20 11:37:30 zmesdetect_m1[348] DBG2 yolo.py:190 [YOLO NMS filtering took: 0:00:00.001017]
12/29/20 11:37:30 zmesdetect_m1[348] DBG3 object.py:55 [core model detection over, got 9 objects. Now filtering]
12/29/20 11:37:30 zmesdetect_m1[348] DBG3 object.py:59 [Max object size found to be: 90%]
12/29/20 11:37:30 zmesdetect_m1[348] DBG2 object.py:67 [Converted 90% to 324000.0]
12/29/20 11:37:30 zmesdetect_m1[348] DBG2 object.py:88 [Ignoring book [612, 404, 698, 450] as conf. level 0.21228188276290894 is lower than 0.3]
12/29/20 11:37:30 zmesdetect_m1[348] DBG2 object.py:90 [Returning filtered list of 8 objects.]
12/29/20 11:37:30 zmesdetect_m1[348] DBG2 image_manip.py:294 [intersection: polygon in process=[(374, 191), (468, 191), (468, 353), (374, 353)]]
12/29/20 11:37:30 zmesdetect_m1[348] DBG2 image_manip.py:308 [full_image intersects object:chair[[(374, 191), (468, 191), (468, 353), (374, 353)]]]
12/29/20 11:37:30 zmesdetect_m1[348] DBG2 image_manip.py:294 [intersection: polygon in process=[(389, 2), (459, 2), (459, 84), (389, 84)]]
12/29/20 11:37:30 zmesdetect_m1[348] DBG2 image_manip.py:308 [full_image intersects object:tvmonitor[[(389, 2), (459, 2), (459, 84), (389, 84)]]]
12/29/20 11:37:30 zmesdetect_m1[348] DBG2 image_manip.py:294 [intersection: polygon in process=[(524, 223), (692, 223), (692, 457), (524, 457)]]
12/29/20 11:37:30 zmesdetect_m1[348] DBG2 image_manip.py:308 [full_image intersects object:person[[(524, 223), (692, 223), (692, 457), (524, 457)]]]
12/29/20 11:37:30 zmesdetect_m1[348] DBG2 image_manip.py:294 [intersection: polygon in process=[(508, 52), (592, 52), (592, 108), (508, 108)]]
12/29/20 11:37:30 zmesdetect_m1[348] DBG2 image_manip.py:308 [full_image intersects object:tvmonitor[[(508, 52), (592, 52), (592, 108), (508, 108)]]]
12/29/20 11:37:30 zmesdetect_m1[348] DBG2 image_manip.py:294 [intersection: polygon in process=[(88, 344), (212, 344), (212, 448), (88, 448)]]
12/29/20 11:37:30 zmesdetect_m1[348] DBG2 image_manip.py:308 [full_image intersects object:chair[[(88, 344), (212, 344), (212, 448), (88, 448)]]]
12/29/20 11:37:30 zmesdetect_m1[348] DBG2 image_manip.py:294 [intersection: polygon in process=[(639, 47), (683, 47), (683, 139), (639, 139)]]
12/29/20 11:37:30 zmesdetect_m1[348] DBG2 image_manip.py:308 [full_image intersects object:pottedplant[[(639, 47), (683, 47), (683, 139), (639, 139)]]]
12/29/20 11:37:30 zmesdetect_m1[348] DBG2 image_manip.py:294 [intersection: polygon in process=[(72, 268), (500, 268), (500, 452), (72, 452)]]
12/29/20 11:37:30 zmesdetect_m1[348] DBG2 image_manip.py:308 [full_image intersects object:diningtable[[(72, 268), (500, 268), (500, 452), (72, 452)]]]
12/29/20 11:37:30 zmesdetect_m1[348] DBG2 image_manip.py:294 [intersection: polygon in process=[(212, 296), (250, 296), (250, 318), (212, 318)]]
12/29/20 11:37:30 zmesdetect_m1[348] DBG2 image_manip.py:308 [full_image intersects object:bowl[[(212, 296), (250, 296), (250, 318), (212, 318)]]]
12/29/20 11:37:30 zmesdetect_m1[348] DBG2 zm_detect.py:618 [ALPR not in use, no need for look aheads in processing]
12/29/20 11:37:30 zmesdetect_m1[348] INF zm_detect.py:635 [labels found: ['chair', 'tvmonitor', 'person', 'tvmonitor', 'chair', 'pottedplant', 'diningtable', 'bowl']]
12/29/20 11:37:30 zmesdetect_m1[348] DBG2 zm_detect.py:638 [match found in /var/lib/zmeventnotification/images/889-alarm.jpg, breaking file loop...]
12/29/20 11:37:30 zmesdetect_m1[348] DBG2 zm_detect.py:703 [Drawing boxes around objects]
12/29/20 11:37:30 zmesdetect_m1[348] DBG1 zm_detect.py:728 [Writing detected image to /var/cache/zoneminder/events/1/2020-12-29/889/objdetect.jpg]
12/29/20 11:37:30 zmesdetect_m1[348] DBG1 zm_detect.py:732 [Writing JSON output to /var/cache/zoneminder/events/1/2020-12-29/889/objects.json]
12/29/20 11:37:30 zmesdetect_m1[348] INF zm_detect.py:784 [Prediction string:[a] detected:chair:90% tvmonitor:82% person:80% pottedplant:57% diningtable:47% bowl:33% ]
12/29/20 11:37:30 zmesdetect_m1[348] DBG1 zm_detect.py:787 [Prediction string JSON:[{"type": "object", "label": "chair", "box": [374, 191, 468, 353], "confidence": "90.26%"}, {"type": "object", "label"
: "tvmonitor", "box": [389, 2, 459, 84], "confidence": "81.72%"}, {"type": "object", "label": "person", "box": [524, 223, 692, 457], "confidence": "79.69%"}, {"type": "object", "label": "tvmonitor", "b
ox": [508, 52, 592, 108], "confidence": "71.82%"}, {"type": "object", "label": "chair", "box": [88, 344, 212, 448], "confidence": "58.76%"}, {"type": "object", "label": "pottedplant", "box": [639, 47, 
683, 139], "confidence": "56.52%"}, {"type": "object", "label": "diningtable", "box": [72, 268, 500, 452], "confidence": "46.97%"}, {"type": "object", "label": "bowl", "box": [212, 296, 250, 318], "con
fidence": "32.56%"}]]
12/29/20 11:37:45 zmesdetect_m1[399] INF zm_detect.py:208 [---------| pyzm version:0.3.8, hook version:6.0.7,  ES version:6.0.7 , OpenCV version:4.4.0|------------]
12/29/20 11:37:46 zmesdetect_m1[399] DBG1 utils.py:405 [secret filename: /etc/zm/secrets.ini]
12/29/20 11:37:46 zmesdetect_m1[399] DBG2 utils.py:378 [Secret token found in config: !ZM_PORTAL]
12/29/20 11:37:46 zmesdetect_m1[399] DBG2 utils.py:378 [Secret token found in config: !ZM_USER]
12/29/20 11:37:46 zmesdetect_m1[399] DBG2 utils.py:378 [Secret token found in config: !ZM_PASSWORD]
12/29/20 11:37:46 zmesdetect_m1[399] DBG2 utils.py:378 [Secret token found in config: !ZM_API_PORTAL]
12/29/20 11:37:46 zmesdetect_m1[399] DBG2 utils.py:378 [Secret token found in config: !ML_USER]
12/29/20 11:37:46 zmesdetect_m1[399] DBG2 utils.py:378 [Secret token found in config: !ML_PASSWORD]
12/29/20 11:37:46 zmesdetect_m1[399] DBG2 utils.py:378 [Secret token found in config: !PLATEREC_ALPR_KEY]
12/29/20 11:37:46 zmesdetect_m1[399] DBG1 utils.py:440 [allowing self-signed certs to work...]
12/29/20 11:37:46 zmesdetect_m1[399] DBG4 utils.py:450 [Now checking for monitor overrides]
12/29/20 11:37:46 zmesdetect_m1[399] DBG4 utils.py:513 [Finally, doing parameter substitution]
12/29/20 11:37:46 zmesdetect_m1[399] INF zm_detect.py:234 [Importing local classes for Object/Face]
12/29/20 11:37:46 zmesdetect_m1[399] DBG1 utils.py:280 [Trying to download http://localhost/zm/index.php?view=image&eid=890&fid=alarm&username=admin&password=*****]
12/29/20 11:37:46 zmesdetect_m1[399] DBG1 utils.py:299 [Trying to download http://localhost/zm/index.php?view=image&eid=890&fid=snapshot&username=admin&password=*****]
12/29/20 11:37:46 zmesdetect_m1[399] DBG1 zm_detect.py:295 [No polygon area specfied, so adding a full image polygon:[{'name': 'full_image', 'value': [(0, 0), (1280, 0), (1280, 720), (0, 720)], 'patter
n': None}]]
12/29/20 11:37:46 zmesdetect_m1[399] DBG1 zm_detect.py:298 [resizing to 800 before analysis...]
12/29/20 11:37:46 zmesdetect_m1[399] DBG2 utils.py:138 [resized polygons x=0.625/y=0.625: [{'name': 'full_image', 'value': [(0, 0), (800, 0), (800, 450), (0, 450)], 'pattern': None}]]
12/29/20 11:37:46 zmesdetect_m1[399] DBG1 zm_detect.py:319 [User ALPR if vehicle found: False]
12/29/20 11:37:46 zmesdetect_m1[399] DBG4 yolo.py:26 [Yolo init params: {'pyzm_overrides': {'log_level_debug': 5}, 'secrets': '/etc/zm/secrets.ini', 'version': '1.2', 'cpu_max_processes': 3, 'gpu_max_p
rocesses': 1, 'tpu_max_processes': 1, 'cpu_max_lock_wait': 100, 'gpu_max_lock_wait': 100, 'tpu_max_lock_wait': 100, 'base_data_path': '/var/lib/zmeventnotification', 'portal': 'http://localhost/zm', 'a
pi_portal': 'http://localhost/zm/api', 'user': 'admin', 'password': 'plexnchi11', 'basic_user': '', 'basic_password': '', 'image_path': '/var/lib/zmeventnotification/images', 'match_past_detections': '
no', 'past_det_max_diff_area': '5%', 'max_detection_size': '90%', 'frame_id': 'bestmatch', 'bestmatch_order': 'a,s', 'wait': '0', 'resize': '800', 'delete_after_analyze': 'yes', 'show_percent': 'yes', 
'allow_self_signed': 'yes', 'write_image_to_zm': 'yes', 'write_debug_image': 'no', 'detection_sequence': ['object'], 'detection_mode': 'all', 'import_zm_zones': 'no', 'only_triggered_zm_zones': 'no', '
poly_color': (255, 255, 255), 'poly_thickness': 2, 'create_animation': 'no', 'animation_types': "'mp4,gif'", 'animation_width': 640, 'animation_retry_sleep': 15, 'animation_max_tries': 4, 'fast_gif': '
no', 'ml_gateway': None, 'ml_fallback_local': 'no', 'ml_user': '"your_mlapi_user"', 'ml_password': '"your_mlapi_password"', 'use_sequence': 'yes', 'ml_sequence': '{\n\'general\': {\n\'model_sequence\':
 \'object\',\n\n},\n\'object\': {\n\'general\':{\n\'pattern\':\'.*\',\n\'same_model_sequence_strategy\': \'first\' # also \'most\', \'most_unique\'s\n},\n\'sequence\': [{\n\'object_config\':\'/var/lib/
zmeventnotification/models/tinyyolov4/yolov4-tiny.cfg\',\n\'object_weights\':\'/var/lib/zmeventnotification/models/tinyyolov4/yolov4-tiny.weights\',\n\'object_labels\': \'/var/lib/zmeventnotification/m
odels/tinyyolov4/coco.names\',\n\'object_min_confidence\': 0.3,\n\'object_framework\':\'opencv\',\n\'object_processor\': \'gpu\',\n\'gpu_max_processes\': 1,\n\'gpu_max_lock_wait\': 100,\n\'cpu_max_proc
esses\': 3,\n\'cpu_max_lock_wait\': 100\n}]\n},\n\'face\': {\n\'general\':{\n\'pattern\': \'.*\',\n\'same_model_sequence_strategy\': \'first\'\n},\n\'sequence\': [{\n\'save_unknown_faces\':\'yes\',\n\'
save_unknown_faces_leeway_pixels\':100,\n\'face_detection_framework\': \'dlib\',\n\'known_images_path\': \'/var/lib/zmeventnotification/known_faces\',\n\'unknown_images_path\': \'/var/lib/zmeventnotifi
cation/unknown_faces\',\n\'face_model\': \'cnn\',\n\'face_train_model\': \'cnn\',\n\'face_recog_dist_threshold\': \'0.6\',\n\'face_num_jitters\': \'1\',\n\'face_upsample_times\':\'1\',\n\'gpu_max_proce
sses\': 1,\n\'gpu_max_lock_wait\': 100,\n\'cpu_max_processes\': 3,\n\'cpu_max_lock_wait\': 100,\n\'max_size\':800\n}]\n},\n\n\'alpr\': {\n\'general\':{\n\'same_model_sequence_strategy\': \'first\',\n\'
pre_existing_labels\':[\'car\', \'motorbike\', \'bus\', \'truck\', \'boat\'],\n\'pattern\': \'.*\'\n\n},\n\'sequence\': [{\n\'alpr_api_type\': \'cloud\',\n\'alpr_service\': \'plate_recognizer\',\n\'alp
r_key\': \'"your_plate_recognizer_api_key"\',\n\'platrec_stats\': \'yes\',\n\'platerec_min_dscore\': 0.1,\n\'platerec_min_score\': 0.2,\n\'max_size\':1600\n}]\n}\n}', 'stream_sequence': "{\n'frame_stra
tegy': 'most_models',\n'frame_set': 'snapshot,alarm',\n'resize':800\n\n}", 'object_detection_pattern': '.*', 'object_framework': 'opencv', 'object_processor': 'gpu', 'object_config': '/var/lib/zmeventn
otification/models/tinyyolov4/yolov4-tiny.cfg', 'object_weights': '/var/lib/zmeventnotification/models/tinyyolov4/yolov4-tiny.weights', 'object_labels': '/var/lib/zmeventnotification/models/tinyyolov4/
coco.names', 'object_min_confidence': 0.3, 'face_detection_pattern': '.*', 'face_detection_framework': 'dlib', 'face_recognition_framework': 'dlib', 'face_processor': 'cpu', 'face_num_jitters': 1, 'fac
e_upsample_times': 1, 'face_model': 'cnn', 'face_train_model': 'cnn', 'face_recog_dist_threshold': 0.6, 'face_recog_knn_algo': 'ball_tree', 'known_images_path': '/var/lib/zmeventnotification/known_face
s', 'unknown_images_path': '/var/lib/zmeventnotification/unknown_faces', 'unknown_face_name': 'unknown face', 'save_unknown_faces': 'yes', 'save_unknown_faces_leeway_pixels': 100, 'alpr_service': 'plat
e_recognizer', 'alpr_detection_pattern': '.*', 'alpr_url': None, 'alpr_key': '"your_plate_recognizer_api_key"', 'alpr_use_after_detection_only': 'yes', 'alpr_api_type': 'cloud', 'platerec_stats': 'yes'
, 'platerec_regions': None, 'platerec_min_dscore': 0.1, 'platerec_min_score': 0.2, 'openalpr_recognize_vehicle': '0', 'openalpr_country': 'us', 'openalpr_state': None, 'openalpr_min_confidence': '0.3',
 'openalpr_cmdline_binary': 'alpr', 'openalpr_cmdline_params': '-j -d', 'openalpr_cmdline_min_confidence': 0.3, 'tpu_object_weights': '/var/lib/zmeventnotification/models/coral_edgetpu/ssd_mobilenet_v2
_coco_quant_postprocess_edgetpu.tflite', 'tpu_object_labels': '/var/lib/zmeventnotification/models/coral_edgetpu/coco_indexed.names', 'tpu_object_framework': 'coral_edgetpu', 'tpu_object_processor': 't
pu', 'tpu_min_confidence': '0.6', 'yolo4_object_weights': '/var/lib/zmeventnotification/models/yolov4/yolov4.weights', 'yolo4_object_labels': '/var/lib/zmeventnotification/models/yolov4/coco.names', 'y
olo4_object_config': '/var/lib/zmeventnotification/models/yolov4/yolov4.cfg', 'yolo4_object_framework': 'opencv', 'yolo4_object_processor': 'gpu', 'yolo3_object_weights': '/var/lib/zmeventnotification/
models/yolov3/yolov3.weights', 'yolo3_object_labels': '/var/lib/zmeventnotification/models/yolov3/coco.names', 'yolo3_object_config': '/var/lib/zmeventnotification/models/yolov3/yolov3.cfg', 'yolo3_obj
ect_framework': 'opencv', 'yolo3_object_processor': 'gpu', 'tinyyolo_object_config': '/var/lib/zmeventnotification/models/tinyyolov4/yolov4-tiny.cfg', 'tinyyolo_object_weights': '/var/lib/zmeventnotifi
cation/models/tinyyolov4/yolov4-tiny.weights', 'tinyyolo_object_labels': '/var/lib/zmeventnotification/models/tinyyolov4/coco.names', 'tinyyolo_object_framework': 'opencv', 'tinyyolo_object_processor':
 'gpu'}]
12/29/20 11:37:46 zmesdetect_m1[399] DBG2 yolo.py:35 [Semaphore: max:1, name:pyzm_uid33_gpu_lock, timeout:100]
12/29/20 11:37:46 zmesdetect_m1[399] DBG2 zm_detect.py:370 [using g.config['object_detection_pattern']=.*]
12/29/20 11:37:46 zmesdetect_m1[399] DBG1 zm_detect.py:403 [Using model: object with /var/lib/zmeventnotification/images/890-alarm.jpg]
12/29/20 11:37:46 zmesdetect_m1[399] DBG2 yolo.py:45 [Waiting for gpu lock...]
12/29/20 11:37:46 zmesdetect_m1[399] DBG2 yolo.py:47 [Got gpu lock ..]
12/29/20 11:37:46 zmesdetect_m1[399] DBG1 yolo.py:74 [|--------- Loading Yolo model from disk ---------|]
12/29/20 11:37:46 zmesdetect_m1[399] DBG1 yolo.py:82 [Yolo initialization (loading model from disk) took: 0:00:00.033025]
12/29/20 11:37:46 zmesdetect_m1[399] DBG2 yolo.py:96 [Setting CUDA backend for OpenCV]
12/29/20 11:37:46 zmesdetect_m1[399] DBG3 yolo.py:97 [If you did not set your CUDA_ARCH_BIN correctly during OpenCV compilation, you will get errors during detection related to invalid device/make_poli
cy]
12/29/20 11:37:46 zmesdetect_m1[399] DBG1 yolo.py:135 [|---------- YOLO (input image: 800w*450h, model resize dimensions: 416w*416h) ----------|]
12/29/20 11:37:51 zmesdetect_m1[399] FAT zm_detect.py:860 [Unrecoverable error:OpenCV(4.4.0) /opencv-build/build/opencv-4.4.0/modules/dnn/src/cuda4dnn/csl/cublas.hpp:78: error: (-217:Gpu API call) CUBL
AS_STATUS_NOT_INITIALIZED in function 'UniqueHandle'
 Traceback:Traceback (most recent call last):
  File "/var/lib/zmeventnotification/bin/zm_detect.py", line 857, in <module>
    main_handler()
  File "/var/lib/zmeventnotification/bin/zm_detect.py", line 432, in main_handler
    b, l, c = m.detect(original_image)
  File "/usr/local/lib/python3.6/dist-packages/pyzm/ml/object.py", line 54, in detect
    b,l,c = self.model.detect(image)
  File "/usr/local/lib/python3.6/dist-packages/pyzm/ml/yolo.py", line 149, in detect
    outs = self.net.forward(ln)
cv2.error: OpenCV(4.4.0) /opencv-build/build/opencv-4.4.0/modules/dnn/src/cuda4dnn/csl/cublas.hpp:78: error: (-217:Gpu API call) CUBLAS_STATUS_NOT_INITIALIZED in function 'UniqueHandle'

]
12/29/20 11:37:56 zmesdetect_m1[420] INF zm_detect.py:208 [---------| pyzm version:0.3.8, hook version:6.0.7,  ES version:6.0.7 , OpenCV version:4.4.0|------------]
12/29/20 11:37:56 zmesdetect_m1[420] DBG1 utils.py:405 [secret filename: /etc/zm/secrets.ini]
12/29/20 11:37:56 zmesdetect_m1[420] DBG2 utils.py:378 [Secret token found in config: !ZM_PORTAL]
12/29/20 11:37:56 zmesdetect_m1[420] DBG2 utils.py:378 [Secret token found in config: !ZM_USER]
12/29/20 11:37:56 zmesdetect_m1[420] DBG2 utils.py:378 [Secret token found in config: !ZM_PASSWORD]
12/29/20 11:37:56 zmesdetect_m1[420] DBG2 utils.py:378 [Secret token found in config: !ZM_API_PORTAL]
12/29/20 11:37:56 zmesdetect_m1[420] DBG2 utils.py:378 [Secret token found in config: !ML_USER]
12/29/20 11:37:56 zmesdetect_m1[420] DBG2 utils.py:378 [Secret token found in config: !ML_PASSWORD]
12/29/20 11:37:56 zmesdetect_m1[420] DBG2 utils.py:378 [Secret token found in config: !PLATEREC_ALPR_KEY]
12/29/20 11:37:56 zmesdetect_m1[420] DBG1 utils.py:440 [allowing self-signed certs to work...]
12/29/20 11:37:56 zmesdetect_m1[420] DBG4 utils.py:450 [Now checking for monitor overrides]
12/29/20 11:37:56 zmesdetect_m1[420] DBG4 utils.py:513 [Finally, doing parameter substitution]
12/29/20 11:37:56 zmesdetect_m1[420] INF zm_detect.py:234 [Importing local classes for Object/Face]
12/29/20 11:37:56 zmesdetect_m1[420] DBG1 utils.py:280 [Trying to download http://localhost/zm/index.php?view=image&eid=891&fid=alarm&username=admin&password=*****]
12/29/20 11:37:56 zmesdetect_m1[420] DBG1 utils.py:299 [Trying to download http://localhost/zm/index.php?view=image&eid=891&fid=snapshot&username=admin&password=*****]
12/29/20 11:37:56 zmesdetect_m1[420] DBG1 zm_detect.py:295 [No polygon area specfied, so adding a full image polygon:[{'name': 'full_image', 'value': [(0, 0), (1280, 0), (1280, 720), (0, 720)], 'patter
n': None}]]
12/29/20 11:37:56 zmesdetect_m1[420] DBG1 zm_detect.py:298 [resizing to 800 before analysis...]
12/29/20 11:37:56 zmesdetect_m1[420] DBG2 utils.py:138 [resized polygons x=0.625/y=0.625: [{'name': 'full_image', 'value': [(0, 0), (800, 0), (800, 450), (0, 450)], 'pattern': None}]]
12/29/20 11:37:56 zmesdetect_m1[420] DBG1 zm_detect.py:319 [User ALPR if vehicle found: False]
12/29/20 11:37:56 zmesdetect_m1[420] DBG4 yolo.py:26 [Yolo init params: {'pyzm_overrides': {'log_level_debug': 5}, 'secrets': '/etc/zm/secrets.ini', 'version': '1.2', 'cpu_max_processes': 3, 'gpu_max_p
rocesses': 1, 'tpu_max_processes': 1, 'cpu_max_lock_wait': 100, 'gpu_max_lock_wait': 100, 'tpu_max_lock_wait': 100, 'base_data_path': '/var/lib/zmeventnotification', 'portal': 'http://localhost/zm', 'a
pi_portal': 'http://localhost/zm/api', 'user': 'admin', 'password': 'plexnchi11', 'basic_user': '', 'basic_password': '', 'image_path': '/var/lib/zmeventnotification/images', 'match_past_detections': '
no', 'past_det_max_diff_area': '5%', 'max_detection_size': '90%', 'frame_id': 'bestmatch', 'bestmatch_order': 'a,s', 'wait': '0', 'resize': '800', 'delete_after_analyze': 'yes', 'show_percent': 'yes', 
'allow_self_signed': 'yes', 'write_image_to_zm': 'yes', 'write_debug_image': 'no', 'detection_sequence': ['object'], 'detection_mode': 'all', 'import_zm_zones': 'no', 'only_triggered_zm_zones': 'no', '
poly_color': (255, 255, 255), 'poly_thickness': 2, 'create_animation': 'no', 'animation_types': "'mp4,gif'", 'animation_width': 640, 'animation_retry_sleep': 15, 'animation_max_tries': 4, 'fast_gif': '
no', 'ml_gateway': None, 'ml_fallback_local': 'no', 'ml_user': '"your_mlapi_user"', 'ml_password': '"your_mlapi_password"', 'use_sequence': 'yes', 'ml_sequence': '{\n\'general\': {\n\'model_sequence\':
 \'object\',\n\n},\n\'object\': {\n\'general\':{\n\'pattern\':\'.*\',\n\'same_model_sequence_strategy\': \'first\' # also \'most\', \'most_unique\'s\n},\n\'sequence\': [{\n\'object_config\':\'/var/lib/
zmeventnotification/models/tinyyolov4/yolov4-tiny.cfg\',\n\'object_weights\':\'/var/lib/zmeventnotification/models/tinyyolov4/yolov4-tiny.weights\',\n\'object_labels\': \'/var/lib/zmeventnotification/m
odels/tinyyolov4/coco.names\',\n\'object_min_confidence\': 0.3,\n\'object_framework\':\'opencv\',\n\'object_processor\': \'gpu\',\n\'gpu_max_processes\': 1,\n\'gpu_max_lock_wait\': 100,\n\'cpu_max_proc
esses\': 3,\n\'cpu_max_lock_wait\': 100\n}]\n},\n\'face\': {\n\'general\':{\n\'pattern\': \'.*\',\n\'same_model_sequence_strategy\': \'first\'\n},\n\'sequence\': [{\n\'save_unknown_faces\':\'yes\',\n\'
save_unknown_faces_leeway_pixels\':100,\n\'face_detection_framework\': \'dlib\',\n\'known_images_path\': \'/var/lib/zmeventnotification/known_faces\',\n\'unknown_images_path\': \'/var/lib/zmeventnotifi
cation/unknown_faces\',\n\'face_model\': \'cnn\',\n\'face_train_model\': \'cnn\',\n\'face_recog_dist_threshold\': \'0.6\',\n\'face_num_jitters\': \'1\',\n\'face_upsample_times\':\'1\',\n\'gpu_max_proce
sses\': 1,\n\'gpu_max_lock_wait\': 100,\n\'cpu_max_processes\': 3,\n\'cpu_max_lock_wait\': 100,\n\'max_size\':800\n}]\n},\n\n\'alpr\': {\n\'general\':{\n\'same_model_sequence_strategy\': \'first\',\n\'
pre_existing_labels\':[\'car\', \'motorbike\', \'bus\', \'truck\', \'boat\'],\n\'pattern\': \'.*\'\n\n},\n\'sequence\': [{\n\'alpr_api_type\': \'cloud\',\n\'alpr_service\': \'plate_recognizer\',\n\'alp
r_key\': \'"your_plate_recognizer_api_key"\',\n\'platrec_stats\': \'yes\',\n\'platerec_min_dscore\': 0.1,\n\'platerec_min_score\': 0.2,\n\'max_size\':1600\n}]\n}\n}', 'stream_sequence': "{\n'frame_stra
tegy': 'most_models',\n'frame_set': 'snapshot,alarm',\n'resize':800\n\n}", 'object_detection_pattern': '.*', 'object_framework': 'opencv', 'object_processor': 'gpu', 'object_config': '/var/lib/zmeventn
otification/models/tinyyolov4/yolov4-tiny.cfg', 'object_weights': '/var/lib/zmeventnotification/models/tinyyolov4/yolov4-tiny.weights', 'object_labels': '/var/lib/zmeventnotification/models/tinyyolov4/
coco.names', 'object_min_confidence': 0.3, 'face_detection_pattern': '.*', 'face_detection_framework': 'dlib', 'face_recognition_framework': 'dlib', 'face_processor': 'cpu', 'face_num_jitters': 1, 'fac
e_upsample_times': 1, 'face_model': 'cnn', 'face_train_model': 'cnn', 'face_recog_dist_threshold': 0.6, 'face_recog_knn_algo': 'ball_tree', 'known_images_path': '/var/lib/zmeventnotification/known_face
s', 'unknown_images_path': '/var/lib/zmeventnotification/unknown_faces', 'unknown_face_name': 'unknown face', 'save_unknown_faces': 'yes', 'save_unknown_faces_leeway_pixels': 100, 'alpr_service': 'plat
e_recognizer', 'alpr_detection_pattern': '.*', 'alpr_url': None, 'alpr_key': '"your_plate_recognizer_api_key"', 'alpr_use_after_detection_only': 'yes', 'alpr_api_type': 'cloud', 'platerec_stats': 'yes'
, 'platerec_regions': None, 'platerec_min_dscore': 0.1, 'platerec_min_score': 0.2, 'openalpr_recognize_vehicle': '0', 'openalpr_country': 'us', 'openalpr_state': None, 'openalpr_min_confidence': '0.3',
 'openalpr_cmdline_binary': 'alpr', 'openalpr_cmdline_params': '-j -d', 'openalpr_cmdline_min_confidence': 0.3, 'tpu_object_weights': '/var/lib/zmeventnotification/models/coral_edgetpu/ssd_mobilenet_v2
_coco_quant_postprocess_edgetpu.tflite', 'tpu_object_labels': '/var/lib/zmeventnotification/models/coral_edgetpu/coco_indexed.names', 'tpu_object_framework': 'coral_edgetpu', 'tpu_object_processor': 't
pu', 'tpu_min_confidence': '0.6', 'yolo4_object_weights': '/var/lib/zmeventnotification/models/yolov4/yolov4.weights', 'yolo4_object_labels': '/var/lib/zmeventnotification/models/yolov4/coco.names', 'y
olo4_object_config': '/var/lib/zmeventnotification/models/yolov4/yolov4.cfg', 'yolo4_object_framework': 'opencv', 'yolo4_object_processor': 'gpu', 'yolo3_object_weights': '/var/lib/zmeventnotification/
models/yolov3/yolov3.weights', 'yolo3_object_labels': '/var/lib/zmeventnotification/models/yolov3/coco.names', 'yolo3_object_config': '/var/lib/zmeventnotification/models/yolov3/yolov3.cfg', 'yolo3_obj
ect_framework': 'opencv', 'yolo3_object_processor': 'gpu', 'tinyyolo_object_config': '/var/lib/zmeventnotification/models/tinyyolov4/yolov4-tiny.cfg', 'tinyyolo_object_weights': '/var/lib/zmeventnotifi
cation/models/tinyyolov4/yolov4-tiny.weights', 'tinyyolo_object_labels': '/var/lib/zmeventnotification/models/tinyyolov4/coco.names', 'tinyyolo_object_framework': 'opencv', 'tinyyolo_object_processor':
 'gpu'}]
12/29/20 11:37:56 zmesdetect_m1[420] DBG2 yolo.py:35 [Semaphore: max:1, name:pyzm_uid33_gpu_lock, timeout:100]
12/29/20 11:37:56 zmesdetect_m1[420] DBG2 zm_detect.py:370 [using g.config['object_detection_pattern']=.*]
12/29/20 11:37:56 zmesdetect_m1[420] DBG1 zm_detect.py:403 [Using model: object with /var/lib/zmeventnotification/images/891-alarm.jpg]
12/29/20 11:37:56 zmesdetect_m1[420] DBG2 yolo.py:45 [Waiting for gpu lock...]
12/29/20 11:37:56 zmesdetect_m1[420] DBG2 yolo.py:47 [Got gpu lock ..]
12/29/20 11:37:56 zmesdetect_m1[420] DBG1 yolo.py:74 [|--------- Loading Yolo model from disk ---------|]
12/29/20 11:37:56 zmesdetect_m1[420] DBG1 yolo.py:82 [Yolo initialization (loading model from disk) took: 0:00:00.034711]
12/29/20 11:37:56 zmesdetect_m1[420] DBG2 yolo.py:96 [Setting CUDA backend for OpenCV]
12/29/20 11:37:56 zmesdetect_m1[420] DBG3 yolo.py:97 [If you did not set your CUDA_ARCH_BIN correctly during OpenCV compilation, you will get errors during detection related to invalid device/make_poli
cy]
12/29/20 11:37:56 zmesdetect_m1[420] DBG1 yolo.py:135 [|---------- YOLO (input image: 800w*450h, model resize dimensions: 416w*416h) ----------|]
12/29/20 11:38:10 zmesdetect_m1[462] INF zm_detect.py:208 [---------| pyzm version:0.3.8, hook version:6.0.7,  ES version:6.0.7 , OpenCV version:4.4.0|------------]
12/29/20 11:38:10 zmesdetect_m1[462] DBG1 utils.py:405 [secret filename: /etc/zm/secrets.ini]
12/29/20 11:38:10 zmesdetect_m1[462] DBG2 utils.py:378 [Secret token found in config: !ZM_PORTAL]
12/29/20 11:38:10 zmesdetect_m1[462] DBG2 utils.py:378 [Secret token found in config: !ZM_USER]
12/29/20 11:38:10 zmesdetect_m1[462] DBG2 utils.py:378 [Secret token found in config: !ZM_PASSWORD]
12/29/20 11:38:10 zmesdetect_m1[462] DBG2 utils.py:378 [Secret token found in config: !ZM_API_PORTAL]
12/29/20 11:38:10 zmesdetect_m1[462] DBG2 utils.py:378 [Secret token found in config: !ML_USER]
12/29/20 11:38:10 zmesdetect_m1[462] DBG2 utils.py:378 [Secret token found in config: !ML_PASSWORD]
12/29/20 11:38:10 zmesdetect_m1[462] DBG2 utils.py:378 [Secret token found in config: !PLATEREC_ALPR_KEY]
12/29/20 11:38:10 zmesdetect_m1[462] DBG1 utils.py:440 [allowing self-signed certs to work...]
12/29/20 11:38:10 zmesdetect_m1[462] DBG4 utils.py:450 [Now checking for monitor overrides]
12/29/20 11:38:10 zmesdetect_m1[462] DBG4 utils.py:513 [Finally, doing parameter substitution]
12/29/20 11:38:10 zmesdetect_m1[462] INF zm_detect.py:234 [Importing local classes for Object/Face]
12/29/20 11:38:10 zmesdetect_m1[462] DBG1 utils.py:280 [Trying to download http://localhost/zm/index.php?view=image&eid=892&fid=alarm&username=admin&password=*****]
12/29/20 11:38:10 zmesdetect_m1[462] DBG1 utils.py:299 [Trying to download http://localhost/zm/index.php?view=image&eid=892&fid=snapshot&username=admin&password=*****]
12/29/20 11:38:11 zmesdetect_m1[462] DBG1 zm_detect.py:295 [No polygon area specfied, so adding a full image polygon:[{'name': 'full_image', 'value': [(0, 0), (1280, 0), (1280, 720), (0, 720)], 'patter
n': None}]]
12/29/20 11:38:11 zmesdetect_m1[462] DBG1 zm_detect.py:298 [resizing to 800 before analysis...]
12/29/20 11:38:11 zmesdetect_m1[462] DBG2 utils.py:138 [resized polygons x=0.625/y=0.625: [{'name': 'full_image', 'value': [(0, 0), (800, 0), (800, 450), (0, 450)], 'pattern': None}]]
12/29/20 11:38:11 zmesdetect_m1[462] DBG1 zm_detect.py:319 [User ALPR if vehicle found: False]
12/29/20 11:38:11 zmesdetect_m1[462] DBG4 yolo.py:26 [Yolo init params: {'pyzm_overrides': {'log_level_debug': 5}, 'secrets': '/etc/zm/secrets.ini', 'version': '1.2', 'cpu_max_processes': 3, 'gpu_max_p
rocesses': 1, 'tpu_max_processes': 1, 'cpu_max_lock_wait': 100, 'gpu_max_lock_wait': 100, 'tpu_max_lock_wait': 100, 'base_data_path': '/var/lib/zmeventnotification', 'portal': 'http://localhost/zm', 'a
pi_portal': 'http://localhost/zm/api', 'user': 'admin', 'password': 'plexnchi11', 'basic_user': '', 'basic_password': '', 'image_path': '/var/lib/zmeventnotification/images', 'match_past_detections': '
no', 'past_det_max_diff_area': '5%', 'max_detection_size': '90%', 'frame_id': 'bestmatch', 'bestmatch_order': 'a,s', 'wait': '0', 'resize': '800', 'delete_after_analyze': 'yes', 'show_percent': 'yes', 
'allow_self_signed': 'yes', 'write_image_to_zm': 'yes', 'write_debug_image': 'no', 'detection_sequence': ['object'], 'detection_mode': 'all', 'import_zm_zones': 'no', 'only_triggered_zm_zones': 'no', '
poly_color': (255, 255, 255), 'poly_thickness': 2, 'create_animation': 'no', 'animation_types': "'mp4,gif'", 'animation_width': 640, 'animation_retry_sleep': 15, 'animation_max_tries': 4, 'fast_gif': '
no', 'ml_gateway': None, 'ml_fallback_local': 'no', 'ml_user': '"your_mlapi_user"', 'ml_password': '"your_mlapi_password"', 'use_sequence': 'yes', 'ml_sequence': '{\n\'general\': {\n\'model_sequence\':
 \'object\',\n\n},\n\'object\': {\n\'general\':{\n\'pattern\':\'.*\',\n\'same_model_sequence_strategy\': \'first\' # also \'most\', \'most_unique\'s\n},\n\'sequence\': [{\n\'object_config\':\'/var/lib/
zmeventnotification/models/tinyyolov4/yolov4-tiny.cfg\',\n\'object_weights\':\'/var/lib/zmeventnotification/models/tinyyolov4/yolov4-tiny.weights\',\n\'object_labels\': \'/var/lib/zmeventnotification/m
odels/tinyyolov4/coco.names\',\n\'object_min_confidence\': 0.3,\n\'object_framework\':\'opencv\',\n\'object_processor\': \'gpu\',\n\'gpu_max_processes\': 1,\n\'gpu_max_lock_wait\': 100,\n\'cpu_max_proc
esses\': 3,\n\'cpu_max_lock_wait\': 100\n}]\n},\n\'face\': {\n\'general\':{\n\'pattern\': \'.*\',\n\'same_model_sequence_strategy\': \'first\'\n},\n\'sequence\': [{\n\'save_unknown_faces\':\'yes\',\n\'
save_unknown_faces_leeway_pixels\':100,\n\'face_detection_framework\': \'dlib\',\n\'known_images_path\': \'/var/lib/zmeventnotification/known_faces\',\n\'unknown_images_path\': \'/var/lib/zmeventnotifi
cation/unknown_faces\',\n\'face_model\': \'cnn\',\n\'face_train_model\': \'cnn\',\n\'face_recog_dist_threshold\': \'0.6\',\n\'face_num_jitters\': \'1\',\n\'face_upsample_times\':\'1\',\n\'gpu_max_proce
sses\': 1,\n\'gpu_max_lock_wait\': 100,\n\'cpu_max_processes\': 3,\n\'cpu_max_lock_wait\': 100,\n\'max_size\':800\n}]\n},\n\n\'alpr\': {\n\'general\':{\n\'same_model_sequence_strategy\': \'first\',\n\'
pre_existing_labels\':[\'car\', \'motorbike\', \'bus\', \'truck\', \'boat\'],\n\'pattern\': \'.*\'\n\n},\n\'sequence\': [{\n\'alpr_api_type\': \'cloud\',\n\'alpr_service\': \'plate_recognizer\',\n\'alp
r_key\': \'"your_plate_recognizer_api_key"\',\n\'platrec_stats\': \'yes\',\n\'platerec_min_dscore\': 0.1,\n\'platerec_min_score\': 0.2,\n\'max_size\':1600\n}]\n}\n}', 'stream_sequence': "{\n'frame_stra
tegy': 'most_models',\n'frame_set': 'snapshot,alarm',\n'resize':800\n\n}", 'object_detection_pattern': '.*', 'object_framework': 'opencv', 'object_processor': 'gpu', 'object_config': '/var/lib/zmeventn
otification/models/tinyyolov4/yolov4-tiny.cfg', 'object_weights': '/var/lib/zmeventnotification/models/tinyyolov4/yolov4-tiny.weights', 'object_labels': '/var/lib/zmeventnotification/models/tinyyolov4/
coco.names', 'object_min_confidence': 0.3, 'face_detection_pattern': '.*', 'face_detection_framework': 'dlib', 'face_recognition_framework': 'dlib', 'face_processor': 'cpu', 'face_num_jitters': 1, 'fac
e_upsample_times': 1, 'face_model': 'cnn', 'face_train_model': 'cnn', 'face_recog_dist_threshold': 0.6, 'face_recog_knn_algo': 'ball_tree', 'known_images_path': '/var/lib/zmeventnotification/known_face
s', 'unknown_images_path': '/var/lib/zmeventnotification/unknown_faces', 'unknown_face_name': 'unknown face', 'save_unknown_faces': 'yes', 'save_unknown_faces_leeway_pixels': 100, 'alpr_service': 'plat
e_recognizer', 'alpr_detection_pattern': '.*', 'alpr_url': None, 'alpr_key': '"your_plate_recognizer_api_key"', 'alpr_use_after_detection_only': 'yes', 'alpr_api_type': 'cloud', 'platerec_stats': 'yes'
, 'platerec_regions': None, 'platerec_min_dscore': 0.1, 'platerec_min_score': 0.2, 'openalpr_recognize_vehicle': '0', 'openalpr_country': 'us', 'openalpr_state': None, 'openalpr_min_confidence': '0.3',
 'openalpr_cmdline_binary': 'alpr', 'openalpr_cmdline_params': '-j -d', 'openalpr_cmdline_min_confidence': 0.3, 'tpu_object_weights': '/var/lib/zmeventnotification/models/coral_edgetpu/ssd_mobilenet_v2
_coco_quant_postprocess_edgetpu.tflite', 'tpu_object_labels': '/var/lib/zmeventnotification/models/coral_edgetpu/coco_indexed.names', 'tpu_object_framework': 'coral_edgetpu', 'tpu_object_processor': 't
pu', 'tpu_min_confidence': '0.6', 'yolo4_object_weights': '/var/lib/zmeventnotification/models/yolov4/yolov4.weights', 'yolo4_object_labels': '/var/lib/zmeventnotification/models/yolov4/coco.names', 'y
olo4_object_config': '/var/lib/zmeventnotification/models/yolov4/yolov4.cfg', 'yolo4_object_framework': 'opencv', 'yolo4_object_processor': 'gpu', 'yolo3_object_weights': '/var/lib/zmeventnotification/
models/yolov3/yolov3.weights', 'yolo3_object_labels': '/var/lib/zmeventnotification/models/yolov3/coco.names', 'yolo3_object_config': '/var/lib/zmeventnotification/models/yolov3/yolov3.cfg', 'yolo3_obj
ect_framework': 'opencv', 'yolo3_object_processor': 'gpu', 'tinyyolo_object_config': '/var/lib/zmeventnotification/models/tinyyolov4/yolov4-tiny.cfg', 'tinyyolo_object_weights': '/var/lib/zmeventnotifi
cation/models/tinyyolov4/yolov4-tiny.weights', 'tinyyolo_object_labels': '/var/lib/zmeventnotification/models/tinyyolov4/coco.names', 'tinyyolo_object_framework': 'opencv', 'tinyyolo_object_processor':
 'gpu'}]
12/29/20 11:38:11 zmesdetect_m1[462] DBG2 yolo.py:35 [Semaphore: max:1, name:pyzm_uid33_gpu_lock, timeout:100]
12/29/20 11:38:11 zmesdetect_m1[462] DBG2 zm_detect.py:370 [using g.config['object_detection_pattern']=.*]
12/29/20 11:38:11 zmesdetect_m1[462] DBG1 zm_detect.py:403 [Using model: object with /var/lib/zmeventnotification/images/892-alarm.jpg]
12/29/20 11:38:11 zmesdetect_m1[462] DBG2 yolo.py:45 [Waiting for gpu lock...]
12/29/20 11:38:45 zmesdetect_m1[502] INF zm_detect.py:208 [---------| pyzm version:0.3.8, hook version:6.0.7,  ES version:6.0.7 , OpenCV version:4.4.0|------------]
12/29/20 11:38:45 zmesdetect_m1[502] DBG1 utils.py:405 [secret filename: /etc/zm/secrets.ini]
12/29/20 11:38:45 zmesdetect_m1[502] DBG2 utils.py:378 [Secret token found in config: !ZM_PORTAL]
12/29/20 11:38:45 zmesdetect_m1[502] DBG2 utils.py:378 [Secret token found in config: !ZM_USER]
12/29/20 11:38:45 zmesdetect_m1[502] DBG2 utils.py:378 [Secret token found in config: !ZM_PASSWORD]
12/29/20 11:38:45 zmesdetect_m1[502] DBG2 utils.py:378 [Secret token found in config: !ZM_API_PORTAL]
12/29/20 11:38:45 zmesdetect_m1[502] DBG2 utils.py:378 [Secret token found in config: !ML_USER]
12/29/20 11:38:45 zmesdetect_m1[502] DBG2 utils.py:378 [Secret token found in config: !ML_PASSWORD]
12/29/20 11:38:45 zmesdetect_m1[502] DBG2 utils.py:378 [Secret token found in config: !PLATEREC_ALPR_KEY]
12/29/20 11:38:45 zmesdetect_m1[502] DBG1 utils.py:440 [allowing self-signed certs to work...]
12/29/20 11:38:45 zmesdetect_m1[502] DBG4 utils.py:450 [Now checking for monitor overrides]
12/29/20 11:38:45 zmesdetect_m1[502] DBG4 utils.py:513 [Finally, doing parameter substitution]
12/29/20 11:38:45 zmesdetect_m1[502] INF zm_detect.py:234 [Importing local classes for Object/Face]
12/29/20 11:38:45 zmesdetect_m1[502] DBG1 utils.py:280 [Trying to download http://localhost/zm/index.php?view=image&eid=893&fid=alarm&username=admin&password=*****]
12/29/20 11:38:46 zmesdetect_m1[502] DBG1 utils.py:299 [Trying to download http://localhost/zm/index.php?view=image&eid=893&fid=snapshot&username=admin&password=*****]
12/29/20 11:38:46 zmesdetect_m1[502] DBG1 zm_detect.py:295 [No polygon area specfied, so adding a full image polygon:[{'name': 'full_image', 'value': [(0, 0), (1280, 0), (1280, 720), (0, 720)], 'patter
n': None}]]
12/29/20 11:38:46 zmesdetect_m1[502] DBG1 zm_detect.py:298 [resizing to 800 before analysis...]
12/29/20 11:38:46 zmesdetect_m1[502] DBG2 utils.py:138 [resized polygons x=0.625/y=0.625: [{'name': 'full_image', 'value': [(0, 0), (800, 0), (800, 450), (0, 450)], 'pattern': None}]]
12/29/20 11:38:46 zmesdetect_m1[502] DBG1 zm_detect.py:319 [User ALPR if vehicle found: False]
12/29/20 11:38:46 zmesdetect_m1[502] DBG4 yolo.py:26 [Yolo init params: {'pyzm_overrides': {'log_level_debug': 5}, 'secrets': '/etc/zm/secrets.ini', 'version': '1.2', 'cpu_max_processes': 3, 'gpu_max_p
rocesses': 1, 'tpu_max_processes': 1, 'cpu_max_lock_wait': 100, 'gpu_max_lock_wait': 100, 'tpu_max_lock_wait': 100, 'base_data_path': '/var/lib/zmeventnotification', 'portal': 'http://localhost/zm', 'a
pi_portal': 'http://localhost/zm/api', 'user': 'admin', 'password': 'plexnchi11', 'basic_user': '', 'basic_password': '', 'image_path': '/var/lib/zmeventnotification/images', 'match_past_detections': '
no', 'past_det_max_diff_area': '5%', 'max_detection_size': '90%', 'frame_id': 'bestmatch', 'bestmatch_order': 'a,s', 'wait': '0', 'resize': '800', 'delete_after_analyze': 'yes', 'show_percent': 'yes', 
'allow_self_signed': 'yes', 'write_image_to_zm': 'yes', 'write_debug_image': 'no', 'detection_sequence': ['object'], 'detection_mode': 'all', 'import_zm_zones': 'no', 'only_triggered_zm_zones': 'no', '
poly_color': (255, 255, 255), 'poly_thickness': 2, 'create_animation': 'no', 'animation_types': "'mp4,gif'", 'animation_width': 640, 'animation_retry_sleep': 15, 'animation_max_tries': 4, 'fast_gif': '
no', 'ml_gateway': None, 'ml_fallback_local': 'no', 'ml_user': '"your_mlapi_user"', 'ml_password': '"your_mlapi_password"', 'use_sequence': 'yes', 'ml_sequence': '{\n\'general\': {\n\'model_sequence\':
 \'object\',\n\n},\n\'object\': {\n\'general\':{\n\'pattern\':\'.*\',\n\'same_model_sequence_strategy\': \'first\' # also \'most\', \'most_unique\'s\n},\n\'sequence\': [{\n\'object_config\':\'/var/lib/
zmeventnotification/models/tinyyolov4/yolov4-tiny.cfg\',\n\'object_weights\':\'/var/lib/zmeventnotification/models/tinyyolov4/yolov4-tiny.weights\',\n\'object_labels\': \'/var/lib/zmeventnotification/m
odels/tinyyolov4/coco.names\',\n\'object_min_confidence\': 0.3,\n\'object_framework\':\'opencv\',\n\'object_processor\': \'gpu\',\n\'gpu_max_processes\': 1,\n\'gpu_max_lock_wait\': 100,\n\'cpu_max_proc
esses\': 3,\n\'cpu_max_lock_wait\': 100\n}]\n},\n\'face\': {\n\'general\':{\n\'pattern\': \'.*\',\n\'same_model_sequence_strategy\': \'first\'\n},\n\'sequence\': [{\n\'save_unknown_faces\':\'yes\',\n\'
save_unknown_faces_leeway_pixels\':100,\n\'face_detection_framework\': \'dlib\',\n\'known_images_path\': \'/var/lib/zmeventnotification/known_faces\',\n\'unknown_images_path\': \'/var/lib/zmeventnotifi
cation/unknown_faces\',\n\'face_model\': \'cnn\',\n\'face_train_model\': \'cnn\',\n\'face_recog_dist_threshold\': \'0.6\',\n\'face_num_jitters\': \'1\',\n\'face_upsample_times\':\'1\',\n\'gpu_max_proce
sses\': 1,\n\'gpu_max_lock_wait\': 100,\n\'cpu_max_processes\': 3,\n\'cpu_max_lock_wait\': 100,\n\'max_size\':800\n}]\n},\n\n\'alpr\': {\n\'general\':{\n\'same_model_sequence_strategy\': \'first\',\n\'
pre_existing_labels\':[\'car\', \'motorbike\', \'bus\', \'truck\', \'boat\'],\n\'pattern\': \'.*\'\n\n},\n\'sequence\': [{\n\'alpr_api_type\': \'cloud\',\n\'alpr_service\': \'plate_recognizer\',\n\'alp
r_key\': \'"your_plate_recognizer_api_key"\',\n\'platrec_stats\': \'yes\',\n\'platerec_min_dscore\': 0.1,\n\'platerec_min_score\': 0.2,\n\'max_size\':1600\n}]\n}\n}', 'stream_sequence': "{\n'frame_stra
tegy': 'most_models',\n'frame_set': 'snapshot,alarm',\n'resize':800\n\n}", 'object_detection_pattern': '.*', 'object_framework': 'opencv', 'object_processor': 'gpu', 'object_config': '/var/lib/zmeventn
otification/models/tinyyolov4/yolov4-tiny.cfg', 'object_weights': '/var/lib/zmeventnotification/models/tinyyolov4/yolov4-tiny.weights', 'object_labels': '/var/lib/zmeventnotification/models/tinyyolov4/
coco.names', 'object_min_confidence': 0.3, 'face_detection_pattern': '.*', 'face_detection_framework': 'dlib', 'face_recognition_framework': 'dlib', 'face_processor': 'cpu', 'face_num_jitters': 1, 'fac
e_upsample_times': 1, 'face_model': 'cnn', 'face_train_model': 'cnn', 'face_recog_dist_threshold': 0.6, 'face_recog_knn_algo': 'ball_tree', 'known_images_path': '/var/lib/zmeventnotification/known_face
s', 'unknown_images_path': '/var/lib/zmeventnotification/unknown_faces', 'unknown_face_name': 'unknown face', 'save_unknown_faces': 'yes', 'save_unknown_faces_leeway_pixels': 100, 'alpr_service': 'plat
e_recognizer', 'alpr_detection_pattern': '.*', 'alpr_url': None, 'alpr_key': '"your_plate_recognizer_api_key"', 'alpr_use_after_detection_only': 'yes', 'alpr_api_type': 'cloud', 'platerec_stats': 'yes'
, 'platerec_regions': None, 'platerec_min_dscore': 0.1, 'platerec_min_score': 0.2, 'openalpr_recognize_vehicle': '0', 'openalpr_country': 'us', 'openalpr_state': None, 'openalpr_min_confidence': '0.3',
 'openalpr_cmdline_binary': 'alpr', 'openalpr_cmdline_params': '-j -d', 'openalpr_cmdline_min_confidence': 0.3, 'tpu_object_weights': '/var/lib/zmeventnotification/models/coral_edgetpu/ssd_mobilenet_v2
_coco_quant_postprocess_edgetpu.tflite', 'tpu_object_labels': '/var/lib/zmeventnotification/models/coral_edgetpu/coco_indexed.names', 'tpu_object_framework': 'coral_edgetpu', 'tpu_object_processor': 't
pu', 'tpu_min_confidence': '0.6', 'yolo4_object_weights': '/var/lib/zmeventnotification/models/yolov4/yolov4.weights', 'yolo4_object_labels': '/var/lib/zmeventnotification/models/yolov4/coco.names', 'y
olo4_object_config': '/var/lib/zmeventnotification/models/yolov4/yolov4.cfg', 'yolo4_object_framework': 'opencv', 'yolo4_object_processor': 'gpu', 'yolo3_object_weights': '/var/lib/zmeventnotification/
models/yolov3/yolov3.weights', 'yolo3_object_labels': '/var/lib/zmeventnotification/models/yolov3/coco.names', 'yolo3_object_config': '/var/lib/zmeventnotification/models/yolov3/yolov3.cfg', 'yolo3_obj
ect_framework': 'opencv', 'yolo3_object_processor': 'gpu', 'tinyyolo_object_config': '/var/lib/zmeventnotification/models/tinyyolov4/yolov4-tiny.cfg', 'tinyyolo_object_weights': '/var/lib/zmeventnotifi
cation/models/tinyyolov4/yolov4-tiny.weights', 'tinyyolo_object_labels': '/var/lib/zmeventnotification/models/tinyyolov4/coco.names', 'tinyyolo_object_framework': 'opencv', 'tinyyolo_object_processor':
 'gpu'}]
12/29/20 11:38:46 zmesdetect_m1[502] DBG2 yolo.py:35 [Semaphore: max:1, name:pyzm_uid33_gpu_lock, timeout:100]
12/29/20 11:38:46 zmesdetect_m1[502] DBG2 zm_detect.py:370 [using g.config['object_detection_pattern']=.*]
12/29/20 11:38:46 zmesdetect_m1[502] DBG1 zm_detect.py:403 [Using model: object with /var/lib/zmeventnotification/images/893-alarm.jpg]
12/29/20 11:38:46 zmesdetect_m1[502] DBG2 yolo.py:45 [Waiting for gpu lock...]
12/29/20 11:39:05 zmesdetect_m1[540] INF zm_detect.py:208 [---------| pyzm version:0.3.8, hook version:6.0.7,  ES version:6.0.7 , OpenCV version:4.4.0|------------]
12/29/20 11:39:05 zmesdetect_m1[540] DBG1 utils.py:405 [secret filename: /etc/zm/secrets.ini]
12/29/20 11:39:05 zmesdetect_m1[540] DBG2 utils.py:378 [Secret token found in config: !ZM_PORTAL]
12/29/20 11:39:05 zmesdetect_m1[540] DBG2 utils.py:378 [Secret token found in config: !ZM_USER]
12/29/20 11:39:05 zmesdetect_m1[540] DBG2 utils.py:378 [Secret token found in config: !ZM_PASSWORD]
12/29/20 11:39:05 zmesdetect_m1[540] DBG2 utils.py:378 [Secret token found in config: !ZM_API_PORTAL]
12/29/20 11:39:05 zmesdetect_m1[540] DBG2 utils.py:378 [Secret token found in config: !ML_USER]
12/29/20 11:39:05 zmesdetect_m1[540] DBG2 utils.py:378 [Secret token found in config: !ML_PASSWORD]
12/29/20 11:39:05 zmesdetect_m1[540] DBG2 utils.py:378 [Secret token found in config: !PLATEREC_ALPR_KEY]
12/29/20 11:39:05 zmesdetect_m1[540] DBG1 utils.py:440 [allowing self-signed certs to work...]
12/29/20 11:39:05 zmesdetect_m1[540] DBG4 utils.py:450 [Now checking for monitor overrides]
12/29/20 11:39:05 zmesdetect_m1[540] DBG4 utils.py:513 [Finally, doing parameter substitution]
12/29/20 11:39:05 zmesdetect_m1[540] INF zm_detect.py:234 [Importing local classes for Object/Face]
12/29/20 11:39:05 zmesdetect_m1[540] DBG1 utils.py:280 [Trying to download http://localhost/zm/index.php?view=image&eid=894&fid=alarm&username=admin&password=*****]
12/29/20 11:39:05 zmesdetect_m1[540] DBG1 utils.py:299 [Trying to download http://localhost/zm/index.php?view=image&eid=894&fid=snapshot&username=admin&password=*****]
12/29/20 11:39:06 zmesdetect_m1[540] DBG1 zm_detect.py:295 [No polygon area specfied, so adding a full image polygon:[{'name': 'full_image', 'value': [(0, 0), (1280, 0), (1280, 720), (0, 720)], 'patter
n': None}]]
12/29/20 11:39:06 zmesdetect_m1[540] DBG1 zm_detect.py:298 [resizing to 800 before analysis...]
12/29/20 11:39:06 zmesdetect_m1[540] DBG2 utils.py:138 [resized polygons x=0.625/y=0.625: [{'name': 'full_image', 'value': [(0, 0), (800, 0), (800, 450), (0, 450)], 'pattern': None}]]
12/29/20 11:39:06 zmesdetect_m1[540] DBG1 zm_detect.py:319 [User ALPR if vehicle found: False]
12/29/20 11:39:06 zmesdetect_m1[540] DBG4 yolo.py:26 [Yolo init params: {'pyzm_overrides': {'log_level_debug': 5}, 'secrets': '/etc/zm/secrets.ini', 'version': '1.2', 'cpu_max_processes': 3, 'gpu_max_p
rocesses': 1, 'tpu_max_processes': 1, 'cpu_max_lock_wait': 100, 'gpu_max_lock_wait': 100, 'tpu_max_lock_wait': 100, 'base_data_path': '/var/lib/zmeventnotification', 'portal': 'http://localhost/zm', 'a
pi_portal': 'http://localhost/zm/api', 'user': 'admin', 'password': 'plexnchi11', 'basic_user': '', 'basic_password': '', 'image_path': '/var/lib/zmeventnotification/images', 'match_past_detections': '
no', 'past_det_max_diff_area': '5%', 'max_detection_size': '90%', 'frame_id': 'bestmatch', 'bestmatch_order': 'a,s', 'wait': '0', 'resize': '800', 'delete_after_analyze': 'yes', 'show_percent': 'yes', 
'allow_self_signed': 'yes', 'write_image_to_zm': 'yes', 'write_debug_image': 'no', 'detection_sequence': ['object'], 'detection_mode': 'all', 'import_zm_zones': 'no', 'only_triggered_zm_zones': 'no', '
poly_color': (255, 255, 255), 'poly_thickness': 2, 'create_animation': 'no', 'animation_types': "'mp4,gif'", 'animation_width': 640, 'animation_retry_sleep': 15, 'animation_max_tries': 4, 'fast_gif': '
no', 'ml_gateway': None, 'ml_fallback_local': 'no', 'ml_user': '"your_mlapi_user"', 'ml_password': '"your_mlapi_password"', 'use_sequence': 'yes', 'ml_sequence': '{\n\'general\': {\n\'model_sequence\':
 \'object\',\n\n},\n\'object\': {\n\'general\':{\n\'pattern\':\'.*\',\n\'same_model_sequence_strategy\': \'first\' # also \'most\', \'most_unique\'s\n},\n\'sequence\': [{\n\'object_config\':\'/var/lib/
zmeventnotification/models/tinyyolov4/yolov4-tiny.cfg\',\n\'object_weights\':\'/var/lib/zmeventnotification/models/tinyyolov4/yolov4-tiny.weights\',\n\'object_labels\': \'/var/lib/zmeventnotification/m
odels/tinyyolov4/coco.names\',\n\'object_min_confidence\': 0.3,\n\'object_framework\':\'opencv\',\n\'object_processor\': \'gpu\',\n\'gpu_max_processes\': 1,\n\'gpu_max_lock_wait\': 100,\n\'cpu_max_proc
esses\': 3,\n\'cpu_max_lock_wait\': 100\n}]\n},\n\'face\': {\n\'general\':{\n\'pattern\': \'.*\',\n\'same_model_sequence_strategy\': \'first\'\n},\n\'sequence\': [{\n\'save_unknown_faces\':\'yes\',\n\'
save_unknown_faces_leeway_pixels\':100,\n\'face_detection_framework\': \'dlib\',\n\'known_images_path\': \'/var/lib/zmeventnotification/known_faces\',\n\'unknown_images_path\': \'/var/lib/zmeventnotifi
cation/unknown_faces\',\n\'face_model\': \'cnn\',\n\'face_train_model\': \'cnn\',\n\'face_recog_dist_threshold\': \'0.6\',\n\'face_num_jitters\': \'1\',\n\'face_upsample_times\':\'1\',\n\'gpu_max_proce
sses\': 1,\n\'gpu_max_lock_wait\': 100,\n\'cpu_max_processes\': 3,\n\'cpu_max_lock_wait\': 100,\n\'max_size\':800\n}]\n},\n\n\'alpr\': {\n\'general\':{\n\'same_model_sequence_strategy\': \'first\',\n\'
pre_existing_labels\':[\'car\', \'motorbike\', \'bus\', \'truck\', \'boat\'],\n\'pattern\': \'.*\'\n\n},\n\'sequence\': [{\n\'alpr_api_type\': \'cloud\',\n\'alpr_service\': \'plate_recognizer\',\n\'alp
r_key\': \'"your_plate_recognizer_api_key"\',\n\'platrec_stats\': \'yes\',\n\'platerec_min_dscore\': 0.1,\n\'platerec_min_score\': 0.2,\n\'max_size\':1600\n}]\n}\n}', 'stream_sequence': "{\n'frame_stra
tegy': 'most_models',\n'frame_set': 'snapshot,alarm',\n'resize':800\n\n}", 'object_detection_pattern': '.*', 'object_framework': 'opencv', 'object_processor': 'gpu', 'object_config': '/var/lib/zmeventn
otification/models/tinyyolov4/yolov4-tiny.cfg', 'object_weights': '/var/lib/zmeventnotification/models/tinyyolov4/yolov4-tiny.weights', 'object_labels': '/var/lib/zmeventnotification/models/tinyyolov4/
coco.names', 'object_min_confidence': 0.3, 'face_detection_pattern': '.*', 'face_detection_framework': 'dlib', 'face_recognition_framework': 'dlib', 'face_processor': 'cpu', 'face_num_jitters': 1, 'fac
e_upsample_times': 1, 'face_model': 'cnn', 'face_train_model': 'cnn', 'face_recog_dist_threshold': 0.6, 'face_recog_knn_algo': 'ball_tree', 'known_images_path': '/var/lib/zmeventnotification/known_face
s', 'unknown_images_path': '/var/lib/zmeventnotification/unknown_faces', 'unknown_face_name': 'unknown face', 'save_unknown_faces': 'yes', 'save_unknown_faces_leeway_pixels': 100, 'alpr_service': 'plat
e_recognizer', 'alpr_detection_pattern': '.*', 'alpr_url': None, 'alpr_key': '"your_plate_recognizer_api_key"', 'alpr_use_after_detection_only': 'yes', 'alpr_api_type': 'cloud', 'platerec_stats': 'yes'
, 'platerec_regions': None, 'platerec_min_dscore': 0.1, 'platerec_min_score': 0.2, 'openalpr_recognize_vehicle': '0', 'openalpr_country': 'us', 'openalpr_state': None, 'openalpr_min_confidence': '0.3',
 'openalpr_cmdline_binary': 'alpr', 'openalpr_cmdline_params': '-j -d', 'openalpr_cmdline_min_confidence': 0.3, 'tpu_object_weights': '/var/lib/zmeventnotification/models/coral_edgetpu/ssd_mobilenet_v2
_coco_quant_postprocess_edgetpu.tflite', 'tpu_object_labels': '/var/lib/zmeventnotification/models/coral_edgetpu/coco_indexed.names', 'tpu_object_framework': 'coral_edgetpu', 'tpu_object_processor': 't
pu', 'tpu_min_confidence': '0.6', 'yolo4_object_weights': '/var/lib/zmeventnotification/models/yolov4/yolov4.weights', 'yolo4_object_labels': '/var/lib/zmeventnotification/models/yolov4/coco.names', 'y
olo4_object_config': '/var/lib/zmeventnotification/models/yolov4/yolov4.cfg', 'yolo4_object_framework': 'opencv', 'yolo4_object_processor': 'gpu', 'yolo3_object_weights': '/var/lib/zmeventnotification/
models/yolov3/yolov3.weights', 'yolo3_object_labels': '/var/lib/zmeventnotification/models/yolov3/coco.names', 'yolo3_object_config': '/var/lib/zmeventnotification/models/yolov3/yolov3.cfg', 'yolo3_obj
ect_framework': 'opencv', 'yolo3_object_processor': 'gpu', 'tinyyolo_object_config': '/var/lib/zmeventnotification/models/tinyyolov4/yolov4-tiny.cfg', 'tinyyolo_object_weights': '/var/lib/zmeventnotifi
cation/models/tinyyolov4/yolov4-tiny.weights', 'tinyyolo_object_labels': '/var/lib/zmeventnotification/models/tinyyolov4/coco.names', 'tinyyolo_object_framework': 'opencv', 'tinyyolo_object_processor':
 'gpu'}]
12/29/20 11:39:06 zmesdetect_m1[540] DBG2 yolo.py:35 [Semaphore: max:1, name:pyzm_uid33_gpu_lock, timeout:100]
12/29/20 11:39:06 zmesdetect_m1[540] DBG2 zm_detect.py:370 [using g.config['object_detection_pattern']=.*]
12/29/20 11:39:06 zmesdetect_m1[540] DBG1 zm_detect.py:403 [Using model: object with /var/lib/zmeventnotification/images/894-alarm.jpg]
12/29/20 11:39:06 zmesdetect_m1[540] DBG2 yolo.py:45 [Waiting for gpu lock...]
12/29/20 11:39:30 zmesdetect_m1[562] INF zm_detect.py:208 [---------| pyzm version:0.3.8, hook version:6.0.7,  ES version:6.0.7 , OpenCV version:4.4.0|------------]
12/29/20 11:39:30 zmesdetect_m1[562] DBG1 utils.py:405 [secret filename: /etc/zm/secrets.ini]
12/29/20 11:39:30 zmesdetect_m1[562] DBG2 utils.py:378 [Secret token found in config: !ZM_PORTAL]
12/29/20 11:39:30 zmesdetect_m1[562] DBG2 utils.py:378 [Secret token found in config: !ZM_USER]
12/29/20 11:39:30 zmesdetect_m1[562] DBG2 utils.py:378 [Secret token found in config: !ZM_PASSWORD]
12/29/20 11:39:30 zmesdetect_m1[562] DBG2 utils.py:378 [Secret token found in config: !ZM_API_PORTAL]
12/29/20 11:39:30 zmesdetect_m1[562] DBG2 utils.py:378 [Secret token found in config: !ML_USER]
12/29/20 11:39:30 zmesdetect_m1[562] DBG2 utils.py:378 [Secret token found in config: !ML_PASSWORD]
12/29/20 11:39:30 zmesdetect_m1[562] DBG2 utils.py:378 [Secret token found in config: !PLATEREC_ALPR_KEY]
12/29/20 11:39:30 zmesdetect_m1[562] DBG1 utils.py:440 [allowing self-signed certs to work...]
12/29/20 11:39:30 zmesdetect_m1[562] DBG4 utils.py:450 [Now checking for monitor overrides]
12/29/20 11:39:30 zmesdetect_m1[562] DBG4 utils.py:513 [Finally, doing parameter substitution]
12/29/20 11:39:30 zmesdetect_m1[562] INF zm_detect.py:234 [Importing local classes for Object/Face]
12/29/20 11:39:30 zmesdetect_m1[562] DBG1 utils.py:280 [Trying to download http://localhost/zm/index.php?view=image&eid=895&fid=alarm&username=admin&password=*****]
12/29/20 11:39:31 zmesdetect_m1[562] DBG1 utils.py:299 [Trying to download http://localhost/zm/index.php?view=image&eid=895&fid=snapshot&username=admin&password=*****]
12/29/20 11:39:31 zmesdetect_m1[562] DBG1 zm_detect.py:295 [No polygon area specfied, so adding a full image polygon:[{'name': 'full_image', 'value': [(0, 0), (1280, 0), (1280, 720), (0, 720)], 'patter
n': None}]]
12/29/20 11:39:31 zmesdetect_m1[562] DBG1 zm_detect.py:298 [resizing to 800 before analysis...]
12/29/20 11:39:31 zmesdetect_m1[562] DBG2 utils.py:138 [resized polygons x=0.625/y=0.625: [{'name': 'full_image', 'value': [(0, 0), (800, 0), (800, 450), (0, 450)], 'pattern': None}]]
12/29/20 11:39:31 zmesdetect_m1[562] DBG1 zm_detect.py:319 [User ALPR if vehicle found: False]
12/29/20 11:39:31 zmesdetect_m1[562] DBG4 yolo.py:26 [Yolo init params: {'pyzm_overrides': {'log_level_debug': 5}, 'secrets': '/etc/zm/secrets.ini', 'version': '1.2', 'cpu_max_processes': 3, 'gpu_max_p
rocesses': 1, 'tpu_max_processes': 1, 'cpu_max_lock_wait': 100, 'gpu_max_lock_wait': 100, 'tpu_max_lock_wait': 100, 'base_data_path': '/var/lib/zmeventnotification', 'portal': 'http://localhost/zm', 'a
pi_portal': 'http://localhost/zm/api', 'user': 'admin', 'password': 'plexnchi11', 'basic_user': '', 'basic_password': '', 'image_path': '/var/lib/zmeventnotification/images', 'match_past_detections': '
no', 'past_det_max_diff_area': '5%', 'max_detection_size': '90%', 'frame_id': 'bestmatch', 'bestmatch_order': 'a,s', 'wait': '0', 'resize': '800', 'delete_after_analyze': 'yes', 'show_percent': 'yes', 
'allow_self_signed': 'yes', 'write_image_to_zm': 'yes', 'write_debug_image': 'no', 'detection_sequence': ['object'], 'detection_mode': 'all', 'import_zm_zones': 'no', 'only_triggered_zm_zones': 'no', '
poly_color': (255, 255, 255), 'poly_thickness': 2, 'create_animation': 'no', 'animation_types': "'mp4,gif'", 'animation_width': 640, 'animation_retry_sleep': 15, 'animation_max_tries': 4, 'fast_gif': '
no', 'ml_gateway': None, 'ml_fallback_local': 'no', 'ml_user': '"your_mlapi_user"', 'ml_password': '"your_mlapi_password"', 'use_sequence': 'yes', 'ml_sequence': '{\n\'general\': {\n\'model_sequence\':
 \'object\',\n\n},\n\'object\': {\n\'general\':{\n\'pattern\':\'.*\',\n\'same_model_sequence_strategy\': \'first\' # also \'most\', \'most_unique\'s\n},\n\'sequence\': [{\n\'object_config\':\'/var/lib/
zmeventnotification/models/tinyyolov4/yolov4-tiny.cfg\',\n\'object_weights\':\'/var/lib/zmeventnotification/models/tinyyolov4/yolov4-tiny.weights\',\n\'object_labels\': \'/var/lib/zmeventnotification/m
odels/tinyyolov4/coco.names\',\n\'object_min_confidence\': 0.3,\n\'object_framework\':\'opencv\',\n\'object_processor\': \'gpu\',\n\'gpu_max_processes\': 1,\n\'gpu_max_lock_wait\': 100,\n\'cpu_max_proc
esses\': 3,\n\'cpu_max_lock_wait\': 100\n}]\n},\n\'face\': {\n\'general\':{\n\'pattern\': \'.*\',\n\'same_model_sequence_strategy\': \'first\'\n},\n\'sequence\': [{\n\'save_unknown_faces\':\'yes\',\n\'
save_unknown_faces_leeway_pixels\':100,\n\'face_detection_framework\': \'dlib\',\n\'known_images_path\': \'/var/lib/zmeventnotification/known_faces\',\n\'unknown_images_path\': \'/var/lib/zmeventnotifi
cation/unknown_faces\',\n\'face_model\': \'cnn\',\n\'face_train_model\': \'cnn\',\n\'face_recog_dist_threshold\': \'0.6\',\n\'face_num_jitters\': \'1\',\n\'face_upsample_times\':\'1\',\n\'gpu_max_proce
sses\': 1,\n\'gpu_max_lock_wait\': 100,\n\'cpu_max_processes\': 3,\n\'cpu_max_lock_wait\': 100,\n\'max_size\':800\n}]\n},\n\n\'alpr\': {\n\'general\':{\n\'same_model_sequence_strategy\': \'first\',\n\'
pre_existing_labels\':[\'car\', \'motorbike\', \'bus\', \'truck\', \'boat\'],\n\'pattern\': \'.*\'\n\n},\n\'sequence\': [{\n\'alpr_api_type\': \'cloud\',\n\'alpr_service\': \'plate_recognizer\',\n\'alp
r_key\': \'"your_plate_recognizer_api_key"\',\n\'platrec_stats\': \'yes\',\n\'platerec_min_dscore\': 0.1,\n\'platerec_min_score\': 0.2,\n\'max_size\':1600\n}]\n}\n}', 'stream_sequence': "{\n'frame_stra
tegy': 'most_models',\n'frame_set': 'snapshot,alarm',\n'resize':800\n\n}", 'object_detection_pattern': '.*', 'object_framework': 'opencv', 'object_processor': 'gpu', 'object_config': '/var/lib/zmeventn
otification/models/tinyyolov4/yolov4-tiny.cfg', 'object_weights': '/var/lib/zmeventnotification/models/tinyyolov4/yolov4-tiny.weights', 'object_labels': '/var/lib/zmeventnotification/models/tinyyolov4/
coco.names', 'object_min_confidence': 0.3, 'face_detection_pattern': '.*', 'face_detection_framework': 'dlib', 'face_recognition_framework': 'dlib', 'face_processor': 'cpu', 'face_num_jitters': 1, 'fac
e_upsample_times': 1, 'face_model': 'cnn', 'face_train_model': 'cnn', 'face_recog_dist_threshold': 0.6, 'face_recog_knn_algo': 'ball_tree', 'known_images_path': '/var/lib/zmeventnotification/known_face
s', 'unknown_images_path': '/var/lib/zmeventnotification/unknown_faces', 'unknown_face_name': 'unknown face', 'save_unknown_faces': 'yes', 'save_unknown_faces_leeway_pixels': 100, 'alpr_service': 'plat
e_recognizer', 'alpr_detection_pattern': '.*', 'alpr_url': None, 'alpr_key': '"your_plate_recognizer_api_key"', 'alpr_use_after_detection_only': 'yes', 'alpr_api_type': 'cloud', 'platerec_stats': 'yes'
, 'platerec_regions': None, 'platerec_min_dscore': 0.1, 'platerec_min_score': 0.2, 'openalpr_recognize_vehicle': '0', 'openalpr_country': 'us', 'openalpr_state': None, 'openalpr_min_confidence': '0.3',
 'openalpr_cmdline_binary': 'alpr', 'openalpr_cmdline_params': '-j -d', 'openalpr_cmdline_min_confidence': 0.3, 'tpu_object_weights': '/var/lib/zmeventnotification/models/coral_edgetpu/ssd_mobilenet_v2
_coco_quant_postprocess_edgetpu.tflite', 'tpu_object_labels': '/var/lib/zmeventnotification/models/coral_edgetpu/coco_indexed.names', 'tpu_object_framework': 'coral_edgetpu', 'tpu_object_processor': 't
pu', 'tpu_min_confidence': '0.6', 'yolo4_object_weights': '/var/lib/zmeventnotification/models/yolov4/yolov4.weights', 'yolo4_object_labels': '/var/lib/zmeventnotification/models/yolov4/coco.names', 'y
olo4_object_config': '/var/lib/zmeventnotification/models/yolov4/yolov4.cfg', 'yolo4_object_framework': 'opencv', 'yolo4_object_processor': 'gpu', 'yolo3_object_weights': '/var/lib/zmeventnotification/
models/yolov3/yolov3.weights', 'yolo3_object_labels': '/var/lib/zmeventnotification/models/yolov3/coco.names', 'yolo3_object_config': '/var/lib/zmeventnotification/models/yolov3/yolov3.cfg', 'yolo3_obj
ect_framework': 'opencv', 'yolo3_object_processor': 'gpu', 'tinyyolo_object_config': '/var/lib/zmeventnotification/models/tinyyolov4/yolov4-tiny.cfg', 'tinyyolo_object_weights': '/var/lib/zmeventnotifi
cation/models/tinyyolov4/yolov4-tiny.weights', 'tinyyolo_object_labels': '/var/lib/zmeventnotification/models/tinyyolov4/coco.names', 'tinyyolo_object_framework': 'opencv', 'tinyyolo_object_processor':
 'gpu'}]
12/29/20 11:39:31 zmesdetect_m1[562] DBG2 yolo.py:35 [Semaphore: max:1, name:pyzm_uid33_gpu_lock, timeout:100]
12/29/20 11:39:31 zmesdetect_m1[562] DBG2 zm_detect.py:370 [using g.config['object_detection_pattern']=.*]
12/29/20 11:39:31 zmesdetect_m1[562] DBG1 zm_detect.py:403 [Using model: object with /var/lib/zmeventnotification/images/895-alarm.jpg]
12/29/20 11:39:31 zmesdetect_m1[562] DBG2 yolo.py:45 [Waiting for gpu lock...]
12/29/20 11:39:40 zmesdetect_m1[604] INF zm_detect.py:208 [---------| pyzm version:0.3.8, hook version:6.0.7,  ES version:6.0.7 , OpenCV version:4.4.0|------------]
12/29/20 11:39:41 zmesdetect_m1[604] DBG1 utils.py:405 [secret filename: /etc/zm/secrets.ini]
12/29/20 11:39:41 zmesdetect_m1[604] DBG2 utils.py:378 [Secret token found in config: !ZM_PORTAL]
12/29/20 11:39:41 zmesdetect_m1[604] DBG2 utils.py:378 [Secret token found in config: !ZM_USER]
12/29/20 11:39:41 zmesdetect_m1[604] DBG2 utils.py:378 [Secret token found in config: !ZM_PASSWORD]
12/29/20 11:39:41 zmesdetect_m1[604] DBG2 utils.py:378 [Secret token found in config: !ZM_API_PORTAL]
12/29/20 11:39:41 zmesdetect_m1[604] DBG2 utils.py:378 [Secret token found in config: !ML_USER]
12/29/20 11:39:41 zmesdetect_m1[604] DBG2 utils.py:378 [Secret token found in config: !ML_PASSWORD]
12/29/20 11:39:41 zmesdetect_m1[604] DBG2 utils.py:378 [Secret token found in config: !PLATEREC_ALPR_KEY]
12/29/20 11:39:41 zmesdetect_m1[604] DBG1 utils.py:440 [allowing self-signed certs to work...]
12/29/20 11:39:41 zmesdetect_m1[604] DBG4 utils.py:450 [Now checking for monitor overrides]
12/29/20 11:39:41 zmesdetect_m1[604] DBG4 utils.py:513 [Finally, doing parameter substitution]
12/29/20 11:39:41 zmesdetect_m1[604] INF zm_detect.py:234 [Importing local classes for Object/Face]
12/29/20 11:39:41 zmesdetect_m1[604] DBG1 utils.py:280 [Trying to download http://localhost/zm/index.php?view=image&eid=896&fid=alarm&username=admin&password=*****]
12/29/20 11:39:41 zmesdetect_m1[604] DBG1 utils.py:299 [Trying to download http://localhost/zm/index.php?view=image&eid=896&fid=snapshot&username=admin&password=*****]
12/29/20 11:39:41 zmesdetect_m1[604] DBG1 zm_detect.py:295 [No polygon area specfied, so adding a full image polygon:[{'name': 'full_image', 'value': [(0, 0), (1280, 0), (1280, 720), (0, 720)], 'patter
n': None}]]
12/29/20 11:39:41 zmesdetect_m1[604] DBG1 zm_detect.py:298 [resizing to 800 before analysis...]
12/29/20 11:39:41 zmesdetect_m1[604] DBG2 utils.py:138 [resized polygons x=0.625/y=0.625: [{'name': 'full_image', 'value': [(0, 0), (800, 0), (800, 450), (0, 450)], 'pattern': None}]]
12/29/20 11:39:41 zmesdetect_m1[604] DBG1 zm_detect.py:319 [User ALPR if vehicle found: False]
12/29/20 11:39:41 zmesdetect_m1[604] DBG4 yolo.py:26 [Yolo init params: {'pyzm_overrides': {'log_level_debug': 5}, 'secrets': '/etc/zm/secrets.ini', 'version': '1.2', 'cpu_max_processes': 3, 'gpu_max_p
rocesses': 1, 'tpu_max_processes': 1, 'cpu_max_lock_wait': 100, 'gpu_max_lock_wait': 100, 'tpu_max_lock_wait': 100, 'base_data_path': '/var/lib/zmeventnotification', 'portal': 'http://localhost/zm', 'a
pi_portal': 'http://localhost/zm/api', 'user': 'admin', 'password': 'plexnchi11', 'basic_user': '', 'basic_password': '', 'image_path': '/var/lib/zmeventnotification/images', 'match_past_detections': '
no', 'past_det_max_diff_area': '5%', 'max_detection_size': '90%', 'frame_id': 'bestmatch', 'bestmatch_order': 'a,s', 'wait': '0', 'resize': '800', 'delete_after_analyze': 'yes', 'show_percent': 'yes', 
'allow_self_signed': 'yes', 'write_image_to_zm': 'yes', 'write_debug_image': 'no', 'detection_sequence': ['object'], 'detection_mode': 'all', 'import_zm_zones': 'no', 'only_triggered_zm_zones': 'no', '
poly_color': (255, 255, 255), 'poly_thickness': 2, 'create_animation': 'no', 'animation_types': "'mp4,gif'", 'animation_width': 640, 'animation_retry_sleep': 15, 'animation_max_tries': 4, 'fast_gif': '
no', 'ml_gateway': None, 'ml_fallback_local': 'no', 'ml_user': '"your_mlapi_user"', 'ml_password': '"your_mlapi_password"', 'use_sequence': 'yes', 'ml_sequence': '{\n\'general\': {\n\'model_sequence\':
 \'object\',\n\n},\n\'object\': {\n\'general\':{\n\'pattern\':\'.*\',\n\'same_model_sequence_strategy\': \'first\' # also \'most\', \'most_unique\'s\n},\n\'sequence\': [{\n\'object_config\':\'/var/lib/
zmeventnotification/models/tinyyolov4/yolov4-tiny.cfg\',\n\'object_weights\':\'/var/lib/zmeventnotification/models/tinyyolov4/yolov4-tiny.weights\',\n\'object_labels\': \'/var/lib/zmeventnotification/m
odels/tinyyolov4/coco.names\',\n\'object_min_confidence\': 0.3,\n\'object_framework\':\'opencv\',\n\'object_processor\': \'gpu\',\n\'gpu_max_processes\': 1,\n\'gpu_max_lock_wait\': 100,\n\'cpu_max_proc
esses\': 3,\n\'cpu_max_lock_wait\': 100\n}]\n},\n\'face\': {\n\'general\':{\n\'pattern\': \'.*\',\n\'same_model_sequence_strategy\': \'first\'\n},\n\'sequence\': [{\n\'save_unknown_faces\':\'yes\',\n\'
save_unknown_faces_leeway_pixels\':100,\n\'face_detection_framework\': \'dlib\',\n\'known_images_path\': \'/var/lib/zmeventnotification/known_faces\',\n\'unknown_images_path\': \'/var/lib/zmeventnotifi
cation/unknown_faces\',\n\'face_model\': \'cnn\',\n\'face_train_model\': \'cnn\',\n\'face_recog_dist_threshold\': \'0.6\',\n\'face_num_jitters\': \'1\',\n\'face_upsample_times\':\'1\',\n\'gpu_max_proce
sses\': 1,\n\'gpu_max_lock_wait\': 100,\n\'cpu_max_processes\': 3,\n\'cpu_max_lock_wait\': 100,\n\'max_size\':800\n}]\n},\n\n\'alpr\': {\n\'general\':{\n\'same_model_sequence_strategy\': \'first\',\n\'
pre_existing_labels\':[\'car\', \'motorbike\', \'bus\', \'truck\', \'boat\'],\n\'pattern\': \'.*\'\n\n},\n\'sequence\': [{\n\'alpr_api_type\': \'cloud\',\n\'alpr_service\': \'plate_recognizer\',\n\'alp
r_key\': \'"your_plate_recognizer_api_key"\',\n\'platrec_stats\': \'yes\',\n\'platerec_min_dscore\': 0.1,\n\'platerec_min_score\': 0.2,\n\'max_size\':1600\n}]\n}\n}', 'stream_sequence': "{\n'frame_stra
tegy': 'most_models',\n'frame_set': 'snapshot,alarm',\n'resize':800\n\n}", 'object_detection_pattern': '.*', 'object_framework': 'opencv', 'object_processor': 'gpu', 'object_config': '/var/lib/zmeventn
otification/models/tinyyolov4/yolov4-tiny.cfg', 'object_weights': '/var/lib/zmeventnotification/models/tinyyolov4/yolov4-tiny.weights', 'object_labels': '/var/lib/zmeventnotification/models/tinyyolov4/
coco.names', 'object_min_confidence': 0.3, 'face_detection_pattern': '.*', 'face_detection_framework': 'dlib', 'face_recognition_framework': 'dlib', 'face_processor': 'cpu', 'face_num_jitters': 1, 'fac
e_upsample_times': 1, 'face_model': 'cnn', 'face_train_model': 'cnn', 'face_recog_dist_threshold': 0.6, 'face_recog_knn_algo': 'ball_tree', 'known_images_path': '/var/lib/zmeventnotification/known_face
s', 'unknown_images_path': '/var/lib/zmeventnotification/unknown_faces', 'unknown_face_name': 'unknown face', 'save_unknown_faces': 'yes', 'save_unknown_faces_leeway_pixels': 100, 'alpr_service': 'plat
e_recognizer', 'alpr_detection_pattern': '.*', 'alpr_url': None, 'alpr_key': '"your_plate_recognizer_api_key"', 'alpr_use_after_detection_only': 'yes', 'alpr_api_type': 'cloud', 'platerec_stats': 'yes'
, 'platerec_regions': None, 'platerec_min_dscore': 0.1, 'platerec_min_score': 0.2, 'openalpr_recognize_vehicle': '0', 'openalpr_country': 'us', 'openalpr_state': None, 'openalpr_min_confidence': '0.3',
 'openalpr_cmdline_binary': 'alpr', 'openalpr_cmdline_params': '-j -d', 'openalpr_cmdline_min_confidence': 0.3, 'tpu_object_weights': '/var/lib/zmeventnotification/models/coral_edgetpu/ssd_mobilenet_v2
_coco_quant_postprocess_edgetpu.tflite', 'tpu_object_labels': '/var/lib/zmeventnotification/models/coral_edgetpu/coco_indexed.names', 'tpu_object_framework': 'coral_edgetpu', 'tpu_object_processor': 't
pu', 'tpu_min_confidence': '0.6', 'yolo4_object_weights': '/var/lib/zmeventnotification/models/yolov4/yolov4.weights', 'yolo4_object_labels': '/var/lib/zmeventnotification/models/yolov4/coco.names', 'y
olo4_object_config': '/var/lib/zmeventnotification/models/yolov4/yolov4.cfg', 'yolo4_object_framework': 'opencv', 'yolo4_object_processor': 'gpu', 'yolo3_object_weights': '/var/lib/zmeventnotification/
models/yolov3/yolov3.weights', 'yolo3_object_labels': '/var/lib/zmeventnotification/models/yolov3/coco.names', 'yolo3_object_config': '/var/lib/zmeventnotification/models/yolov3/yolov3.cfg', 'yolo3_obj
ect_framework': 'opencv', 'yolo3_object_processor': 'gpu', 'tinyyolo_object_config': '/var/lib/zmeventnotification/models/tinyyolov4/yolov4-tiny.cfg', 'tinyyolo_object_weights': '/var/lib/zmeventnotifi
cation/models/tinyyolov4/yolov4-tiny.weights', 'tinyyolo_object_labels': '/var/lib/zmeventnotification/models/tinyyolov4/coco.names', 'tinyyolo_object_framework': 'opencv', 'tinyyolo_object_processor':
 'gpu'}]
12/29/20 11:39:41 zmesdetect_m1[604] DBG2 yolo.py:35 [Semaphore: max:1, name:pyzm_uid33_gpu_lock, timeout:100]
12/29/20 11:39:41 zmesdetect_m1[604] DBG2 zm_detect.py:370 [using g.config['object_detection_pattern']=.*]
12/29/20 11:39:41 zmesdetect_m1[604] DBG1 zm_detect.py:403 [Using model: object with /var/lib/zmeventnotification/images/896-alarm.jpg]
12/29/20 11:39:41 zmesdetect_m1[604] DBG2 yolo.py:45 [Waiting for gpu lock...]
12/29/20 11:39:51 zmesdetect_m1[462] ERR yolo.py:51 [Timeout waiting for gpu lock for 100 seconds]
12/29/20 11:39:51 zmesdetect_m1[462] FAT zm_detect.py:860 [Unrecoverable error:Timeout waiting for gpu lock for 100 seconds Traceback:Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/pyzm/ml/yolo.py", line 46, in acquire_lock
    self.lock.acquire()
  File "/usr/local/lib/python3.6/dist-packages/portalocker/utils.py", line 343, in acquire
    raise exceptions.AlreadyLocked()
portalocker.exceptions.AlreadyLocked

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/var/lib/zmeventnotification/bin/zm_detect.py", line 857, in <module>
    main_handler()
  File "/var/lib/zmeventnotification/bin/zm_detect.py", line 432, in main_handler
    b, l, c = m.detect(original_image)
  File "/usr/local/lib/python3.6/dist-packages/pyzm/ml/object.py", line 54, in detect
    b,l,c = self.model.detect(image)
  File "/usr/local/lib/python3.6/dist-packages/pyzm/ml/yolo.py", line 128, in detect
    self.acquire_lock()
  File "/usr/local/lib/python3.6/dist-packages/pyzm/ml/yolo.py", line 52, in acquire_lock
    raise ValueError ('Timeout waiting for {} lock for {} seconds'.format(self.processor, self.lock_timeout))
ValueError: Timeout waiting for gpu lock for 100 seconds
]

CUDA Devices*

Found 1 device(s).
Device: 0
  Name: NVIDIA Tegra X1
  Compute Capability: 5.3
  Multiprocessors: 1
  CUDA Cores: 128
  Concurrent threads: 2048
  GPU clock: 921.6 MHz
  Memory clock: 1600 MHz
  Total Memory: 3961 MiB
  Free Memory: 1041 MiB

OpenCV Configuration

General configuration for OpenCV 4.4.0 =====================================
  Version control:               4.4.0

  Extra modules:
    Location (extra):            /opencv-build/build/opencv_contrib-4.4.0/modules
    Version control (extra):     unknown

  Platform:
    Timestamp:                   2020-07-24T23:54:38Z
    Host:                        Linux 4.9.140-tegra aarch64
    CMake:                       3.10.2
    CMake generator:             Unix Makefiles
    CMake build tool:            /usr/bin/make
    Configuration:               RELEASE

  CPU/HW features:
    Baseline:
      requested:                 NEON FP16
      disabled:                  VFPV3 NEON

  C/C++:
    Built as dynamic libs?:      YES
    C++ standard:                11
    C++ Compiler:                /usr/bin/c++  (ver 7.5.0)
    C++ flags (Release):         -fsigned-char -ffast-math -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Wsuggest-override -Wno-delete-non-virtual-dtor -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG  -DNDEBUG
    C++ flags (Debug):           -fsigned-char -ffast-math -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Wsuggest-override -Wno-delete-non-virtual-dtor -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -fvisibility=hidden -fvisibility-inlines-hidden -g  -O0 -DDEBUG -D_DEBUG
    C Compiler:                  /usr/bin/cc
    C flags (Release):           -fsigned-char -ffast-math -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Winit-self -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -fvisibility=hidden -O3 -DNDEBUG  -DNDEBUG
    C flags (Debug):             -fsigned-char -ffast-math -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Winit-self -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -fvisibility=hidden -g  -O0 -DDEBUG -D_DEBUG
    Linker flags (Release):      -Wl,--gc-sections -Wl,--as-needed  
    Linker flags (Debug):        -Wl,--gc-sections -Wl,--as-needed  
    ccache:                      YES
    Precompiled headers:         NO
    Extra dependencies:          m pthread cudart_static -lpthread dl rt nppc nppial nppicc nppicom nppidei nppif nppig nppim nppist nppisu nppitc npps cublas cudnn cufft -L/usr/local/cuda/lib64 -L/usr/lib/aarch64-linux-gnu
    3rdparty dependencies:

  OpenCV modules:
    To be built:                 alphamat aruco bgsegm bioinspired calib3d ccalib core cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev datasets dnn dnn_objdetect dnn_superres dpm face features2d flann freetype fuzzy gapi hfs highgui img_hash imgcodecs imgproc intensity_transform line_descriptor ml objdetect optflow phase_unwrapping photo plot python3 quality rapid reg rgbd saliency shape stereo stitching structured_light superres surface_matching text tracking ts video videoio videostab xfeatures2d ximgproc xobjdetect xphoto
    Disabled:                    world
    Disabled by dependency:      -
    Unavailable:                 cnn_3dobj cvv hdf java js julia matlab ovis python2 sfm viz
    Applications:                perf_tests apps
    Documentation:               NO
    Non-free algorithms:         NO

  GUI: 
    GTK+:                        YES (ver 3.22.30)
      GThread :                  YES (ver 2.56.4)
      GtkGlExt:                  NO
    VTK support:                 NO

  Media I/O: 
    ZLib:                        /usr/lib/aarch64-linux-gnu/libz.so (ver 1.2.11)
    JPEG:                        /usr/lib/aarch64-linux-gnu/libjpeg.so (ver 80)
    WEBP:                        build (ver encoder: 0x020f)
    PNG:                         /usr/lib/aarch64-linux-gnu/libpng.so (ver 1.6.34)
    TIFF:                        /usr/lib/aarch64-linux-gnu/libtiff.so (ver 42 / 4.0.9)
    JPEG 2000:                   build Jasper (ver 1.900.1)
    OpenEXR:                     build (ver 2.3.0)
    HDR:                         YES
    SUNRASTER:                   YES
    PXM:                         YES
    PFM:                         YES

  Video I/O:
    DC1394:                      NO
    FFMPEG:                      YES
      avcodec:                   YES (57.107.100)
      avformat:                  YES (57.83.100)
      avutil:                    YES (55.78.100)
      swscale:                   YES (4.8.100)
      avresample:                NO
    GStreamer:                   YES (1.14.5)
    v4l/v4l2:                    YES (linux/videodev2.h)

  Parallel framework:            pthreads

  Trace:                         YES (with Intel ITT)

  Other third-party libraries:
    Lapack:                      NO
    Eigen:                       YES (ver 3.3.4)
    Custom HAL:                  NO
    Protobuf:                    build (3.5.1)

  NVIDIA CUDA:                   YES (ver 10.0, CUFFT CUBLAS FAST_MATH)
    NVIDIA GPU arch:             53 62 72
    NVIDIA PTX archs:

  cuDNN:                         YES (ver 7.6.3)

  OpenCL:                        YES (no extra features)
    Include path:                /opencv-build/build/opencv-4.4.0/3rdparty/include/opencl/1.2
    Link libraries:              Dynamic load

  Python 3:
    Interpreter:                 /usr/bin/python3 (ver 3.6.9)
    Libraries:                   /usr/lib/aarch64-linux-gnu/libpython3.6m.so (ver 3.6.9)
    numpy:                       /usr/local/lib/python3.6/dist-packages/numpy/core/include (ver 1.18.1)
    install path:                /usr/local/lib/python3.6/dist-packages/cv2/python-3.6

  Python (for build):            /usr/bin/python3

  Java:                          
    ant:                         NO
    JNI:                         NO
    Java wrappers:               NO
    Java tests:                  NO

  Install to:                    /usr
-----------------------------------------------------------------

Thanks!

Issue when retrieving events, 'to' and 'from' options seem to be parsed wrong?

So, I am trying to retrieve events that happened 12 minutes ago, using this options dict (for example):

event_filter = {
    'from': '2020-10-28 17:58:29',
    'to': '2020-10-28 18:10:29',
    'object_only': False,
    'min_alarmed_frames': 1,
    'mid': 4
}

However, once I call the Monitor.events(options=event_filter) method I noticed this as a result: (I censored my token and URL, pay no mind to it)

Oct 28 2020 18:10:35.445790 [DBG 1] make_request called with url=http://myzoneminder/zm/api/events/index/StartTime >=:2020-10-28 18:10:29/EndTime <=:2020-10-28 18:10:29/MonitorId =:4/AlarmFrames >=:1.json payload={} type=get query={'sort': 'StartTime', 'direction': 'desc', 'page': 1, 'limit': 100, 'token':'mytoken'}

the StartTime and EndTime parts of the request are the same timestamp (specifically, they're the 'to' timestamp from my event_filter dict), hence why I am unable to receive any events.

While sorting through the code I couldn't really understand the line 51 of the Events Class.
Shouldn't it be from_list = options.get('from').split(" to ", 1) instead of from_list = options.get('to').split(" to ", 1)

Thanks a lot, sorry about any formatting or grammatical errors

Fix access to authenticated attribute

Running version 0.1.5 of pyzm.
Calling version() method on ZMApi:
self.zm_api = zmAPI.ZMApi(options=self.zm_options)
version_info = self.zm_api.version()
Got a NameError exception:
File "/usr/lib/python3.8/site-packages/pyzm/api.py", line 74, in version
if not authenticated:
NameError: name 'authenticated' is not defined

Fix could be 'if not self.authenticated'.

add "ignore_zone" param for monitors

Scenario: car parks on driveway most of the time. With tree shadow, cloud, snow, rain, ...triggering the camera, it's easy to get the car detected and alerted over and over.

While car_past_det_max_diff_area param works for cars that park short-term, it doesn't work well for long-term parked cars. Sometimes the detected box is far left or far right of the actual car, especially when it snows. If the detection box is far left then far right, the diff is over the threshold and triggers an alert.

What I'm doing for the above scenario is to tap into the websocket notification. In my script that handles the events from websocket, I have a polygon defined as "parking zone" where the car can be anywhere in it. The detected box is then compared against this parking zone:

if (detected_label == 'car') and (detected_box.intersection(parking_zone).area/detected_box.area > 0.85) : 
    no alert

The above logic works well that the detected box can jump around the actual car without triggering an alert. Sometimes YOLOv4 can even detect a fake car in front of the real car, but it's small and still fit into the parking zone, so that works well to avoid false positive, too (no car that small). While it ignores cars detected in that zone, it doesn't ignore other objects so a person walking into that zone will still get detected and alerted.

Maybe add a new generic param to the config to ignore objects detected in the zone, matching the defined labels with certain overlapping percentage, e.g.:

ignore_zone=(car,truck),(polygon points), 0.85
ignore_zone=(cat,dog,squirrel),(polygon points), 0.9

Crash due to locking not handled properly with multiple zm_detect.py processes are run at once with the edgetpu.

Event Server version
6.1.28

Hooks version (if you are using Object Detection)
app:6.1.28, pyzm:0.3.56

The version of ZoneMinder you are using:
v1.37.25

Details

Getting Error: HandleQueuedBulkIn transfer in failed. Not found: USB transfer error 5 [LibUsbDataInCallback] when multiple zm_detect.py processes are run at once with the edgetpu.

tpu_max_processes is set to 1.

I am executing the zm_detect.py with a custom script that dynamically generates the list of frames to check for objects after the event is complete which is for the most part all alarmed frames so the list can be up to 30 frames.

For this scenario, I have object enabled with the edge TPU only.

  1. If no locks are held, the model is loaded and the first image is run through the TPU detection process, the lock is released and the rest of the process is completed for the image.
  2. As soon as the lock is released by process 1 for the first image, process 2 loads the model on the edge TPU and starts running the images through the detection process.
  3. Process 1 tries to start processing the next image at which point it dies. I've run this same test many times and process 1 always dies at the exact same point.

If this happens to many times the TPU will completely lock up and I have to unplug it and plug it back in to get it working again. I believe this same thing happens with the GPU/Yolo which handles it ok, but it will run out of memory periodically. The TPU only allows 1 process to access it so it just dies every time.

From what I see there's a couple ways to solve this:

  1. We could lock the devices that we are going to be using when the process starts, but we don't know exactly what we need before process the images so devices may be locked when not needed.

  2. We could lock the device when the model is loaded and don't unlock until the current process is done processing images with that model. The process could load additional models with the same lock that is already held for the GPU, etc (not sure if the same process can load multiple models on the TPU or not).

As a side note, an option to be able to run the models sequentially in post processing scenarios such as mine would be nice because there's really no reason (for me) after the event is complete to process each frame through every model, it would be better to just run each model on all the frames, if nothing found move to model 2 and so on. The current sequence makes complete sense with real time detection/events.

My current work around is to comment out the lock release in /pyzm/ml/coral_edgetpu.py so it doesn't release the lock after each frame for the TPU which means the lock is only released once the script is done, but this limits me to only 1 model so I can't do the face detection.

179
180 if self.options.get('auto_lock',True):
181 #self.release_lock()
182 g.logger.Debug(2,'Not Releasing Lock')
183 except:
184 if self.options.get('auto_lock',True):

Debug Logs

Process 1:
11/21/22 17:54:25 zmesdetect_m5[8761] INF zm_detect.py:285 [---------| app:6.1.28, pyzm:0.3.56, ES:6.1.28 , OpenCV:4.6.0|------------]
11/21/22 17:56:31 zmesdetect_m6[8942] INF utils.py:405 [Reading config from: /etc/zm/objectconfig_edgetpu.ini]
11/21/22 17:56:31 zmesdetect_m6[8942] INF utils.py:410 [Reading secrets from: /etc/zm/secrets.ini]
11/21/22 17:56:31 zmesdetect_m6[8942] DBG2 utils.py:382 [Secret token found in config: !ZM_PORTAL]
11/21/22 17:56:31 zmesdetect_m6[8942] DBG2 utils.py:382 [Secret token found in config: !ZM_USER]
11/21/22 17:56:31 zmesdetect_m6[8942] DBG2 utils.py:382 [Secret token found in config: !ZM_PASSWORD]
11/21/22 17:56:31 zmesdetect_m6[8942] DBG2 utils.py:382 [Secret token found in config: !ZM_API_PORTAL]
11/21/22 17:56:31 zmesdetect_m6[8942] DBG2 utils.py:382 [Secret token found in config: !ML_USER]
11/21/22 17:56:31 zmesdetect_m6[8942] DBG2 utils.py:382 [Secret token found in config: !ML_PASSWORD]
11/21/22 17:56:31 zmesdetect_m6[8942] DBG2 utils.py:382 [Secret token found in config: !PLATEREC_ALPR_KEY]
11/21/22 17:56:31 zmesdetect_m6[8942] DBG1 utils.py:445 [allowing self-signed certs to work...]
11/21/22 17:56:31 zmesdetect_m6[8942] DBG2 utils.py:455 [Now checking for monitor overrides]
11/21/22 17:56:31 zmesdetect_m6[8942] DBG2 utils.py:174 [import_zm_zones: match_reason=True and reason=[x] detected:car:99% Motion: Road]
11/21/22 17:56:31 zmesdetect_m6[8942] DBG2 utils.py:177 [Getting ZM zones using http://127.0.0.1/zm/api/zones/forMonitor/6.json?username=xxx&password=yyy&user=xxx&pass=yyy]
11/21/22 17:56:31 zmesdetect_m6[8942] DBG2 utils.py:228 [importing zoneminder polygon: road [519,8 845,20 1381,100 1908,223 1910,416 1115,191 513,60]]
11/21/22 17:56:31 zmesdetect_m6[8942] DBG2 utils.py:221 [Skipping Filter_Gas_Light as it is inactive]
11/21/22 17:56:31 zmesdetect_m6[8942] DBG1 utils.py:225 [dropping Porch as zones in alarm cause is [x] detected:car:99% Motion: Road]
11/21/22 17:56:31 zmesdetect_m6[8942] DBG1 utils.py:225 [dropping Driveway as zones in alarm cause is [x] detected:car:99% Motion: Road]
11/21/22 17:56:31 zmesdetect_m6[8942] DBG2 utils.py:221 [Skipping Filter_Bush as it is inactive]
11/21/22 17:56:31 zmesdetect_m6[8942] DBG1 utils.py:225 [dropping Front_Yard as zones in alarm cause is [x] detected:car:99% Motion: Road]
11/21/22 17:56:31 zmesdetect_m6[8942] DBG2 utils.py:221 [Skipping Filter_Chain1 as it is inactive]
11/21/22 17:56:31 zmesdetect_m6[8942] DBG2 utils.py:221 [Skipping Filter_Chain2 as it is inactive]
11/21/22 17:56:31 zmesdetect_m6[8942] INF zm_detect.py:310 [Importing local classes for Object/Face]
11/21/22 17:56:32 zmesdetect_m6[8942] INF zm_detect.py:335 [Connecting with ZM APIs]
11/21/22 17:56:32 zmesdetect_m6[8942] DBG2 api.py:72 [API SSL certificate check has been disbled]
11/21/22 17:56:32 zmesdetect_m6[8942] DBG1 api.py:181 [using username/password for login]
11/21/22 17:56:32 zmesdetect_m6[8942] DBG2 api.py:210 [Using new token API]
11/21/22 17:56:32 zmesdetect_m6[8942] DBG1 api.py:217 [Access token expires on:2022-11-21 19:56:32.338138 [7200s]]
11/21/22 17:56:32 zmesdetect_m6[8942] DBG1 api.py:221 [Refresh token expires on:2022-11-22 17:56:32.338518 [86400s]]
11/21/22 17:56:32 zmesdetect_m6[8942] DBG2 zm_detect.py:343 [using ml_sequence]
11/21/22 17:56:32 zmesdetect_m6[8942] DBG2 zm_detect.py:355 [using stream_sequence]
11/21/22 17:56:32 zmesdetect_m6[8942] DBG2 zm_detect.py:360 [Using frme_set from args.]
11/21/22 17:56:32 zmesdetect_m6[8942] DBG1 detect_sequence.py:160 [Resetting models, will be loaded on next run]
11/21/22 17:56:32 zmesdetect_m6[8942] DBG2 Media.py:51 [Media get SSL certificate check has been disbled]
11/21/22 17:56:32 zmesdetect_m6[8942] DBG2 Media.py:99 [Using URL 14298252 for stream]
11/21/22 17:56:32 zmesdetect_m6[8942] DBG2 Media.py:114 [We will only process frames: ['167', '169', '170', '171', '166', '168', '172', '165', '162', '163', '164', '174', '175', '173', '161', '176', '160', '177', '159', '158', '178', '157', '179', '156', '180', '134', '135', '136', '137', '138']]
11/21/22 17:56:32 zmesdetect_m6[8942] DBG2 Media.py:137 [No need to start streams, we are picking images from http://127.0.0.1/zm/index.php?view=image&eid=14298252]
11/21/22 17:56:32 zmesdetect_m6[8942] DBG1 detect_sequence.py:654 [perf: Starting for frame:167]
11/21/22 17:56:32 zmesdetect_m6[8942] DBG1 detect_sequence.py:664 [Sequence of detection types to execute: ['object']]
11/21/22 17:56:32 zmesdetect_m6[8942] DBG1 detect_sequence.py:669 [============ Frame: 167 Running object detection type in sequence ==================]
11/21/22 17:56:32 zmesdetect_m6[8942] DBG2 detect_sequence.py:178 [Loading sequence: TPU object detection]
11/21/22 17:56:32 zmesdetect_m6[8942] DBG2 detect_sequence.py:179 [Initializing model  type:object with options:{'name': 'TPU object detection', 'enabled': 'yes', 'object_weights': '/var/lib/zmeventnotification/models/coral_edgetpu/ssdlite_mobiledet_coco_qat_postprocess_edgetpu.tflite', 'object_labels': '/var/lib/zmeventnotification/models/coral_edgetpu/coco_indexed.names', 'object_min_confidence': 0.6, 'object_framework': 'coral_edgetpu', 'tpu_max_processes': 1, 'tpu_max_lock_wait': 160, 'max_detection_size': '90%', 'disable_locks': 'no'}]
11/21/22 17:56:32 zmesdetect_m6[8942] DBG2 coral_edgetpu.py:37 [portalock: max:1, name:pyzm_uid33_tpu_lock, timeout:160]
11/21/22 17:56:32 zmesdetect_m6[8942] DBG2 detect_sequence.py:174 [Skipping YoloV4 GPU/CPU as it is disabled]
11/21/22 17:56:32 zmesdetect_m6[8942] DBG2 detect_sequence.py:174 [Skipping YoloV4 Night Time Bug Check as it is disabled]
11/21/22 17:56:32 zmesdetect_m6[8942] DBG2 coral_edgetpu.py:51 [Waiting for pyzm_uid33_tpu_lock portalock...]
11/21/22 17:56:34 zmesdetect_m6[8942] DBG2 coral_edgetpu.py:53 [Got pyzm_uid33_tpu_lock portalock]
11/21/22 17:56:34 zmesdetect_m6[8942] DBG1 detect_sequence.py:701 [--------- Frame:167 Running variation: #1 -------------]
11/21/22 17:56:34 zmesdetect_m6[8942] DBG2 coral_edgetpu.py:48 [pyzm_uid33_tpu_lock portalock already acquired]
11/21/22 17:56:34 zmesdetect_m6[8942] DBG1 coral_edgetpu.py:89 [|--------- Loading "TPU object detection" model from disk -------------|]
11/21/22 17:56:37 zmesdetect_m6[8942] DBG1 coral_edgetpu.py:97 [perf: processor:tpu TPU initialization (loading /var/lib/zmeventnotification/models/coral_edgetpu/ssdlite_mobiledet_coco_qat_postprocess_edgetpu.tflite from disk) took: 2674.61 ms]
11/21/22 17:56:37 zmesdetect_m6[8942] DBG1 coral_edgetpu.py:163 [|---------- TPU (input image: 800w*450h) ----------|]
11/21/22 17:56:37 zmesdetect_m6[8942] DBG2 coral_edgetpu.py:68 [Released portalock pyzm_uid33_tpu_lock]
11/21/22 17:56:37 zmesdetect_m6[8942] DBG1 coral_edgetpu.py:185 [perf: processor:tpu Coral TPU detection took: 36.38 ms]
11/21/22 17:56:37 zmesdetect_m6[8942] DBG2 object.py:66 [core model detection over, got 1 objects. Now filtering]
11/21/22 17:56:37 zmesdetect_m6[8942] DBG2 object.py:70 [Max object size found to be: 90%]
11/21/22 17:56:37 zmesdetect_m6[8942] DBG2 object.py:78 [Converted 90% to 324000.0]
11/21/22 17:56:37 zmesdetect_m6[8942] DBG2 object.py:103 [Returning filtered list of 1 objects.]
11/21/22 17:56:37 zmesdetect_m6[8942] DBG2 detect_sequence.py:711 [This model iteration inside object found: labels: ['car'],conf:[0.76953125]]
11/21/22 17:56:37 zmesdetect_m6[8942] DBG2 detect_sequence.py:424 [Max object size found to be: 90%]
11/21/22 17:56:37 zmesdetect_m6[8942] DBG2 detect_sequence.py:432 [Converted 90% to 324000.0]
11/21/22 17:56:37 zmesdetect_m6[8942] DBG2 detect_sequence.py:502 [intersection: object:car,POLYGON ((583 42, 756 42, 756 134, 583 134, 583 42)) intersects polygon:road,POLYGON ((216 3, 352 8, 575 41, 795 92, 795 173, 464 79, 213 25, 216 3))]
11/21/22 17:56:37 zmesdetect_m6[8942] DBG2 detect_sequence.py:518 [Using global match pattern: (person|car|motorbike|bus|truck|boat|dog|cat|bike|nightbug)]
11/21/22 17:56:37 zmesdetect_m6[8942] DBG2 detect_sequence.py:526 [road intersects object:car[[(583, 42), (756, 42), (756, 134), (583, 134)]]]
11/21/22 17:56:37 zmesdetect_m6[8942] DBG2 detect_sequence.py:753 [breaking out of same model loop, as matches found and strategy is "first"]
11/21/22 17:56:37 zmesdetect_m6[8942] DBG1 detect_sequence.py:654 [perf: Starting for frame:169]
11/21/22 17:56:37 zmesdetect_m6[8942] DBG1 detect_sequence.py:664 [Sequence of detection types to execute: ['object']]
11/21/22 17:56:37 zmesdetect_m6[8942] DBG1 detect_sequence.py:669 [============ Frame: 169 Running object detection type in sequence ==================]
11/21/22 17:56:37 zmesdetect_m6[8942] DBG1 detect_sequence.py:701 [--------- Frame:169 Running variation: #1 -------------]
11/21/22 17:56:37 zmesdetect_m6[8942] DBG2 coral_edgetpu.py:51 [Waiting for pyzm_uid33_tpu_lock portalock...]
11/21/22 17:56:37 zmesdetect_m6[8942] DBG2 coral_edgetpu.py:53 [Got pyzm_uid33_tpu_lock portalock]
11/21/22 17:56:37 zmesdetect_m6[8942] DBG1 coral_edgetpu.py:163 [|---------- TPU (input image: 800w*450h) ----------|]
11/21/22 17:56:37 zmesdetect_m6[8942] DBG2 coral_edgetpu.py:68 [Released portalock pyzm_uid33_tpu_lock]
11/21/22 17:56:37 zmesdetect_m6[8942] DBG1 coral_edgetpu.py:185 [perf: processor:tpu Coral TPU detection took: 16.99 ms]
11/21/22 17:56:37 zmesdetect_m6[8942] DBG2 object.py:66 [core model detection over, got 1 objects. Now filtering]
11/21/22 17:56:37 zmesdetect_m6[8942] DBG2 object.py:70 [Max object size found to be: 90%]
11/21/22 17:56:37 zmesdetect_m6[8942] DBG2 object.py:78 [Converted 90% to 324000.0]
11/21/22 17:56:37 zmesdetect_m6[8942] DBG2 object.py:103 [Returning filtered list of 1 objects.]
11/21/22 17:56:37 zmesdetect_m6[8942] DBG2 detect_sequence.py:711 [This model iteration inside object found: labels: ['car'],conf:[0.76171875]]
11/21/22 17:56:37 zmesdetect_m6[8942] DBG2 detect_sequence.py:424 [Max object size found to be: 90%]
11/21/22 17:56:37 zmesdetect_m6[8942] DBG2 detect_sequence.py:432 [Converted 90% to 324000.0]
11/21/22 17:56:37 zmesdetect_m6[8942] DBG2 detect_sequence.py:502 [intersection: object:car,POLYGON ((608 51, 771 51, 771 139, 608 139, 608 51)) intersects polygon:road,POLYGON ((216 3, 352 8, 575 41, 795 92, 795 173, 464 79, 213 25, 216 3))]
11/21/22 17:56:37 zmesdetect_m6[8942] DBG2 detect_sequence.py:518 [Using global match pattern: (person|car|motorbike|bus|truck|boat|dog|cat|bike|nightbug)]
11/21/22 17:56:37 zmesdetect_m6[8942] DBG2 detect_sequence.py:526 [road intersects object:car[[(608, 51), (771, 51), (771, 139), (608, 139)]]]
11/21/22 17:56:37 zmesdetect_m6[8942] DBG2 detect_sequence.py:753 [breaking out of same model loop, as matches found and strategy is "first"]
11/21/22 17:56:37 zmesdetect_m6[8942] DBG1 detect_sequence.py:654 [perf: Starting for frame:170]
11/21/22 17:56:37 zmesdetect_m6[8942] DBG1 detect_sequence.py:664 [Sequence of detection types to execute: ['object']]
11/21/22 17:56:37 zmesdetect_m6[8942] DBG1 detect_sequence.py:669 [============ Frame: 170 Running object detection type in sequence ==================]
11/21/22 17:56:37 zmesdetect_m6[8942] DBG1 detect_sequence.py:701 [--------- Frame:170 Running variation: #1 -------------]
11/21/22 17:56:37 zmesdetect_m6[8942] DBG2 coral_edgetpu.py:51 [Waiting for pyzm_uid33_tpu_lock portalock...]
11/21/22 17:56:37 zmesdetect_m6[8942] DBG2 coral_edgetpu.py:53 [Got pyzm_uid33_tpu_lock portalock]
11/21/22 17:56:37 zmesdetect_m6[8942] DBG1 coral_edgetpu.py:163 [|---------- TPU (input image: 800w*450h) ----------|]
11/21/22 17:56:37 zmesdetect_m6[8942] DBG2 coral_edgetpu.py:68 [Released portalock pyzm_uid33_tpu_lock]
11/21/22 17:56:37 zmesdetect_m6[8942] DBG1 coral_edgetpu.py:185 [perf: processor:tpu Coral TPU detection took: 17.62 ms]
11/21/22 17:56:37 zmesdetect_m6[8942] DBG2 object.py:66 [core model detection over, got 1 objects. Now filtering]
11/21/22 17:56:37 zmesdetect_m6[8942] DBG2 object.py:70 [Max object size found to be: 90%]
11/21/22 17:56:37 zmesdetect_m6[8942] DBG2 object.py:78 [Converted 90% to 324000.0]
11/21/22 17:56:37 zmesdetect_m6[8942] DBG2 object.py:103 [Returning filtered list of 1 objects.]
11/21/22 17:56:37 zmesdetect_m6[8942] DBG2 detect_sequence.py:711 [This model iteration inside object found: labels: ['car'],conf:[0.76953125]]
11/21/22 17:56:37 zmesdetect_m6[8942] DBG2 detect_sequence.py:424 [Max object size found to be: 90%]
11/21/22 17:56:37 zmesdetect_m6[8942] DBG2 detect_sequence.py:432 [Converted 90% to 324000.0]
11/21/22 17:56:37 zmesdetect_m6[8942] DBG2 detect_sequence.py:502 [intersection: object:car,POLYGON ((616 51, 793 51, 793 145, 616 145, 616 51)) intersects polygon:road,POLYGON ((216 3, 352 8, 575 41, 795 92, 795 173, 464 79, 213 25, 216 3))]
11/21/22 17:56:37 zmesdetect_m6[8942] DBG2 detect_sequence.py:518 [Using global match pattern: (person|car|motorbike|bus|truck|boat|dog|cat|bike|nightbug)]
11/21/22 17:56:37 zmesdetect_m6[8942] DBG2 detect_sequence.py:526 [road intersects object:car[[(616, 51), (793, 51), (793, 145), (616, 145)]]]
11/21/22 17:56:37 zmesdetect_m6[8942] DBG2 detect_sequence.py:753 [breaking out of same model loop, as matches found and strategy is "first"]
11/21/22 17:56:37 zmesdetect_m6[8942] DBG1 detect_sequence.py:654 [perf: Starting for frame:171]
11/21/22 17:56:37 zmesdetect_m6[8942] DBG1 detect_sequence.py:664 [Sequence of detection types to execute: ['object']]

<SNIP>

11/21/22 17:56:38 zmesdetect_m6[8942] DBG1 detect_sequence.py:701 [--------- Frame:138 Running variation: #1 -------------]
11/21/22 17:56:38 zmesdetect_m6[8942] DBG2 coral_edgetpu.py:51 [Waiting for pyzm_uid33_tpu_lock portalock...]
11/21/22 17:56:38 zmesdetect_m6[8942] DBG2 coral_edgetpu.py:53 [Got pyzm_uid33_tpu_lock portalock]
11/21/22 17:56:38 zmesdetect_m6[8942] DBG1 coral_edgetpu.py:163 [|---------- TPU (input image: 800w*450h) ----------|]
11/21/22 17:56:38 zmesdetect_m6[8942] DBG2 coral_edgetpu.py:68 [Released portalock pyzm_uid33_tpu_lock]
11/21/22 17:56:38 zmesdetect_m6[8942] DBG1 coral_edgetpu.py:185 [perf: processor:tpu Coral TPU detection took: 17.79 ms]
11/21/22 17:56:38 zmesdetect_m6[8942] DBG2 object.py:66 [core model detection over, got 0 objects. Now filtering]
11/21/22 17:56:38 zmesdetect_m6[8942] DBG2 object.py:70 [Max object size found to be: 90%]
11/21/22 17:56:38 zmesdetect_m6[8942] DBG2 object.py:78 [Converted 90% to 324000.0]
11/21/22 17:56:38 zmesdetect_m6[8942] DBG2 object.py:103 [Returning filtered list of 0 objects.]
11/21/22 17:56:38 zmesdetect_m6[8942] DBG2 detect_sequence.py:711 [This model iteration inside object found: labels: [],conf:[]]
11/21/22 17:56:38 zmesdetect_m6[8942] DBG2 detect_sequence.py:424 [Max object size found to be: 90%]
11/21/22 17:56:38 zmesdetect_m6[8942] DBG2 detect_sequence.py:432 [Converted 90% to 324000.0]
11/21/22 17:56:38 zmesdetect_m6[8942] DBG2 detect_sequence.py:770 [We did not find any object matches in frame: 138]
11/21/22 17:56:38 zmesdetect_m6[8942] DBG2 coral_edgetpu.py:64 [pyzm_uid33_tpu_lock portalock already released]
11/21/22 17:56:38 zmesdetect_m6[8942] DBG1 detect_sequence.py:827 [perf: TOTAL detection sequence (with image loads) took: 6398.91 ms  to process 14298252]
11/21/22 17:56:38 zmesdetect_m6[8942] INF zm_detect.py:483 [Prediction string:[x] detected:car:77% ]
11/21/22 17:56:38 zmesdetect_m6[8942] DBG1 zm_detect.py:485 [Prediction string JSON:{"labels": ["car"], "boxes": [[583, 42, 756, 134]], "frame_id": "167", "confidences": [0.76953125], "image_dimensions": {"original": [1080, 1920], "resized": [450, 800]}}]
11/21/22 17:56:38 zmesdetect_m6[8942] DBG1 zm_detect.py:503 [Writing detected image to /mnt/ext-video/events/6/2022-11-21/14298252/objdetect.jpg]
11/21/22 17:56:38 zmesdetect_m6[8942] DBG1 zm_detect.py:507 [Writing JSON output to /mnt/ext-video/events/6/2022-11-21/14298252/objects.json]
11/21/22 17:56:39 zmesdetect_m6[8942] DBG1 zm_detect.py:534 [Replacing old note:[x] detected:car:99% Motion: Road with new note:[x] detected:car:77% Motion: Road]
11/21/22 17:56:39 zmesdetect_m6[8942] DBG1 zm_detect.py:561 [Closing logs]





Process 2:
11/21/22 17:56:30 zmesdetect_m5[8930] INF zm_detect.py:285 [---------| app:6.1.28, pyzm:0.3.56, ES:6.1.28
 , OpenCV:4.6.0|------------]
11/21/22 17:56:30 zmesdetect_m5[8930] INF utils.py:405 [Reading config from: /etc/zm/objectconfig.ini]
11/21/22 17:56:30 zmesdetect_m5[8930] INF utils.py:410 [Reading secrets from: /etc/zm/secrets.ini]
11/21/22 17:56:30 zmesdetect_m5[8930] DBG2 utils.py:382 [Secret token found in config: !ZM_PORTAL]
11/21/22 17:56:30 zmesdetect_m5[8930] DBG2 utils.py:382 [Secret token found in config: !ZM_USER]
11/21/22 17:56:30 zmesdetect_m5[8930] DBG2 utils.py:382 [Secret token found in config: !ZM_PASSWORD]
11/21/22 17:56:30 zmesdetect_m5[8930] DBG2 utils.py:382 [Secret token found in config: !ZM_API_PORTAL]
11/21/22 17:56:30 zmesdetect_m5[8930] DBG2 utils.py:382 [Secret token found in config: !ML_USER]
11/21/22 17:56:30 zmesdetect_m5[8930] DBG2 utils.py:382 [Secret token found in config: !ML_PASSWORD]
11/21/22 17:56:30 zmesdetect_m5[8930] DBG2 utils.py:382 [Secret token found in config: !PLATEREC_ALPR_KEY]
11/21/22 17:56:30 zmesdetect_m5[8930] DBG1 utils.py:445 [allowing self-signed certs to work...]
11/21/22 17:56:30 zmesdetect_m5[8930] DBG2 utils.py:455 [Now checking for monitor overrides]
11/21/22 17:56:30 zmesdetect_m5[8930] DBG2 utils.py:491 [tpu_object_enabled is not a polygon, adding it as unknown string key]
11/21/22 17:56:30 zmesdetect_m5[8930] DBG2 utils.py:491 [yolo4_object_enabled is not a polygon, adding it as unknown string key]
11/21/22 17:56:30 zmesdetect_m5[8930] DBG2 utils.py:174 [import_zm_zones: match_reason=True and reason=[x] detected:car:61% Motion: Road]
11/21/22 17:56:30 zmesdetect_m5[8930] DBG2 utils.py:177 [Getting ZM zones using http://127.0.0.1/zm/api/zones/forMonitor/5.json?username=xxx&password=yyy&user=xxx&pass=yyy]
11/21/22 17:56:30 zmesdetect_m5[8930] DBG1 utils.py:225 [dropping Driveway as zones in alarm cause is [x] detected:car:61% Motion: Road]
11/21/22 17:56:30 zmesdetect_m5[8930] DBG1 utils.py:225 [dropping Front_Yard as zones in alarm cause is [x] detected:car:61% Motion: Road]
11/21/22 17:56:30 zmesdetect_m5[8930] DBG2 utils.py:228 [importing zoneminder polygon: road [1476,25 1466,107 1359,121 1230,134 1212,84 443,253 0,368 0,182 337,132 349,95 479,10 1276,7]]
11/21/22 17:56:30 zmesdetect_m5[8930] DBG1 utils.py:225 [dropping Porch as zones in alarm cause is [x] detected:car:61% Motion: Road]
11/21/22 17:56:30 zmesdetect_m5[8930] DBG2 utils.py:221 [Skipping Filter_Gas_Light as it is inactive]
11/21/22 17:56:30 zmesdetect_m5[8930] DBG1 utils.py:225 [dropping Filter_Bush as zones in alarm cause is [x] detected:car:61% Motion: Road]
11/21/22 17:56:30 zmesdetect_m5[8930] INF zm_detect.py:310 [Importing local classes for Object/Face]
11/21/22 17:56:31 zmesdetect_m5[8930] INF zm_detect.py:335 [Connecting with ZM APIs]
11/21/22 17:56:31 zmesdetect_m5[8930] DBG2 api.py:72 [API SSL certificate check has been disbled]
11/21/22 17:56:31 zmesdetect_m5[8930] DBG1 api.py:181 [using username/password for login]
11/21/22 17:56:31 zmesdetect_m5[8930] DBG2 api.py:210 [Using new token API]
11/21/22 17:56:31 zmesdetect_m5[8930] DBG1 api.py:217 [Access token expires on:2022-11-21 19:56:31.490423 [7200s]]
11/21/22 17:56:31 zmesdetect_m5[8930] DBG1 api.py:221 [Refresh token expires on:2022-11-22 17:56:31.490835 [86400s]]
11/21/22 17:56:31 zmesdetect_m5[8930] DBG2 zm_detect.py:343 [using ml_sequence]
11/21/22 17:56:31 zmesdetect_m5[8930] DBG2 zm_detect.py:355 [using stream_sequence]
11/21/22 17:56:31 zmesdetect_m5[8930] DBG2 zm_detect.py:360 [Using frme_set from args.]
11/21/22 17:56:31 zmesdetect_m5[8930] DBG1 detect_sequence.py:160 [Resetting models, will be loaded on next run]
11/21/22 17:56:31 zmesdetect_m5[8930] DBG2 Media.py:51 [Media get SSL certificate check has been disbled]
11/21/22 17:56:31 zmesdetect_m5[8930] DBG2 Media.py:99 [Using URL 14298249 for stream]
11/21/22 17:56:31 zmesdetect_m5[8930] DBG2 Media.py:114 [We will only process frames: ['107', '108', '69', '70', '71', '73', '75', '76', '77', '78', '79', '80', '81', '82', '83', '84', '85', '86', '87', '88', '89', '90', '91', '92', '93', '94', '95', '96', '97', '98']]
11/21/22 17:56:31 zmesdetect_m5[8930] DBG2 Media.py:137 [No need to start streams, we are picking images from http://127.0.0.1/zm/index.php?view=image&eid=14298249]
11/21/22 17:56:31 zmesdetect_m5[8930] DBG1 detect_sequence.py:654 [perf: Starting for frame:107]
11/21/22 17:56:31 zmesdetect_m5[8930] DBG1 detect_sequence.py:664 [Sequence of detection types to execute: ['object']]
11/21/22 17:56:31 zmesdetect_m5[8930] DBG1 detect_sequence.py:669 [============ Frame: 107 Running object detection type in sequence ==================]
11/21/22 17:56:31 zmesdetect_m5[8930] DBG2 detect_sequence.py:178 [Loading sequence: TPU object detection]
11/21/22 17:56:31 zmesdetect_m5[8930] DBG2 detect_sequence.py:179 [Initializing model  type:object with options:{'name': 'TPU object detection', 'enabled': 'yes', 'object_weights': '/var/lib/zmeventnotification/models/coral_edgetpu/ssdlite_mobiledet_coco_qat_postprocess_edgetpu.tflite', 'object_labels': '/var/lib/zmeventnotification/models/coral_edgetpu/coco_indexed.names', 'object_min_confidence': 0.6, 'object_framework': 'coral_edgetpu', 'tpu_max_processes': 1, 'tpu_max_lock_wait': 160, 'max_detection_size': '90%', 'disable_locks': 'no'}]
11/21/22 17:56:31 zmesdetect_m5[8930] DBG2 coral_edgetpu.py:37 [portalock: max:1, name:pyzm_uid33_tpu_lock, timeout:160]
11/21/22 17:56:31 zmesdetect_m5[8930] DBG2 detect_sequence.py:174 [Skipping YoloV4 GPU/CPU as it is disabled]
11/21/22 17:56:31 zmesdetect_m5[8930] DBG2 detect_sequence.py:174 [Skipping YoloV4 Night Time Bug Check as it is disabled]
11/21/22 17:56:31 zmesdetect_m5[8930] DBG2 coral_edgetpu.py:51 [Waiting for pyzm_uid33_tpu_lock portalock...]
11/21/22 17:56:31 zmesdetect_m5[8930] DBG2 coral_edgetpu.py:53 [Got pyzm_uid33_tpu_lock portalock]
11/21/22 17:56:31 zmesdetect_m5[8930] DBG1 detect_sequence.py:701 [--------- Frame:107 Running variation: #1 -------------]
11/21/22 17:56:31 zmesdetect_m5[8930] DBG2 coral_edgetpu.py:48 [pyzm_uid33_tpu_lock portalock already acquired]
11/21/22 17:56:31 zmesdetect_m5[8930] DBG1 coral_edgetpu.py:89 [|--------- Loading "TPU object detection" model from disk -------------|]
11/21/22 17:56:34 zmesdetect_m5[8930] DBG1 coral_edgetpu.py:97 [perf: processor:tpu TPU initialization (loading /var/lib/zmeventnotification/models/coral_edgetpu/ssdlite_mobiledet_coco_qat_postprocess_edgetpu.tflite from disk) took: 2665.68 ms]
11/21/22 17:56:34 zmesdetect_m5[8930] DBG1 coral_edgetpu.py:163 [|---------- TPU (input image: 800w*450h) ----------|]
11/21/22 17:56:34 zmesdetect_m5[8930] DBG2 coral_edgetpu.py:68 [Released portalock pyzm_uid33_tpu_lock]
11/21/22 17:56:34 zmesdetect_m5[8930] DBG1 coral_edgetpu.py:185 [perf: processor:tpu Coral TPU detection took: 35.90 ms]
11/21/22 17:56:34 zmesdetect_m5[8930] DBG2 object.py:66 [core model detection over, got 1 objects. Now filtering]
11/21/22 17:56:34 zmesdetect_m5[8930] DBG2 object.py:70 [Max object size found to be: 90%]
11/21/22 17:56:34 zmesdetect_m5[8930] DBG2 object.py:78 [Converted 90% to 324000.0]
11/21/22 17:56:34 zmesdetect_m5[8930] DBG2 object.py:103 [Returning filtered list of 1 objects.]
11/21/22 17:56:34 zmesdetect_m5[8930] DBG2 detect_sequence.py:711 [This model iteration inside object found: labels: ['car'],conf:[0.60546875]]
11/21/22 17:56:34 zmesdetect_m5[8930] DBG2 detect_sequence.py:424 [Max object size found to be: 90%]
11/21/22 17:56:34 zmesdetect_m5[8930] DBG2 detect_sequence.py:432 [Converted 90% to 324000.0]
11/21/22 17:56:34 zmesdetect_m5[8930] DBG2 detect_sequence.py:502 [intersection: object:car,POLYGON ((285 6, 361 6, 361 40, 285 40, 285 6)) intersects polygon:road,POLYGON ((615 10, 610 44, 566 50, 512 55, 505 35, 184 105, 0 153, 0 75, 140 55, 145 39, 199 4, 531 2, 615 10))]
11/21/22 17:56:34 zmesdetect_m5[8930] DBG2 detect_sequence.py:518 [Using global match pattern: (person|car|motorbike|bus|truck|boat|dog|cat|bike|nightbug)]
11/21/22 17:56:34 zmesdetect_m5[8930] DBG2 detect_sequence.py:526 [road intersects object:car[[(285, 6), (361, 6), (361, 40), (285, 40)]]]
11/21/22 17:56:34 zmesdetect_m5[8930] DBG2 detect_sequence.py:753 [breaking out of same model loop, as matches found and strategy is "first"]
11/21/22 17:56:34 zmesdetect_m5[8930] DBG1 detect_sequence.py:654 [perf: Starting for frame:108]
11/21/22 17:56:34 zmesdetect_m5[8930] DBG1 detect_sequence.py:664 [Sequence of detection types to execute: ['object']]
11/21/22 17:56:34 zmesdetect_m5[8930] DBG1 detect_sequence.py:669 [============ Frame: 108 Running object detection type in sequence ==================]
11/21/22 17:56:34 zmesdetect_m5[8930] DBG1 detect_sequence.py:701 [--------- Frame:108 Running variation: #1 -------------]
11/21/22 17:56:34 zmesdetect_m5[8930] DBG2 coral_edgetpu.py:51 [Waiting for pyzm_uid33_tpu_lock portalock...]
11/21/22 17:56:34 zmesdetect_m5[8930] DBG2 coral_edgetpu.py:53 [Got pyzm_uid33_tpu_lock portalock]
11/21/22 17:56:34 zmesdetect_m5[8930] DBG1 coral_edgetpu.py:163 [|---------- TPU (input image: 800w*450h) ----------|]
11/21/22 17:56:34 zmesdetect_m5[8930] DBG2 coral_edgetpu.py:68 [Released portalock pyzm_uid33_tpu_lock]
11/21/22 17:56:34 zmesdetect_m5[8930] DBG1 coral_edgetpu.py:185 [perf: processor:tpu Coral TPU detection took: 18.38 ms]
11/21/22 17:56:34 zmesdetect_m5[8930] DBG2 object.py:66 [core model detection over, got 1 objects. Now filtering]
11/21/22 17:56:34 zmesdetect_m5[8930] DBG2 object.py:70 [Max object size found to be: 90%]
11/21/22 17:56:34 zmesdetect_m5[8930] DBG2 object.py:78 [Converted 90% to 324000.0]
11/21/22 17:56:34 zmesdetect_m5[8930] DBG2 object.py:103 [Returning filtered list of 1 objects.]
11/21/22 17:56:34 zmesdetect_m5[8930] DBG2 detect_sequence.py:711 [This model iteration inside object found: labels: ['car'],conf:[0.61328125]]
11/21/22 17:56:34 zmesdetect_m5[8930] DBG2 detect_sequence.py:424 [Max object size found to be: 90%]
11/21/22 17:56:34 zmesdetect_m5[8930] DBG2 detect_sequence.py:432 [Converted 90% to 324000.0]
11/21/22 17:56:34 zmesdetect_m5[8930] DBG2 detect_sequence.py:502 [intersection: object:car,POLYGON ((290 6, 363 6, 363 39, 290 39, 290 6)) intersects polygon:road,POLYGON ((615 10, 610 44, 566 50, 512 55, 505 35, 184 105, 0 153, 0 75, 140 55, 145 39, 199 4, 531 2, 615 10))]
11/21/22 17:56:34 zmesdetect_m5[8930] DBG2 detect_sequence.py:518 [Using global match pattern: (person|car|motorbike|bus|truck|boat|dog|cat|bike|nightbug)]
11/21/22 17:56:34 zmesdetect_m5[8930] DBG2 detect_sequence.py:526 [road intersects object:car[[(290, 6), (363, 6), (363, 39), (290, 39)]]]
11/21/22 17:56:34 zmesdetect_m5[8930] DBG2 detect_sequence.py:753 [breaking out of same model loop, as matches found and strategy is "first"]
11/21/22 17:56:34 zmesdetect_m5[8930] DBG1 detect_sequence.py:654 [perf: Starting for frame:69]
11/21/22 17:56:34 zmesdetect_m5[8930] DBG1 detect_sequence.py:664 [Sequence of detection types to execute: ['object']]
11/21/22 17:56:34 zmesdetect_m5[8930] DBG1 detect_sequence.py:669 [============ Frame: 69 Running object detection type in sequence ==================]
11/21/22 17:56:34 zmesdetect_m5[8930] DBG1 detect_sequence.py:701 [--------- Frame:69 Running variation: #1 -------------]
11/21/22 17:56:34 zmesdetect_m5[8930] DBG2 coral_edgetpu.py:51 [Waiting for pyzm_uid33_tpu_lock portalock...]
11/21/22 17:56:34 zmesdetect_m5[8930] DBG2 coral_edgetpu.py:53 [Got pyzm_uid33_tpu_lock portalock]
11/21/22 17:56:34 zmesdetect_m5[8930] DBG1 coral_edgetpu.py:163 [|---------- TPU (input image: 800w*450h) ----------|]
11/21/22 17:56:34 zmesdetect_m5[8930] DBG2 coral_edgetpu.py:68 [Released portalock pyzm_uid33_tpu_lock]
11/21/22 17:56:34 zmesdetect_m5[8930] DBG1 coral_edgetpu.py:185 [perf: processor:tpu Coral TPU detection took: 17.38 ms]
11/21/22 17:56:34 zmesdetect_m5[8930] DBG2 object.py:66 [core model detection over, got 1 objects. Now filtering]
11/21/22 17:56:34 zmesdetect_m5[8930] DBG2 object.py:70 [Max object size found to be: 90%]
11/21/22 17:56:34 zmesdetect_m5[8930] DBG2 object.py:78 [Converted 90% to 324000.0]
11/21/22 17:56:34 zmesdetect_m5[8930] DBG2 object.py:103 [Returning filtered list of 1 objects.]
11/21/22 17:56:34 zmesdetect_m5[8930] DBG2 detect_sequence.py:711 [This model iteration inside object found: labels: ['car'],conf:[0.60546875]]
11/21/22 17:56:34 zmesdetect_m5[8930] DBG2 detect_sequence.py:424 [Max object size found to be: 90%]
11/21/22 17:56:34 zmesdetect_m5[8930] DBG2 detect_sequence.py:432 [Converted 90% to 324000.0]
11/21/22 17:56:34 zmesdetect_m5[8930] DBG2 detect_sequence.py:502 [intersection: object:car,POLYGON ((199 10, 234 10, 234 31, 199 31, 199 10)) intersects polygon:road,POLYGON ((615 10, 610 44, 566 50, 512 55, 505 35, 184 105, 0 153, 0 75, 140 55, 145 39, 199 4, 531 2, 615 10))]
11/21/22 17:56:34 zmesdetect_m5[8930] DBG2 detect_sequence.py:518 [Using global match pattern: (person|car|motorbike|bus|truck|boat|dog|cat|bike|nightbug)]
11/21/22 17:56:34 zmesdetect_m5[8930] DBG2 detect_sequence.py:526 [road intersects object:car[[(199, 10), (234, 10), (234, 31), (199, 31)]]]
11/21/22 17:56:34 zmesdetect_m5[8930] DBG2 detect_sequence.py:753 [breaking out of same model loop, as matches found and strategy is "first"]
11/21/22 17:56:34 zmesdetect_m5[8930] DBG1 detect_sequence.py:654 [perf: Starting for frame:70]
11/21/22 17:56:34 zmesdetect_m5[8930] DBG1 detect_sequence.py:664 [Sequence of detection types to execute: ['object']]
11/21/22 17:56:34 zmesdetect_m5[8930] DBG1 detect_sequence.py:669 [============ Frame: 70 Running object detection type in sequence ==================]
11/21/22 17:56:34 zmesdetect_m5[8930] DBG1 detect_sequence.py:701 [--------- Frame:70 Running variation: #1 -------------]
11/21/22 17:56:34 zmesdetect_m5[8930] DBG2 coral_edgetpu.py:51 [Waiting for pyzm_uid33_tpu_lock portalock...]
<< This is exactly where the log ends for this process>>


This is from the output of my custom script running process 2:
Mon Nov 21 17:56:29 2022: Using normal config: /etc/zm/objectconfig.ini
F driver/usb/usb_driver.cc:1148] HandleQueuedBulkIn transfer in failed. Not found: USB transfer error 5 [LibUsbDataInCallback]
Mon Nov 21 17:56:36 2022: zm_detect: Monitorid: 5, Eventid: 14298249, ReturnCode0, ErrorCode:0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.