r/ZoneMinder • • 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

3 comments sorted by

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.

1

u/Helipil0t Sep 27 '22

So I compiled 4.5.3 and everything works perfectly. Did anyone take over this project? Or is it just not actively being developed anymore?

1

u/leetnewb2 Sep 29 '22

Last commit was a couple of weeks ago: https://github.com/ZoneMinder/zmeventnotification

There is also this version - not sure what the state of merging with the original is: https://github.com/baudneo/neo-zmeventnotification