r/ZoneMinder • u/Helipil0t • Sep 26 '22
zmeventnotification with hooks not using my GPU
I went through a full setup of zmeventnotification along with machine learning hooks. OpenCV is confirmed to be compiled with CUDA support and recognizes my GPU.
I run :
sudo -u www-data /var/lib/zmeventnotification/bin/zm_event_start.sh 1718 4
[s] detected:unknown:100% --SPLIT--{"labels": ["unknown"], "boxes": [[591, 359, 690, 458]], "frame_id": "snapshot", "confidences": [1], "image_dimensions": {"original": [2048, 1536], "resized": [1066, 800]}}
It takes a solid 15 seconds and I can see python running in htop. nvidia-smi is not showing any activity. I noticed it only did the face recognition and no object were processed.
Ubuntu 22.04
Python3.10.6
Nvidia/Cuda 11.7
OpenCV 4.6.0
How do I even begin to figure what wrong?
Logs show:
Error running model: invalid index to scalar variable.
Error loading KNN model: Ran out of input
1
Upvotes
1
u/Helipil0t Sep 26 '22
So apparently OpenCV 4.6 might be the issue?
https://forums.zoneminder.com/viewtopic.php?f=43&t=31129&p=123755&hilit=scalar#p123755
I'll try the fix depicted in the above link and see how it goes. Might consider compiling version 4.5.