Page 1 of 1

ZM Event Server & Ubuntu22.04

Posted: Wed Apr 05, 2023 2:18 pm
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

Re: ZM Event Server & Ubuntu22.04

Posted: Wed Apr 05, 2023 5:04 pm
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.

Re: ZM Event Server & Ubuntu22.04

Posted: Wed Apr 05, 2023 6:45 pm
by Magic919
I thought Python 3.10 was a problem for running ZMES.

Re: ZM Event Server & Ubuntu22.04

Posted: Wed Apr 05, 2023 9:32 pm
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

Re: ZM Event Server & Ubuntu22.04

Posted: Wed Apr 05, 2023 9:38 pm
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.

Re: ZM Event Server & Ubuntu22.04

Posted: Thu Apr 06, 2023 8:29 am
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!

Re: ZM Event Server & Ubuntu22.04

Posted: Thu Apr 06, 2023 8:45 am
by Magic919

Re: ZM Event Server & Ubuntu22.04

Posted: Fri Apr 07, 2023 8:41 am
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

Re: ZM Event Server & Ubuntu22.04

Posted: Wed Apr 26, 2023 2:30 pm
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?