ZM Event Server & Ubuntu22.04

Discussions related to the 1.36.x series of ZoneMinder
Post Reply
Sparal
Posts: 6
Joined: Wed Nov 25, 2020 3:00 pm

ZM Event Server & Ubuntu22.04

Post by Sparal »

Dears,

I'm using Zoneminder since a while, but the Ubuntu update to 22.04 had a couple of consequences. I had to reinstall the entire ZM + Eventnotification.

I run on Ubuntu 22.04.
ZM: version 1.36.33 / "apiversion":"2.0"
zmeventnotification last stable version v6.1.27.
Python 3.10.6
openCV version '4.7.0'

Everything runs fine (zm interface works, zmeventnotification seems to be running), but I cannot get the detection working properly. By testing the object recognition with:

Code: Select all

sudo -u www-data /var/lib/zmeventnotification/bin/zm_event_start.sh 1508
I get no answer at all.
Only the zmesdetect.log give me an hint:
04/05/23 15:48:14 zmesdetect[1878087] ERR detect_sequence.py:713 [Error running model: invalid index to scalar variable.]
04/05/23 15:48:16 zmesdetect[1878087] ERR face_dlib.py:110 [Error loading KNN model: No module named 'sklearn.neighbors._dist_metrics']
04/05/23 15:48:19 zmesdetect[1878087] ERR detect_sequence.py:713 [Error running model: invalid index to scalar variable.]

I'm searching since a couple of days the issue, found some forums related to the yolo.py, but nothing helped.

Does one of you have an idea?

Best regards

Alex
User avatar
burger
Posts: 443
Joined: Mon May 11, 2020 4:32 pm

Re: ZM Event Server & Ubuntu22.04

Post by burger »

I just installed zmes on debian bullseye a week or so ago, and didn't have any trouble.
zmes 6.1.28.
opencv 4.7.0
python 3.9.2
Did you install opencv from source?

Did you change the python script for yolo per:
viewtopic.php?p=129104
That is required for opencv to work, which looks like the error you are getting, I think.

Also a better debugging command is something like (adjust event / monitor id as needed):

Code: Select all

sudo -u www-data /var/lib/zmeventnotification/bin/zm_detect.py --config /etc/zm/objectconfig.ini  --eventid 2 --monitorid 1 --debug
What does that output?

As general advice, you are typically going to have an easier time with debian vs. ubuntu for zm. Especially ubuntu short releases. There's always problems with ubuntu / zm that appear from time to time.
fastest way to test streams:
ffmpeg -i rtsp://<user>:<pass>@<ipaddress>:554/path ./output.mp4 (if terminal only)
ffplay rtsp://<user>:<pass>@<ipaddress>:554/path (gui)
find paths on ispydb or in zm hcl

If you are new to security software, read:
https://wiki.zoneminder.com/Dummies_Guide
Magic919
Posts: 1381
Joined: Wed Sep 18, 2013 6:56 am

Re: ZM Event Server & Ubuntu22.04

Post by Magic919 »

I thought Python 3.10 was a problem for running ZMES.
-
Sparal
Posts: 6
Joined: Wed Nov 25, 2020 3:00 pm

Re: ZM Event Server & Ubuntu22.04

Post by Sparal »

@Burger: I have now updated yolo.py with the one you have proposed and now it works. Thanks so much! I have tried with this version: viewtopic.php?t=31902
and I got the results that I have reported.

@Magic919: It seems now that the Python version 3.10 is running...will see later how stable it is.

Concerning Ubuntu I have all running on it right now, and apart from the recent update that I have done without so much care, I'm quite happy about it.

Anyway thank a lot!

Alex
User avatar
iconnor
Posts: 3266
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: ZM Event Server & Ubuntu22.04

Post by iconnor »

There was a fix, and I recently merged it, but havn't made a formal release.

See https://github.com/ZoneMinder/pyzm/comm ... 4c7e72ea4w

You need to replace your your yolo.py whereever it is on your system. If you google this error you will find discussion about it and how to find it on your system.

I've been using ZMES more myself lately and finding all kinds of issues, so hopefully things will get better. Also @baudneo is making progress on his version.
Sparal
Posts: 6
Joined: Wed Nov 25, 2020 3:00 pm

Re: ZM Event Server & Ubuntu22.04

Post by Sparal »

@iconnor: I get a 404 on your link.

I found also a lot (too much) different discussion on this topic, yolo.py beeing in the centre of the trouble.I ended up making modifications myself, what didn't turn successful of course. Seems a change in the opevCV lib is the root cause...but I'm far to understand it completely.

Cheers!
Magic919
Posts: 1381
Joined: Wed Sep 18, 2013 6:56 am

Re: ZM Event Server & Ubuntu22.04

Post by Magic919 »

-
Sparal
Posts: 6
Joined: Wed Nov 25, 2020 3:00 pm

Re: ZM Event Server & Ubuntu22.04

Post by Sparal »

Seems to work fine also.

First time I asked a questions on this forum, and I get so much help so quickly. Fantastic community! :D
User avatar
biologisch
Posts: 96
Joined: Fri Aug 24, 2007 10:37 am

Re: ZM Event Server & Ubuntu22.04

Post by biologisch »

Hello @all!
I got this error

04/26/23 16:25:50 zmesdetect_m5[54193] ERR face_dlib.py:110 [Error loading KNN model: No module named 'sklearn.neighbors._dist_metrics']


Is it the same like the yolo.py?
ZM Versions = 1.36.33
zmeventnotification Version = "6.1.28"
Post Reply