ZMES Install Feat GPU Support Ubuntu 20.04 - Solved Guide Within
ZMES Install Feat GPU Support Ubuntu 20.04 - Solved Guide Within
**UPDATED! - GUIDE IS LOCATED ON PAGE 2
Hello,
I have searched far and wide for a guide on how to install zmes with cuda support that works.... I have used the docs for zmes, and multiple guides found on google but for the life of me I cannot get it to work there is always something that crops up. It does not seem very well documented and what is documented does not seem to work out of the box so to speak.
Does anyone out there have a ace in the hole guide that just works? I have been working on this for over a week and have nuked the zonminder box in excess of 15 times trying to get this to work.
I have had issues with cv2, known_faces paths being incorrect etc. I have tried multiple different versions of Opencv to no avail. I have tried all Nvidia Driver versions. Lost and do not know where to go for the correct info to get this up and running.
Any help would be greatly appreciated.
Very Frustrated,
Kalter
Machine Specs are as follows.
Intel 5820k
32gb ddr3
nvidia gtx 1660
Zoneminder 1.36.17
Kubuntu 20.04
Hello,
I have searched far and wide for a guide on how to install zmes with cuda support that works.... I have used the docs for zmes, and multiple guides found on google but for the life of me I cannot get it to work there is always something that crops up. It does not seem very well documented and what is documented does not seem to work out of the box so to speak.
Does anyone out there have a ace in the hole guide that just works? I have been working on this for over a week and have nuked the zonminder box in excess of 15 times trying to get this to work.
I have had issues with cv2, known_faces paths being incorrect etc. I have tried multiple different versions of Opencv to no avail. I have tried all Nvidia Driver versions. Lost and do not know where to go for the correct info to get this up and running.
Any help would be greatly appreciated.
Very Frustrated,
Kalter
Machine Specs are as follows.
Intel 5820k
32gb ddr3
nvidia gtx 1660
Zoneminder 1.36.17
Kubuntu 20.04
Last edited by kaltertod on Tue Jun 14, 2022 12:47 am, edited 4 times in total.
Re: Looking for a zmes installation Feat GPU support
Crazy Quite a few views and no replies I nuked the install again and I am starting from scratch. Anyone see any problems with this install guide that I am missing aside that it is missing opencv 4.4.0 for the gpu facial recognition, and I am not using a headless install so the headless drivers are not needed?
https://www.reddit.com/r/ZoneMinder/com ... _with_gpu/
Again any help would be appreciated, starting to think using zmes is a lost cause...
Kalter
https://www.reddit.com/r/ZoneMinder/com ... _with_gpu/
Again any help would be appreciated, starting to think using zmes is a lost cause...
Kalter
Re: Looking for a zmes installation Feat GPU support
You are largely on your own.
This is the main doc site https://zmeventnotification.readthedocs ... index.html
This might help https://medium.com/@baudneo/install-zon ... bc0ed55417
This is the main doc site https://zmeventnotification.readthedocs ... index.html
This might help https://medium.com/@baudneo/install-zon ... bc0ed55417
-
Re: Looking for a zmes installation Feat GPU support
I have tried the baudneo repos and cannot get opencv to even compile using those directions. That guide is for ubuntu 21.04 anyway.Magic919 wrote: ↑Sun Jun 05, 2022 4:50 pm You are largely on your own.
This is the main doc site https://zmeventnotification.readthedocs ... index.html
This might help https://medium.com/@baudneo/install-zon ... bc0ed55417
With the guide in the link that I posted before I can get opencv to compile without errors but when I go to import cv2 into python2 it cant find it... upon further investigation cv2 is not placed into the python2/site-packages directory as it should be....
I guess it might be time to look at other nvr software besides zoneminder, I have been using it for years but this is getting to the point that it is no longer feasible to try and get this running
kalter
Re: Looking for a zmes installation Feat GPU support
This is not Zoneminder, it’s a separate product.
Sounds like your problem is not ZMES or ZM in any case.
Sounds like your problem is not ZMES or ZM in any case.
-
Re: Looking for a zmes installation Feat GPU support
I know that it is a seperate piece of software that enhances the functionality of zoneminder hence the reason I want to use it.... I also use zmninja. I can get zmes to install just fine as well as zoneminder... hell I can install zoneminder from fresh install in less than 10 mins.
That is why I am looking for a good guide to follow to get all the dependencies for zmes up and running so I can enjoy the full functionality of the software using an NVIDIA GPU because you currently cannot get a coral tpu anywhere at a decent price.
I am looking for a guide that states:
Step A. Install zoneminder
Step B. Install nvidia Drivers
Step C. Install Cuda Toolkit
Step D. Install OpenCV with cuda support
Step E. Install face_recognition
ETC..
I guess I was looking for a bit more of community involvement with this "product" as you call it. I originally asked for a good step by step guide that shows how to install all of the software/driver components to get zmes up and running properly... I am pretty savvy with cli but some things still hang me up and I am looking for further direction...
Re: Looking for a zmes installation Feat GPU support
Here's the original author https://medium.com/@pliablepixels That's where I got started. Since then Baudeo got involved, but has also seemingly dropped off.
I'm not aware of any better step by step than docs by those two.
One suggestion would be to make sure you use Python 3. I can't imagine anyone runs it on Python 2.
I'm not aware of any better step by step than docs by those two.
One suggestion would be to make sure you use Python 3. I can't imagine anyone runs it on Python 2.
-
Re: Looking for a zmes installation Feat GPU support
Ah clue has emerged.... all the directions that I have followed so far have mentioned using python2...... you are on to something.Magic919 wrote: ↑Mon Jun 06, 2022 7:54 am Here's the original author https://medium.com/@pliablepixels That's where I got started. Since then Baudeo got involved, but has also seemingly dropped off.
I'm not aware of any better step by step than docs by those two.
One suggestion would be to make sure you use Python 3. I can't imagine anyone runs it on Python 2.
Re: Looking for a zmes installation Feat GPU support
zmes is communicating properly with zoneminder however I am getting this error when zmes is trying to process events:
DBG-2:2022-06-06,11:18:23 PARENT: checkEvents() new events found=2
DBG-2:2022-06-06,11:18:24 PARENT: There are 2 new Events to process
DBG-2:2022-06-06,11:18:24 PARENT: ---------->Tick END (active forks:2, total forks:3, active hooks: 0)<--------------
DBG-1:2022-06-06,11:18:24 PARENT: Forked process:71585 to handle alarm eid:10
DBG-1:2022-06-06,11:18:24 PARENT: Forked process:71584 to handle alarm eid:14
DBG-2:2022-06-06,11:18:24 |----> FORK:Monitor-6 (6), eid:10 Adding event path:/zoneminder/6/2022-06-06/10 to hook for image storage
DBG-2:2022-06-06,11:18:24 |----> FORK:Monitor-2 (2), eid:14 Adding event path:/zoneminder/2/2022-06-06/14 to hook for image storage
DBG-1:2022-06-06,11:18:24 |----> FORK:Monitor-6 (6), eid:10 Invoking hook on event start:'/var/lib/zmeventnotification/bin/zm_event_start.sh' 10 6 "Monitor-6" "Motion" "/zoneminder/6/2022-06-06/10"
DBG-1:2022-06-06,11:18:24 |----> FORK:Monitor-2 (2), eid:14 Invoking hook on event start:'/var/lib/zmeventnotification/bin/zm_event_start.sh' 14 2 "Monitor-2" "Motion" "/zoneminder/2/2022-06-06/14"
Traceback (most recent call last):
File "/var/lib/zmeventnotification/bin/zm_detect.py", line 15, in <module>
import imutils
File "/usr/local/lib/python3.8/dist-packages/imutils/__init__.py", line 8, in <module>
from .convenience import translate
File "/usr/local/lib/python3.8/dist-packages/imutils/convenience.py", line 6, in <module>
import cv2
ModuleNotFoundError: No module named 'cv2'
DBG-2:2022-06-06,11:18:24 |----> FORK:Monitor-6 (6), eid:10 parse of hook: and []
Traceback (most recent call last):
File "/var/lib/zmeventnotification/bin/zm_detect.py", line 15, in <module>
import imutils
File "/usr/local/lib/python3.8/dist-packages/imutils/__init__.py", line 8, in <module>
from .convenience import translate
File "/usr/local/lib/python3.8/dist-packages/imutils/convenience.py", line 6, in <module>
import cv2
ModuleNotFoundError: No module named 'cv2'
DBG-1:2022-06-06,11:18:24 |----> FORK:Monitor-6 (6), eid:10 hook start returned with text: json:[] exit:1
DBG-2:2022-06-06,11:18:24 |----> FORK:Monitor-2 (2), eid:14 parse of hook: and []
DBG-2:2022-06-06,11:18:25 |----> FORK:Monitor-6 (6), eid:10 For 6 (Monitor-6), SHM says: state=4, eid=10
DBG-1:2022-06-06,11:18:25 |----> FORK:Monitor-2 (2), eid:14 hook start returned with text: json:[] exit:1
INF:2022-06-06,11:18:25 |----> FORK:Monitor-6 (6), eid:10 Event 10 for Monitor 6 has finished
DBG-2:2022-06-06,11:18:23 PARENT: checkEvents() new events found=2
DBG-2:2022-06-06,11:18:24 PARENT: There are 2 new Events to process
DBG-2:2022-06-06,11:18:24 PARENT: ---------->Tick END (active forks:2, total forks:3, active hooks: 0)<--------------
DBG-1:2022-06-06,11:18:24 PARENT: Forked process:71585 to handle alarm eid:10
DBG-1:2022-06-06,11:18:24 PARENT: Forked process:71584 to handle alarm eid:14
DBG-2:2022-06-06,11:18:24 |----> FORK:Monitor-6 (6), eid:10 Adding event path:/zoneminder/6/2022-06-06/10 to hook for image storage
DBG-2:2022-06-06,11:18:24 |----> FORK:Monitor-2 (2), eid:14 Adding event path:/zoneminder/2/2022-06-06/14 to hook for image storage
DBG-1:2022-06-06,11:18:24 |----> FORK:Monitor-6 (6), eid:10 Invoking hook on event start:'/var/lib/zmeventnotification/bin/zm_event_start.sh' 10 6 "Monitor-6" "Motion" "/zoneminder/6/2022-06-06/10"
DBG-1:2022-06-06,11:18:24 |----> FORK:Monitor-2 (2), eid:14 Invoking hook on event start:'/var/lib/zmeventnotification/bin/zm_event_start.sh' 14 2 "Monitor-2" "Motion" "/zoneminder/2/2022-06-06/14"
Traceback (most recent call last):
File "/var/lib/zmeventnotification/bin/zm_detect.py", line 15, in <module>
import imutils
File "/usr/local/lib/python3.8/dist-packages/imutils/__init__.py", line 8, in <module>
from .convenience import translate
File "/usr/local/lib/python3.8/dist-packages/imutils/convenience.py", line 6, in <module>
import cv2
ModuleNotFoundError: No module named 'cv2'
DBG-2:2022-06-06,11:18:24 |----> FORK:Monitor-6 (6), eid:10 parse of hook: and []
Traceback (most recent call last):
File "/var/lib/zmeventnotification/bin/zm_detect.py", line 15, in <module>
import imutils
File "/usr/local/lib/python3.8/dist-packages/imutils/__init__.py", line 8, in <module>
from .convenience import translate
File "/usr/local/lib/python3.8/dist-packages/imutils/convenience.py", line 6, in <module>
import cv2
ModuleNotFoundError: No module named 'cv2'
DBG-1:2022-06-06,11:18:24 |----> FORK:Monitor-6 (6), eid:10 hook start returned with text: json:[] exit:1
DBG-2:2022-06-06,11:18:24 |----> FORK:Monitor-2 (2), eid:14 parse of hook: and []
DBG-2:2022-06-06,11:18:25 |----> FORK:Monitor-6 (6), eid:10 For 6 (Monitor-6), SHM says: state=4, eid=10
DBG-1:2022-06-06,11:18:25 |----> FORK:Monitor-2 (2), eid:14 hook start returned with text: json:[] exit:1
INF:2022-06-06,11:18:25 |----> FORK:Monitor-6 (6), eid:10 Event 10 for Monitor 6 has finished
Re: Looking for a zmes installation Feat GPU support
Following the author's docs would have you running things manually to test it out. https://zmeventnotification.readthedocs ... -operation
You still don't seem to have CV2, or at least not installed for that Python version.
Not 100% sure you have imutils module, but it didn't throw that as a specific error. It should be installed as part of the setup.py (automatically).
You still don't seem to have CV2, or at least not installed for that Python version.
Not 100% sure you have imutils module, but it didn't throw that as a specific error. It should be installed as part of the setup.py (automatically).
-
Re: Looking for a zmes installation Feat GPU support
Opencv is a fresh compile from source no errors using python3 in the cmake optionsMagic919 wrote: ↑Mon Jun 06, 2022 5:41 pm Following the author's docs would have you running things manually to test it out. https://zmeventnotification.readthedocs ... -operation
You still don't seem to have CV2, or at least not installed for that Python version.
Not 100% sure you have imutils module, but it didn't throw that as a specific error. It should be installed as part of the setup.py (automatically).
The following manual command:
sudo -u www-data /var/lib/zmeventnotification/bin/zm_detect.py --config /etc/zm/objectconfig.ini --eventid 1 --monitorid 1 --debug
Throws:
Traceback (most recent call last):
File "/var/lib/zmeventnotification/bin/zm_detect.py", line 15, in <module>
import imutils
File "/usr/local/lib/python3.8/dist-packages/imutils/__init__.py", line 8, in <module>
from .convenience import translate
File "/usr/local/lib/python3.8/dist-packages/imutils/convenience.py", line 6, in <module>
import cv2
ModuleNotFoundError: No module named 'cv2'
When in the python3 environment "import imutils" Throws:
ModuleNotFoundError: No module named 'cv2'
Re: Looking for a zmes installation Feat GPU support
cv2.so should be located in /usr/local/lib/python3.8/site-packges/
However the site-packages directory is not even there so I wonder where the hell the install put cv2.so
I found the cv2 directory and copied it to /usr/local/lib/python3.8/dist-packages and now python is picking it up on import.... time to rerun the test
However the site-packages directory is not even there so I wonder where the hell the install put cv2.so
I found the cv2 directory and copied it to /usr/local/lib/python3.8/dist-packages and now python is picking it up on import.... time to rerun the test
Re: Looking for a zmes installation Feat GPU support
Testing went as follows....... not sure what to make of it the detection did seem to work..... I have to get ready for work let me know if you see anything obvious.
Code: Select all
sudo -u www-data /var/lib/zmeventnotification/bin/zm_detect.py --config /etc/zm/objectconfig.ini --eventid 67 --monitorid 3 --debug
[sudo] password for kaltertod:
06/06/22 12:32:00 zmesdetect_m3[3767] INF ZMLog.py:292 [Setting up signal handler for logs]
06/06/22 12:32:00 zmesdetect_m3[3767] INF ZMLog.py:301 [Switching global logger to ZMLog]
06/06/22 12:32:01 zmesdetect_m3[3767] INF zm_detect.py:284 [---------| app:6.1.28, pyzm:0.3.56, ES:6.1.28
, OpenCV:4.5.5|------------]
06/06/22 12:32:01 zmesdetect_m3[3767] INF utils.py:405 [Reading config from: /etc/zm/objectconfig.ini]
06/06/22 12:32:01 zmesdetect_m3[3767] INF utils.py:410 [Reading secrets from: /etc/zm/secrets.ini]
06/06/22 12:32:01 zmesdetect_m3[3767] DBG2 utils.py:382 [Secret token found in config: !ZM_PORTAL]
06/06/22 12:32:01 zmesdetect_m3[3767] DBG2 utils.py:382 [Secret token found in config: !ZM_USER]
06/06/22 12:32:01 zmesdetect_m3[3767] DBG2 utils.py:382 [Secret token found in config: !ZM_PASSWORD]
06/06/22 12:32:01 zmesdetect_m3[3767] DBG2 utils.py:382 [Secret token found in config: !ZM_API_PORTAL]
06/06/22 12:32:02 zmesdetect_m3[3767] DBG2 utils.py:382 [Secret token found in config: !ML_USER]
06/06/22 12:32:02 zmesdetect_m3[3767] DBG2 utils.py:382 [Secret token found in config: !ML_PASSWORD]
06/06/22 12:32:02 zmesdetect_m3[3767] DBG2 utils.py:382 [Secret token found in config: !PLATEREC_ALPR_KEY]
06/06/22 12:32:02 zmesdetect_m3[3767] DBG1 utils.py:445 [allowing self-signed certs to work...]
06/06/22 12:32:02 zmesdetect_m3[3767] DBG2 utils.py:455 [Now checking for monitor overrides]
06/06/22 12:32:02 zmesdetect_m3[3767] DBG3 utils.py:522 [Finally, doing parameter substitution]
06/06/22 12:32:02 zmesdetect_m3[3767] INF zm_detect.py:309 [Importing local classes for Object/Face]
06/06/22 12:32:03 zmesdetect_m3[3767] INF zm_detect.py:334 [Connecting with ZM APIs]
06/06/22 12:32:04 zmesdetect_m3[3767] DBG2 api.py:72 [API SSL certificate check has been disbled]
06/06/22 12:32:04 zmesdetect_m3[3767] DBG1 api.py:181 [using username/password for login]
06/06/22 12:32:05 zmesdetect_m3[3767] DBG2 api.py:210 [Using new token API]
06/06/22 12:32:05 zmesdetect_m3[3767] DBG1 api.py:217 [Access token expires on:2022-06-06 14:32:05.111341 [7200s]]
06/06/22 12:32:05 zmesdetect_m3[3767] DBG1 api.py:221 [Refresh token expires on:2022-06-07 12:32:05.136434 [86400s]]
06/06/22 12:32:05 zmesdetect_m3[3767] DBG2 zm_detect.py:342 [using ml_sequence]
06/06/22 12:32:05 zmesdetect_m3[3767] DBG2 zm_detect.py:354 [using stream_sequence]
06/06/22 12:32:05 zmesdetect_m3[3767] DBG1 detect_sequence.py:160 [Resetting models, will be loaded on next run]
06/06/22 12:32:05 zmesdetect_m3[3767] DBG3 detect_sequence.py:634 [Using automatic locking as we are switching between models]
06/06/22 12:32:05 zmesdetect_m3[3767] DBG2 Media.py:51 [Media get SSL certificate check has been disbled]
06/06/22 12:32:05 zmesdetect_m3[3767] DBG2 Media.py:99 [Using URL 67 for stream]
06/06/22 12:32:05 zmesdetect_m3[3767] DBG2 Media.py:114 [We will only process frames: ['snapshot', 'alarm']]
06/06/22 12:32:05 zmesdetect_m3[3767] DBG2 Media.py:137 [No need to start streams, we are picking images from https://192.168.0.9/zm/index.php?view=image&eid=67]
06/06/22 12:32:05 zmesdetect_m3[3767] DBG3 Media.py:271 [Reading https://192.168.0.9/zm/index.php?view=image&eid=67&fid=snapshot]
06/06/22 12:32:05 zmesdetect_m3[3767] DBG3 api.py:144 [No need to relogin as access token still has 119.99538863333333 minutes remaining]
06/06/22 12:32:05 zmesdetect_m3[3767] DBG3 api.py:272 [make_request called with url=https://192.168.0.9/zm/index.php?view=image&eid=67&fid=snapshot payload={} type=get query={'token': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJab25lTWluZGVyIiwiaWF0IjoxNjU0NTQwMzI0LCJleHAiOjE2NTQ1NDc1MjQsInVzZXIiOiJaTUVTIiwidHlwZSI6ImFjY2VzcyJ9.uKe2_zHdHewak0iWyz2r1KE-vt_tSAlIZgjsXh-9XBs'}]
06/06/22 12:32:06 zmesdetect_m3[3767] DBG1 detect_sequence.py:654 [perf: Starting for frame:snapshot]
06/06/22 12:32:06 zmesdetect_m3[3767] DBG1 detect_sequence.py:664 [Sequence of detection types to execute: ['object', 'face', 'alpr']]
06/06/22 12:32:06 zmesdetect_m3[3767] DBG1 detect_sequence.py:669 [============ Frame: snapshot Running object detection type in sequence ==================]
06/06/22 12:32:06 zmesdetect_m3[3767] DBG2 detect_sequence.py:174 [Skipping TPU object detection as it is disabled]
06/06/22 12:32:06 zmesdetect_m3[3767] DBG2 detect_sequence.py:178 [Loading sequence: YoloV4 GPU/CPU]
06/06/22 12:32:06 zmesdetect_m3[3767] DBG2 detect_sequence.py:179 [Initializing model type:object with options:{'name': 'YoloV4 GPU/CPU', 'enabled': 'yes', 'object_config': '/var/lib/zmeventnotification/models/yolov4/yolov4.cfg', 'object_weights': '/var/lib/zmeventnotification/models/yolov4/yolov4.weights', 'object_labels': '/var/lib/zmeventnotification/models/yolov4/coco.names', 'object_min_confidence': 0.3, 'object_framework': 'opencv', 'object_processor': 'gpu', 'gpu_max_processes': 1, 'gpu_max_lock_wait': 100, 'cpu_max_processes': 3, 'cpu_max_lock_wait': 100, 'max_detection_size': '90%', 'disable_locks': 'no'}]
06/06/22 12:32:06 zmesdetect_m3[3767] DBG2 yolo.py:38 [portalock: max:1, name:pyzm_uid33_gpu_lock, timeout:100]
06/06/22 12:32:06 zmesdetect_m3[3767] DBG3 detect_sequence.py:689 [object has a same_model_sequence strategy of first]
06/06/22 12:32:06 zmesdetect_m3[3767] DBG1 detect_sequence.py:701 [--------- Frame:snapshot Running variation: #1 -------------]
06/06/22 12:32:06 zmesdetect_m3[3767] DBG2 yolo.py:136 [detect extracted image dimensions as: 800wx450h]
06/06/22 12:32:06 zmesdetect_m3[3767] DBG2 yolo.py:50 [Waiting for pyzm_uid33_gpu_lock portalock...]
06/06/22 12:32:06 zmesdetect_m3[3767] DBG2 yolo.py:52 [Got pyzm_uid33_gpu_lock portalock]
06/06/22 12:32:06 zmesdetect_m3[3767] DBG1 yolo.py:85 [|--------- Loading "YoloV4 GPU/CPU" model from disk -------------|]
06/06/22 12:32:12 zmesdetect_m3[3767] DBG1 yolo.py:98 [You are using OpenCV >= 4.5.4, making sure we fix getUnconnectedOutLayers() API]
06/06/22 12:32:12 zmesdetect_m3[3767] DBG1 yolo.py:100 [perf: processor:gpu Yolo initialization (loading /var/lib/zmeventnotification/models/yolov4/yolov4.weights model from disk) took: 4879.71 ms]
06/06/22 12:32:12 zmesdetect_m3[3767] DBG2 yolo.py:115 [Setting CUDA backend for OpenCV]
06/06/22 12:32:12 zmesdetect_m3[3767] DBG3 yolo.py:116 [If you did not set your CUDA_ARCH_BIN correctly during OpenCV compilation, you will get errors during detection related to invalid device/make_policy]
06/06/22 12:32:12 zmesdetect_m3[3767] DBG1 yolo.py:160 [|---------- YOLO (input image: 800w*450h, model resize dimensions: 416w*416h) ----------|]
06/06/22 12:32:23 zmesdetect_m3[3767] DBG2 yolo.py:68 [Released pyzm_uid33_gpu_lock portalock]
06/06/22 12:32:23 zmesdetect_m3[3767] DBG1 yolo.py:185 [perf: processor:gpu Yolo detection took: 10728.74 ms]
06/06/22 12:32:23 zmesdetect_m3[3767] DBG2 yolo.py:220 [perf: processor:gpu Yolo NMS filtering took: 1.47 ms]
06/06/22 12:32:23 zmesdetect_m3[3767] DBG2 object.py:66 [core model detection over, got 11 objects. Now filtering]
06/06/22 12:32:23 zmesdetect_m3[3767] DBG2 object.py:70 [Max object size found to be: 90%]
06/06/22 12:32:23 zmesdetect_m3[3767] DBG2 object.py:78 [Converted 90% to 324000.0]
06/06/22 12:32:23 zmesdetect_m3[3767] DBG2 object.py:101 [Ignoring car [548, 112, 584, 134] as conf. level 0.29170605540275574 is lower than 0.3]
06/06/22 12:32:23 zmesdetect_m3[3767] DBG2 object.py:103 [Returning filtered list of 10 objects.]
06/06/22 12:32:23 zmesdetect_m3[3767] DBG2 detect_sequence.py:711 [This model iteration inside object found: labels: ['person', 'truck', 'car', 'truck', 'car', 'truck', 'truck', 'car', 'car', 'car'],conf:[0.9962076544761658, 0.9686015248298645, 0.9479638338088989, 0.8829721212387085, 0.7836911678314209, 0.7024609446525574, 0.5856097340583801, 0.5569575428962708, 0.36235204339027405, 0.3431270122528076]]
06/06/22 12:32:23 zmesdetect_m3[3767] DBG2 detect_sequence.py:424 [Max object size found to be: 90%]
06/06/22 12:32:23 zmesdetect_m3[3767] DBG2 detect_sequence.py:432 [Converted 90% to 324000.0]
06/06/22 12:32:23 zmesdetect_m3[3767] DBG2 detect_sequence.py:448 [No polygons, adding full image polygon: {'name': 'full_image', 'value': [(0, 0), (1920, 0), (1920, 1080), (0, 1080)], 'pattern': None}]
06/06/22 12:32:23 zmesdetect_m3[3767] DBG3 detect_sequence.py:228 [resized polygons x=0.4166666666666667/y=0.4166666666666667: [{'name': 'full_image', 'value': [(0, 0), (800, 0), (800, 450), (0, 450)], 'pattern': None}]]
06/06/22 12:32:23 zmesdetect_m3[3767] DBG2 detect_sequence.py:502 [intersection: object:person,POLYGON ((158 191, 226 191, 226 343, 158 343, 158 191)) intersects polygon:full_image,POLYGON ((0 0, 800 0, 800 450, 0 450, 0 0))]
06/06/22 12:32:23 zmesdetect_m3[3767] DBG2 detect_sequence.py:518 [Using global match pattern: (person|car|motorbike|bus|truck|boat)]
06/06/22 12:32:23 zmesdetect_m3[3767] DBG2 detect_sequence.py:526 [full_image intersects object:person[[(158, 191), (226, 191), (226, 343), (158, 343)]]]
06/06/22 12:32:23 zmesdetect_m3[3767] DBG2 detect_sequence.py:502 [intersection: object:truck,POLYGON ((487 128, 657 128, 657 208, 487 208, 487 128)) intersects polygon:full_image,POLYGON ((0 0, 800 0, 800 450, 0 450, 0 0))]
06/06/22 12:32:23 zmesdetect_m3[3767] DBG2 detect_sequence.py:518 [Using global match pattern: (person|car|motorbike|bus|truck|boat)]
06/06/22 12:32:23 zmesdetect_m3[3767] DBG2 detect_sequence.py:526 [full_image intersects object:truck[[(487, 128), (657, 128), (657, 208), (487, 208)]]]
06/06/22 12:32:23 zmesdetect_m3[3767] DBG2 detect_sequence.py:502 [intersection: object:car,POLYGON ((692 162, 800 162, 800 246, 692 246, 692 162)) intersects polygon:full_image,POLYGON ((0 0, 800 0, 800 450, 0 450, 0 0))]
06/06/22 12:32:23 zmesdetect_m3[3767] DBG2 detect_sequence.py:518 [Using global match pattern: (person|car|motorbike|bus|truck|boat)]
06/06/22 12:32:23 zmesdetect_m3[3767] DBG2 detect_sequence.py:526 [full_image intersects object:car[[(692, 162), (800, 162), (800, 246), (692, 246)]]]
06/06/22 12:32:23 zmesdetect_m3[3767] DBG2 detect_sequence.py:502 [intersection: object:truck,POLYGON ((356 80, 468 80, 468 178, 356 178, 356 80)) intersects polygon:full_image,POLYGON ((0 0, 800 0, 800 450, 0 450, 0 0))]
06/06/22 12:32:23 zmesdetect_m3[3767] DBG2 detect_sequence.py:518 [Using global match pattern: (person|car|motorbike|bus|truck|boat)]
06/06/22 12:32:24 zmesdetect_m3[3767] DBG2 detect_sequence.py:526 [full_image intersects object:truck[[(356, 80), (468, 80), (468, 178), (356, 178)]]]
06/06/22 12:32:24 zmesdetect_m3[3767] DBG2 detect_sequence.py:502 [intersection: object:car,POLYGON ((240 112, 266 112, 266 126, 240 126, 240 112)) intersects polygon:full_image,POLYGON ((0 0, 800 0, 800 450, 0 450, 0 0))]
06/06/22 12:32:24 zmesdetect_m3[3767] DBG2 detect_sequence.py:518 [Using global match pattern: (person|car|motorbike|bus|truck|boat)]
06/06/22 12:32:24 zmesdetect_m3[3767] DBG2 detect_sequence.py:526 [full_image intersects object:car[[(240, 112), (266, 112), (266, 126), (240, 126)]]]
06/06/22 12:32:24 zmesdetect_m3[3767] DBG2 detect_sequence.py:502 [intersection: object:truck,POLYGON ((304 110, 354 110, 354 136, 304 136, 304 110)) intersects polygon:full_image,POLYGON ((0 0, 800 0, 800 450, 0 450, 0 0))]
06/06/22 12:32:24 zmesdetect_m3[3767] DBG2 detect_sequence.py:518 [Using global match pattern: (person|car|motorbike|bus|truck|boat)]
06/06/22 12:32:24 zmesdetect_m3[3767] DBG2 detect_sequence.py:526 [full_image intersects object:truck[[(304, 110), (354, 110), (354, 136), (304, 136)]]]
06/06/22 12:32:24 zmesdetect_m3[3767] DBG2 detect_sequence.py:502 [intersection: object:truck,POLYGON ((100 154, 172 154, 172 204, 100 204, 100 154)) intersects polygon:full_image,POLYGON ((0 0, 800 0, 800 450, 0 450, 0 0))]
06/06/22 12:32:24 zmesdetect_m3[3767] DBG2 detect_sequence.py:518 [Using global match pattern: (person|car|motorbike|bus|truck|boat)]
06/06/22 12:32:24 zmesdetect_m3[3767] DBG2 detect_sequence.py:526 [full_image intersects object:truck[[(100, 154), (172, 154), (172, 204), (100, 204)]]]
06/06/22 12:32:24 zmesdetect_m3[3767] DBG2 detect_sequence.py:502 [intersection: object:car,POLYGON ((50 169, 118 169, 118 225, 50 225, 50 169)) intersects polygon:full_image,POLYGON ((0 0, 800 0, 800 450, 0 450, 0 0))]
06/06/22 12:32:24 zmesdetect_m3[3767] DBG2 detect_sequence.py:518 [Using global match pattern: (person|car|motorbike|bus|truck|boat)]
06/06/22 12:32:24 zmesdetect_m3[3767] DBG2 detect_sequence.py:526 [full_image intersects object:car[[(50, 169), (118, 169), (118, 225), (50, 225)]]]
06/06/22 12:32:24 zmesdetect_m3[3767] DBG2 detect_sequence.py:502 [intersection: object:car,POLYGON ((76 132, 124 132, 124 152, 76 152, 76 132)) intersects polygon:full_image,POLYGON ((0 0, 800 0, 800 450, 0 450, 0 0))]
06/06/22 12:32:24 zmesdetect_m3[3767] DBG2 detect_sequence.py:518 [Using global match pattern: (person|car|motorbike|bus|truck|boat)]
06/06/22 12:32:24 zmesdetect_m3[3767] DBG2 detect_sequence.py:526 [full_image intersects object:car[[(76, 132), (124, 132), (124, 152), (76, 152)]]]
06/06/22 12:32:24 zmesdetect_m3[3767] DBG2 detect_sequence.py:502 [intersection: object:car,POLYGON ((482 105, 582 105, 582 143, 482 143, 482 105)) intersects polygon:full_image,POLYGON ((0 0, 800 0, 800 450, 0 450, 0 0))]
06/06/22 12:32:24 zmesdetect_m3[3767] DBG2 detect_sequence.py:518 [Using global match pattern: (person|car|motorbike|bus|truck|boat)]
06/06/22 12:32:24 zmesdetect_m3[3767] DBG2 detect_sequence.py:526 [full_image intersects object:car[[(482, 105), (582, 105), (582, 143), (482, 143)]]]
06/06/22 12:32:24 zmesdetect_m3[3767] DBG2 detect_sequence.py:753 [breaking out of same model loop, as matches found and strategy is "first"]
06/06/22 12:32:24 zmesdetect_m3[3767] DBG1 detect_sequence.py:669 [============ Frame: snapshot Running face detection type in sequence ==================]
06/06/22 12:32:24 zmesdetect_m3[3767] DBG2 detect_sequence.py:190 [Skipping TPU face detection as it is disabled]
/usr/local/lib/python3.8/dist-packages/numpy/core/getlimits.py:499: UserWarning: The value of the smallest subnormal for <class 'numpy.float64'> type is zero.
setattr(self, word, getattr(machar, word).flat[0])
/usr/local/lib/python3.8/dist-packages/numpy/core/getlimits.py:89: UserWarning: The value of the smallest subnormal for <class 'numpy.float64'> type is zero.
return self._float_to_str(self.smallest_subnormal)
/usr/local/lib/python3.8/dist-packages/numpy/core/getlimits.py:499: UserWarning: The value of the smallest subnormal for <class 'numpy.float32'> type is zero.
setattr(self, word, getattr(machar, word).flat[0])
/usr/local/lib/python3.8/dist-packages/numpy/core/getlimits.py:89: UserWarning: The value of the smallest subnormal for <class 'numpy.float32'> type is zero.
return self._float_to_str(self.smallest_subnormal)
06/06/22 12:32:37 zmesdetect_m3[3767] DBG1 face_dlib.py:42 [perf: processor:gpu Face Recognition library load time took: 0.00 ms ]
06/06/22 12:32:37 zmesdetect_m3[3767] DBG1 face_dlib.py:50 [Initializing face recognition with model:cnn upsample:1, jitters:0]
06/06/22 12:32:37 zmesdetect_m3[3767] DBG2 face_dlib.py:73 [portalock: max:1, name:pyzm_uid33_gpu_lock, timeout:100]
06/06/22 12:32:37 zmesdetect_m3[3767] DBG1 face_dlib.py:97 [trained file not found, reading from images and doing training...]
06/06/22 12:32:38 zmesdetect_m3[3767] DBG1 face_dlib.py:100 [If you are using a GPU and run out of memory, do the training using zm_train_faces.py. In this case, other models like yolo may already take up a lot of GPU memory]
06/06/22 12:32:38 zmesdetect_m3[3767] ERR face_train_dlib.py:135 [No known faces found to train, encoding file not created]
06/06/22 12:32:38 zmesdetect_m3[3767] DBG1 face_train_dlib.py:152 [perf: Face Recognition training took: 41.55 ms]
06/06/22 12:32:38 zmesdetect_m3[3767] ERR face_dlib.py:110 [Error loading KNN model: [Errno 2] No such file or directory: '/var/lib/zmeventnotification/known_faces/faces.dat']
06/06/22 12:32:38 zmesdetect_m3[3767] DBG3 detect_sequence.py:689 [face has a same_model_sequence strategy of union]
06/06/22 12:32:38 zmesdetect_m3[3767] DBG1 detect_sequence.py:701 [--------- Frame:snapshot Running variation: #1 -------------]
06/06/22 12:32:38 zmesdetect_m3[3767] DBG1 face_dlib.py:164 [|---------- Dlib Face recognition (input image: 800w*450h) ----------|]
06/06/22 12:32:38 zmesdetect_m3[3767] DBG3 face_dlib.py:174 [Face options={'name': 'DLIB based face recognition', 'enabled': 'yes', 'save_unknown_faces': 'yes', 'save_unknown_faces_leeway_pixels': 100, 'face_detection_framework': 'dlib', 'known_images_path': '/var/lib/zmeventnotification/known_faces', 'unknown_images_path': '/var/lib/zmeventnotification/unknown_faces', 'face_model': 'cnn', 'face_train_model': 'cnn', 'face_recog_dist_threshold': '0.6', 'face_num_jitters': '1', 'face_upsample_times': '1', 'gpu_max_processes': 1, 'gpu_max_lock_wait': 100, 'cpu_max_processes': 3, 'cpu_max_lock_wait': 100, 'max_size': 800, 'disable_locks': 'no'}]
06/06/22 12:32:38 zmesdetect_m3[3767] DBG2 face_dlib.py:123 [Waiting for pyzm_uid33_gpu_lock portalock...]
06/06/22 12:32:38 zmesdetect_m3[3767] DBG2 face_dlib.py:125 [Got pyzm_uid33_gpu_lock lock...]
06/06/22 12:32:38 zmesdetect_m3[3767] ERR detect_sequence.py:713 [Error running model: Error while calling cudnnConvolutionBiasActivationForward( context(), &alpha1, descriptor(data), data.device(), (const cudnnFilterDescriptor_t)filter_handle, filters.device(), (const cudnnConvolutionDescriptor_t)conv_handle, (cudnnConvolutionFwdAlgo_t)forward_algo, forward_workspace, forward_workspace_size_in_bytes, &alpha2, out_desc, out, descriptor(biases), biases.device(), identity_activation_descriptor(), out_desc, out) in file /tmp/pip-install-ym9mocjo/dlib_0cf25d426edf4e2d9b83ff57f66cc291/dlib/cuda/cudnn_dlibapi.cpp:1237. code: 9, reason: CUDNN_STATUS_NOT_SUPPORTED]
06/06/22 12:32:38 zmesdetect_m3[3767] DBG2 detect_sequence.py:714 [Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/pyzm/ml/detect_sequence.py", line 710, in detect_stream
_b,_l,_c,_m = m.detect(image=frame)
File "/usr/local/lib/python3.8/dist-packages/pyzm/ml/face.py", line 23, in detect
return self.model.detect(image)
File "/usr/local/lib/python3.8/dist-packages/pyzm/ml/face_dlib.py", line 200, in detect
face_locations = face_recognition.face_locations(
File "/usr/local/lib/python3.8/dist-packages/face_recognition/api.py", line 119, in face_locations
return [_trim_css_to_bounds(_rect_to_css(face.rect), img.shape) for face in _raw_face_locations(img, number_of_times_to_upsample, "cnn")]
File "/usr/local/lib/python3.8/dist-packages/face_recognition/api.py", line 103, in _raw_face_locations
return cnn_face_detector(img, number_of_times_to_upsample)
RuntimeError: Error while calling cudnnConvolutionBiasActivationForward( context(), &alpha1, descriptor(data), data.device(), (const cudnnFilterDescriptor_t)filter_handle, filters.device(), (const cudnnConvolutionDescriptor_t)conv_handle, (cudnnConvolutionFwdAlgo_t)forward_algo, forward_workspace, forward_workspace_size_in_bytes, &alpha2, out_desc, out, descriptor(biases), biases.device(), identity_activation_descriptor(), out_desc, out) in file /tmp/pip-install-ym9mocjo/dlib_0cf25d426edf4e2d9b83ff57f66cc291/dlib/cuda/cudnn_dlibapi.cpp:1237. code: 9, reason: CUDNN_STATUS_NOT_SUPPORTED
]
06/06/22 12:32:38 zmesdetect_m3[3767] DBG2 detect_sequence.py:770 [We did not find any face matches in frame: snapshot]
06/06/22 12:32:38 zmesdetect_m3[3767] DBG1 detect_sequence.py:669 [============ Frame: snapshot Running alpr detection type in sequence ==================]
06/06/22 12:32:38 zmesdetect_m3[3767] DBG2 detect_sequence.py:672 [Making sure we have matched one of ['car', 'motorbike', 'bus', 'truck', 'boat'] in ['person', 'truck', 'car', 'truck', 'car', 'truck', 'truck', 'car', 'car', 'car'] before we proceed]
06/06/22 12:32:38 zmesdetect_m3[3767] DBG2 alpr.py:24 [Initializing ALPR:Platerecognizer cloud with options:{'name': 'Platerecognizer cloud', 'enabled': 'yes', 'alpr_api_type': 'cloud', 'alpr_service': 'plate_recognizer', 'alpr_key': 'your_plate_recognizer_api_key', 'platrec_stats': 'yes', 'platerec_min_dscore': 0.1, 'platerec_min_score': 0.2, 'max_size': 1600, 'disable_locks': 'no'}]
06/06/22 12:32:38 zmesdetect_m3[3767] DBG2 alpr.py:24 [Initializing ALPR:Platerecognizer cloud with options:{'name': 'Platerecognizer cloud', 'enabled': 'yes', 'alpr_api_type': 'cloud', 'alpr_service': 'plate_recognizer', 'alpr_key': 'your_plate_recognizer_api_key', 'platrec_stats': 'yes', 'platerec_min_dscore': 0.1, 'platerec_min_score': 0.2, 'max_size': 1600, 'disable_locks': 'no'}]
06/06/22 12:32:38 zmesdetect_m3[3767] DBG1 alpr.py:141 [PlateRecognizer ALPR initialized with url: https://api.platerecognizer.com/v1]
06/06/22 12:32:39 zmesdetect_m3[3767] DBG3 detect_sequence.py:689 [alpr has a same_model_sequence strategy of first]
06/06/22 12:32:39 zmesdetect_m3[3767] DBG1 detect_sequence.py:701 [--------- Frame:snapshot Running variation: #1 -------------]
06/06/22 12:32:39 zmesdetect_m3[3767] DBG1 alpr.py:50 [Supplied object is not a file, assuming blob and creating file]
06/06/22 12:32:39 zmesdetect_m3[3767] DBG2 alpr.py:54 [resizing image blob to 1600]
06/06/22 12:32:40 zmesdetect_m3[3767] ERR alpr.py:219 [Plate recognizer rejected the upload with 403 Client Error: Forbidden for url: https://api.platerecognizer.com/v1/plate-reader and body:b'{"detail":"Invalid token.","status_code":403}']
06/06/22 12:32:40 zmesdetect_m3[3767] DBG2 alpr.py:251 [Exiting ALPR with labels:[]]
06/06/22 12:32:40 zmesdetect_m3[3767] DBG2 detect_sequence.py:711 [This model iteration inside alpr found: labels: [],conf:[]]
06/06/22 12:32:40 zmesdetect_m3[3767] DBG2 detect_sequence.py:424 [Max object size found to be: 90%]
06/06/22 12:32:40 zmesdetect_m3[3767] DBG2 detect_sequence.py:432 [Converted 90% to 324000.0]
06/06/22 12:32:40 zmesdetect_m3[3767] DBG2 detect_sequence.py:770 [We did not find any alpr matches in frame: snapshot]
06/06/22 12:32:40 zmesdetect_m3[3767] DBG3 Media.py:271 [Reading https://192.168.0.9/zm/index.php?view=image&eid=67&fid=alarm]
06/06/22 12:32:40 zmesdetect_m3[3767] DBG3 api.py:144 [No need to relogin as access token still has 119.40476605 minutes remaining]
06/06/22 12:32:40 zmesdetect_m3[3767] DBG3 api.py:272 [make_request called with url=https://192.168.0.9/zm/index.php?view=image&eid=67&fid=alarm payload={} type=get query={'token': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJab25lTWluZGVyIiwiaWF0IjoxNjU0NTQwMzI0LCJleHAiOjE2NTQ1NDc1MjQsInVzZXIiOiJaTUVTIiwidHlwZSI6ImFjY2VzcyJ9.uKe2_zHdHewak0iWyz2r1KE-vt_tSAlIZgjsXh-9XBs'}]
06/06/22 12:32:41 zmesdetect_m3[3767] DBG1 detect_sequence.py:654 [perf: Starting for frame:alarm]
06/06/22 12:32:41 zmesdetect_m3[3767] DBG1 detect_sequence.py:664 [Sequence of detection types to execute: ['object', 'face', 'alpr']]
06/06/22 12:32:41 zmesdetect_m3[3767] DBG1 detect_sequence.py:669 [============ Frame: alarm Running object detection type in sequence ==================]
06/06/22 12:32:41 zmesdetect_m3[3767] DBG3 detect_sequence.py:689 [object has a same_model_sequence strategy of first]
06/06/22 12:32:41 zmesdetect_m3[3767] DBG1 detect_sequence.py:701 [--------- Frame:alarm Running variation: #1 -------------]
06/06/22 12:32:41 zmesdetect_m3[3767] DBG2 yolo.py:136 [detect extracted image dimensions as: 800wx450h]
06/06/22 12:32:41 zmesdetect_m3[3767] DBG2 yolo.py:50 [Waiting for pyzm_uid33_gpu_lock portalock...]
06/06/22 12:34:21 zmesdetect_m3[3767] ERR yolo.py:56 [Timeout waiting for pyzm_uid33_gpu_lock portalock for 100 seconds]
06/06/22 12:34:21 zmesdetect_m3[3767] ERR detect_sequence.py:713 [Error running model: Timeout waiting for pyzm_uid33_gpu_lock portalock for 100 seconds]
06/06/22 12:34:21 zmesdetect_m3[3767] DBG2 detect_sequence.py:714 [Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/pyzm/ml/yolo.py", line 51, in acquire_lock
self.lock.acquire()
File "/usr/local/lib/python3.8/dist-packages/portalocker/utils.py", line 428, in acquire
raise exceptions.AlreadyLocked()
portalocker.exceptions.AlreadyLocked
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/pyzm/ml/detect_sequence.py", line 710, in detect_stream
_b,_l,_c,_m = m.detect(image=frame)
File "/usr/local/lib/python3.8/dist-packages/pyzm/ml/object.py", line 65, in detect
b,l,c,_model_names = self.model.detect(image)
File "/usr/local/lib/python3.8/dist-packages/pyzm/ml/yolo.py", line 154, in detect
self.acquire_lock()
File "/usr/local/lib/python3.8/dist-packages/pyzm/ml/yolo.py", line 57, in acquire_lock
raise ValueError ('Timeout waiting for {} portalock for {} seconds'.format(self.lock_name, self.lock_timeout))
ValueError: Timeout waiting for pyzm_uid33_gpu_lock portalock for 100 seconds
]
06/06/22 12:34:21 zmesdetect_m3[3767] DBG2 detect_sequence.py:770 [We did not find any object matches in frame: alarm]
06/06/22 12:34:21 zmesdetect_m3[3767] DBG1 detect_sequence.py:669 [============ Frame: alarm Running face detection type in sequence ==================]
06/06/22 12:34:21 zmesdetect_m3[3767] DBG3 detect_sequence.py:689 [face has a same_model_sequence strategy of union]
06/06/22 12:34:21 zmesdetect_m3[3767] DBG1 detect_sequence.py:701 [--------- Frame:alarm Running variation: #1 -------------]
06/06/22 12:34:21 zmesdetect_m3[3767] DBG1 face_dlib.py:164 [|---------- Dlib Face recognition (input image: 800w*450h) ----------|]
06/06/22 12:34:21 zmesdetect_m3[3767] DBG3 face_dlib.py:174 [Face options={'name': 'DLIB based face recognition', 'enabled': 'yes', 'save_unknown_faces': 'yes', 'save_unknown_faces_leeway_pixels': 100, 'face_detection_framework': 'dlib', 'known_images_path': '/var/lib/zmeventnotification/known_faces', 'unknown_images_path': '/var/lib/zmeventnotification/unknown_faces', 'face_model': 'cnn', 'face_train_model': 'cnn', 'face_recog_dist_threshold': '0.6', 'face_num_jitters': '1', 'face_upsample_times': '1', 'gpu_max_processes': 1, 'gpu_max_lock_wait': 100, 'cpu_max_processes': 3, 'cpu_max_lock_wait': 100, 'max_size': 800, 'disable_locks': 'no'}]
06/06/22 12:34:21 zmesdetect_m3[3767] DBG2 face_dlib.py:120 [pyzm_uid33_gpu_lock portalock already acquired]
06/06/22 12:34:21 zmesdetect_m3[3767] ERR detect_sequence.py:713 [Error running model: Error while calling cudnnConvolutionBiasActivationForward( context(), &alpha1, descriptor(data), data.device(), (const cudnnFilterDescriptor_t)filter_handle, filters.device(), (const cudnnConvolutionDescriptor_t)conv_handle, (cudnnConvolutionFwdAlgo_t)forward_algo, forward_workspace, forward_workspace_size_in_bytes, &alpha2, out_desc, out, descriptor(biases), biases.device(), identity_activation_descriptor(), out_desc, out) in file /tmp/pip-install-ym9mocjo/dlib_0cf25d426edf4e2d9b83ff57f66cc291/dlib/cuda/cudnn_dlibapi.cpp:1237. code: 9, reason: CUDNN_STATUS_NOT_SUPPORTED]
06/06/22 12:34:21 zmesdetect_m3[3767] DBG2 detect_sequence.py:714 [Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/pyzm/ml/detect_sequence.py", line 710, in detect_stream
_b,_l,_c,_m = m.detect(image=frame)
File "/usr/local/lib/python3.8/dist-packages/pyzm/ml/face.py", line 23, in detect
return self.model.detect(image)
File "/usr/local/lib/python3.8/dist-packages/pyzm/ml/face_dlib.py", line 200, in detect
face_locations = face_recognition.face_locations(
File "/usr/local/lib/python3.8/dist-packages/face_recognition/api.py", line 119, in face_locations
return [_trim_css_to_bounds(_rect_to_css(face.rect), img.shape) for face in _raw_face_locations(img, number_of_times_to_upsample, "cnn")]
File "/usr/local/lib/python3.8/dist-packages/face_recognition/api.py", line 103, in _raw_face_locations
return cnn_face_detector(img, number_of_times_to_upsample)
RuntimeError: Error while calling cudnnConvolutionBiasActivationForward( context(), &alpha1, descriptor(data), data.device(), (const cudnnFilterDescriptor_t)filter_handle, filters.device(), (const cudnnConvolutionDescriptor_t)conv_handle, (cudnnConvolutionFwdAlgo_t)forward_algo, forward_workspace, forward_workspace_size_in_bytes, &alpha2, out_desc, out, descriptor(biases), biases.device(), identity_activation_descriptor(), out_desc, out) in file /tmp/pip-install-ym9mocjo/dlib_0cf25d426edf4e2d9b83ff57f66cc291/dlib/cuda/cudnn_dlibapi.cpp:1237. code: 9, reason: CUDNN_STATUS_NOT_SUPPORTED
]
06/06/22 12:34:22 zmesdetect_m3[3767] DBG2 detect_sequence.py:770 [We did not find any face matches in frame: alarm]
06/06/22 12:34:22 zmesdetect_m3[3767] DBG1 detect_sequence.py:669 [============ Frame: alarm Running alpr detection type in sequence ==================]
06/06/22 12:34:22 zmesdetect_m3[3767] DBG2 detect_sequence.py:672 [Making sure we have matched one of ['car', 'motorbike', 'bus', 'truck', 'boat'] in [] before we proceed]
06/06/22 12:34:22 zmesdetect_m3[3767] DBG1 detect_sequence.py:674 [Did not find pre existing labels, not running detection type]
06/06/22 12:34:22 zmesdetect_m3[3767] DBG1 detect_sequence.py:827 [perf: TOTAL detection sequence (with image loads) took: 136954.02 ms to process 67]
06/06/22 12:34:22 zmesdetect_m3[3767] INF zm_detect.py:479 [Prediction string:[s] detected:person:100% truck:97% car:95% ]
06/06/22 12:34:22 zmesdetect_m3[3767] DBG1 zm_detect.py:481 [Prediction string JSON:{"labels": ["person", "truck", "car", "truck", "car", "truck", "truck", "car", "car", "car"], "boxes": [[158, 191, 226, 343], [487, 128, 657, 208], [692, 162, 800, 246], [356, 80, 468, 178], [240, 112, 266, 126], [304, 110, 354, 136], [100, 154, 172, 204], [50, 169, 118, 225], [76, 132, 124, 152], [482, 105, 582, 143]], "frame_id": "snapshot", "confidences": [0.9962076544761658, 0.9686015248298645, 0.9479638338088989, 0.8829721212387085, 0.7836911678314209, 0.7024609446525574, 0.5856097340583801, 0.5569575428962708, 0.36235204339027405, 0.3431270122528076], "image_dimensions": {"original": [1080, 1920], "resized": [450, 800]}}]
[s] detected:person:100% truck:97% car:95% --SPLIT--{"labels": ["person", "truck", "car", "truck", "car", "truck", "truck", "car", "car", "car"], "boxes": [[158, 191, 226, 343], [487, 128, 657, 208], [692, 162, 800, 246], [356, 80, 468, 178], [240, 112, 266, 126], [304, 110, 354, 136], [100, 154, 172, 204], [50, 169, 118, 225], [76, 132, 124, 152], [482, 105, 582, 143]], "frame_id": "snapshot", "confidences": [0.9962076544761658, 0.9686015248298645, 0.9479638338088989, 0.8829721212387085, 0.7836911678314209, 0.7024609446525574, 0.5856097340583801, 0.5569575428962708, 0.36235204339027405, 0.3431270122528076], "image_dimensions": {"original": [1080, 1920], "resized": [450, 800]}}
06/06/22 12:34:22 zmesdetect_m3[3767] DBG1 zm_detect.py:557 [Closing logs]
Re: Looking for a zmes installation Feat GPU support
Looks quite good.
You need to train at least a face to remove errors and also you have some Cuda errors.
You need to train at least a face to remove errors and also you have some Cuda errors.
-
Re: Looking for a zmes installation Feat GPU support
I have tried to train faces this morning and now this is what is happening:
Code: Select all
sudo -u www-data /var/lib/zmeventnotification/bin/zm_train_faces.py
06/07/22 10:20:42 zm_train_faces[9696] INF ZMLog.py:292 [Setting up signal handler for logs]
06/07/22 10:20:42 zm_train_faces[9696] INF ZMLog.py:301 [Switching global logger to ZMLog]
/usr/local/lib/python3.8/dist-packages/numpy/core/getlimits.py:499: UserWarning: The value of the smallest subnormal for <class 'numpy.float64'> type is zero.
setattr(self, word, getattr(machar, word).flat[0])
/usr/local/lib/python3.8/dist-packages/numpy/core/getlimits.py:89: UserWarning: The value of the smallest subnormal for <class 'numpy.float64'> type is zero.
return self._float_to_str(self.smallest_subnormal)
/usr/local/lib/python3.8/dist-packages/numpy/core/getlimits.py:499: UserWarning: The value of the smallest subnormal for <class 'numpy.float32'> type is zero.
setattr(self, word, getattr(machar, word).flat[0])
/usr/local/lib/python3.8/dist-packages/numpy/core/getlimits.py:89: UserWarning: The value of the smallest subnormal for <class 'numpy.float32'> type is zero.
return self._float_to_str(self.smallest_subnormal)
06/07/22 10:20:48 zm_train_faces[9696] INF utils.py:405 [Reading config from: /etc/zm/objectconfig.ini]
06/07/22 10:20:48 zm_train_faces[9696] INF utils.py:410 [Reading secrets from: /etc/zm/secrets.ini]
06/07/22 10:20:48 zm_train_faces[9696] DBG1 utils.py:445 [allowing self-signed certs to work...]
06/07/22 10:20:48 zm_train_faces[9696] INF utils.py:510 [Ignoring monitor specific settings, as you did not provide a monitor id]
06/07/22 10:20:48 zm_train_faces[9696] DBG1 face_train_dlib.py:57 [Shane is a directory. Processing all images inside it]
06/07/22 10:20:48 zm_train_faces[9696] DBG1 face_train_dlib.py:63 [loading face from Shane/1.jpg]
06/07/22 10:20:48 zm_train_faces[9696] DBG1 face_train_dlib.py:75 [resizing to 800]
06/07/22 10:20:49 zm_train_faces[9696] ERR face_train_dlib.py:128 [Error initializing face recognition: Error while calling cudnnConvolutionBiasActivationForward( context(), &alpha1, descriptor(data), data.device(), (const cudnnFilterDescriptor_t)filter_handle, filters.device(), (const cudnnConvolutionDescriptor_t)conv_handle, (cudnnConvolutionFwdAlgo_t)forward_algo, forward_workspace, forward_workspace_size_in_bytes, &alpha2, out_desc, out, descriptor(biases), biases.device(), identity_activation_descriptor(), out_desc, out) in file /tmp/pip-install-ym9mocjo/dlib_0cf25d426edf4e2d9b83ff57f66cc291/dlib/cuda/cudnn_dlibapi.cpp:1237. code: 9, reason: CUDNN_STATUS_NOT_SUPPORTED]
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/pyzm/ml/face_train_dlib.py", line 81, in train
face_locations = face_recognition.face_locations(
File "/usr/local/lib/python3.8/dist-packages/face_recognition/api.py", line 119, in face_locations
return [_trim_css_to_bounds(_rect_to_css(face.rect), img.shape) for face in _raw_face_locations(img, number_of_times_to_upsample, "cnn")]
File "/usr/local/lib/python3.8/dist-packages/face_recognition/api.py", line 103, in _raw_face_locations
return cnn_face_detector(img, number_of_times_to_upsample)
RuntimeError: Error while calling cudnnConvolutionBiasActivationForward( context(), &alpha1, descriptor(data), data.device(), (const cudnnFilterDescriptor_t)filter_handle, filters.device(), (const cudnnConvolutionDescriptor_t)conv_handle, (cudnnConvolutionFwdAlgo_t)forward_algo, forward_workspace, forward_workspace_size_in_bytes, &alpha2, out_desc, out, descriptor(biases), biases.device(), identity_activation_descriptor(), out_desc, out) in file /tmp/pip-install-ym9mocjo/dlib_0cf25d426edf4e2d9b83ff57f66cc291/dlib/cuda/cudnn_dlibapi.cpp:1237. code: 9, reason: CUDNN_STATUS_NOT_SUPPORTED
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/var/lib/zmeventnotification/bin/zm_train_faces.py", line 33, in <module>
train.FaceTrain(options=g.config).train(size=args['size'])
File "/usr/local/lib/python3.8/dist-packages/pyzm/ml/face_train_dlib.py", line 129, in train
raise ValueError(
ValueError: Error opening known faces directory. Is the path correct?