neo-ZMES - Public Beta

Discussion topics related to mobile applications and ZoneMinder Event Server (including machine learning)
tsp84
Posts: 227
Joined: Thu Dec 24, 2020 4:04 am

Re: neo-ZMES - Public Beta

Post by tsp84 »

Some exciting news, the new 1.35.7 release added a new 'event start' and 'event end' script execution (set it up in the 'source' modal i.e. where you setup the monitors 'analysis fps' and 'stporage'), this means things will be even faster and the ZMEventnotification.pl script does not need scan the SHM for events.

I am just testing with automating everything, currently the ZM API does not return the scripts value from the DB or let you write to the DB for setting the scripts so I am using SQLAlchemy to interface with the ZM DB to test things out.
juan11perez
Posts: 64
Joined: Tue Apr 27, 2021 3:41 am

Re: neo-ZMES - Public Beta

Post by juan11perez »

Good day, apologies for the delay.
currently moving house, so my setup is in pieces :)
As with the "standard" zmes, i'd like to be able to pull camera, object (person, dog), confidence level, face (recognition), confidence.

Thank you
tsp84
Posts: 227
Joined: Thu Dec 24, 2020 4:04 am

Re: neo-ZMES - Public Beta

Post by tsp84 »

I pushed an update for pyzm that will add another topic to subscribe to. Currently it's

zmes/picture/<mid> for jpeg/gif
zmes/data/<mid> for camera and event info

And now there is ->
zmes/rdata/<mid> that sends labels, bbox, conf and model

Code: Select all

11/30/21 22:44:35.487027 zmesdetect_m1[16760] DBG2 mqtt:292 [mqtt:publish: sending -> topic: 'zmes/picture/1'  data: '<serialized bytearray>'  size: 2.77 MB]
11/30/21 22:44:35.492501 zmesdetect_m1[16760] DBG2 mqtt:290 [mqtt:publish: sending -> topic: 'zmes/data/1' data: {"eid": "46513", "mid": 1, "name": "Front", "reason": "[150] :detected:person(99%-yolo[GPU])", "zone": "Front - Substream", "cause": "Linked", "type": "start", "start_time": "2021-11-10 16:53:33", "past_event": true}]
11/30/21 22:44:35.494418 zmesdetect_m1[16760] DBG2 mqtt:290 [mqtt:publish: sending -> topic: 'zmes/rdata/1' data: {"labels": ["person"], "conf": [0.9920536875724792], "bbox": [[2956, 990, 3518, 1870]], "models": ["yolo[gpu]"]}]
Quantum
Posts: 121
Joined: Fri Mar 25, 2011 3:34 pm

Re: neo-ZMES - Public Beta

Post by Quantum »

Hi tsp84. After reading this whole thread, I am surprised and pleased to find the optimizations and improvements you've made to ES. Many thanks, and thanks to Juan for helping sort things out. I guess most users got discouraged by the difficulties and unknowns of the legacy ES.

I want to install neoES. I've renamed the legacy ES files in /etc/zm/ and /var/lib/zmeventnotification to *.old. Is there anything else that needs to be done to tear out the old ES? Or should I start from scratch with a new virtual machine?
Quantum
Posts: 121
Joined: Fri Mar 25, 2011 3:34 pm

Re: neo-ZMES - Public Beta

Post by Quantum »

On https://medium.com/@baudneo/install-zon ... a339aaa307

Code: Select all

# es.debug.objdet 4781
Traceback (most recent call last):
  File "/var/lib/zmeventnotification/bin/zm_detect.py", line 36, in <module>
    import pyzm.helpers.new_yaml
ModuleNotFoundError: No module named 'pyzm.helpers.new_yaml'

# locate pyzm.helpers.new_yaml
#

# lsd -al /usr/local/lib/python3.10/site-packages/pyzm/helpers/
/usr/local/lib/python3.10/site-packages/pyzm/helpers/Zone.py
/usr/local/lib/python3.10/site-packages/pyzm/helpers/Zones.py
/usr/local/lib/python3.10/site-packages/pyzm/helpers/__pycache__
/usr/local/lib/python3.10/site-packages/pyzm/helpers/mlapi_db.py
/usr/local/lib/python3.10/site-packages/pyzm/helpers/mqtt.py
/usr/local/lib/python3.10/site-packages/pyzm/helpers/pyzm_utils.py
/usr/local/lib/python3.10/site-packages/pyzm/helpers/__pycache__/Zone.cpython-310.pyc
/usr/local/lib/python3.10/site-packages/pyzm/helpers/__pycache__/Zones.cpython-310.pyc
/usr/local/lib/python3.10/site-packages/pyzm/helpers/__pycache__/mlapi_db.cpython-310.pyc
/usr/local/lib/python3.10/site-packages/pyzm/helpers/__pycache__/mqtt.cpython-310.pyc
/usr/local/lib/python3.10/site-packages/pyzm/helpers/__pycache__/pyzm_utils.cpython-310.pyc
It's right. No pyzm.helpers.new_yaml . And I don't get any bounding boxes.

In /var/log/zmeventnotification.log I get a fatal error:
FAT [main:449] [SSL is enabled, but key or certificate file is missing]

That's odd, because in /etc/zm/zmeventnotification.yml I have:

Code: Select all

ssl:
  # Enable SSL [Default: yes]
  enable: no
It's disobeying me.


Looks like this promising project is dead too. As baudneo says, "Nothing to see here." I wish he'd made that clearer that applies to the project. I guess he lost control of it.

Lost another week. No soup for me.
tsp84
Posts: 227
Joined: Thu Dec 24, 2020 4:04 am

Re: neo-ZMES - Public Beta

Post by tsp84 »

? Repos are up and new versions are being worked on all the time.

The instructions should still be fairly relevant. There is also a docker image that hosts neo mlapi and has GPU and TPU lobs installed. The evertserver docker image has zoneminder+neo zmes installed that pairs with the mlapi docker image.

You can still install directly onto the host as well. Let me know if you need help installing and configuring.

Https://GitHub.com/baudneo
Noahe
Posts: 3
Joined: Fri Aug 21, 2020 5:13 pm

Re: neo-ZMES - Public Beta

Post by Noahe »

I've been using ZM since July 2020 when my sister-in-law gave me an old HP desktop with a Core i7-860, 4 cores, 8 threads at 2.8-3.46 GHz (Circa 2009). I love ZM.

Shortly thereafter I bought zmNinja-pro App for my iPhone, and I'll admit it took me awhile to figure out ES and get my dynamic-IP service a SSL certificate. ZM+ES is even more fantastic.

A couple months ago I trash-picked a Dell desktop with a Core i7-3770, 4-cores, 8 threads at 3.4-3.9 GHz (Circa 2012) and since it's quite a bit faster, thought I'd give hooks+MLAPI a try. I'll be honest, this took me months on and off to figure out. ZM+ES+hooks+MLAPI is epic.

https://imgur.com/gallery/s8z7QiJ

I've now gone one further and purchased myself an $8/year domain name (nothing catchy). I use subdomains for my home services and a NGINX reverse proxy to send it to the right box. e.g.:

homeassistant.example.ca
cctv.example.ca (for ZM)
www. example.ca

In my excitement, I set-up the biggest CPU load at the time (ZM) on the newer, faster, trash-picked Dell.

My setup currently has the 2012 machine doing ZM+ES on ubuntu server at about a 75% system load. It can't really manage to do this AND object detection, despite only using about 15% (on average) from the older 2009 HP.

The older 2009 machine is now doing NGINX, SQUID, OpenVPN (all Dockerized) and MLAPI (not Dockerized, couldn't figure it out) at about a 15% system load.

I'm just learning as I go, and could use a few tips from the more experienced.

1. why do the event bounding boxes sometimes not get put around the object when the object is moving? Processing lag?

2. what cheap used GPU offers worthwhile decent compatible acceleration? The two I have are junk. An nVidia Geforce GTX 260 and an ATI Radeon HD 7350. The Google Coral TPU's are backordered like 80 weeks now in Canada.

3. I can't seem to start

Code: Select all

python3 ./mlapi.py -c mlapiconfig.ini
as me. I can only fire it with sudo or after running sudo -i. But more to the point, I thought systemctl processes ran as root anyway. Anyway, that's my problem, I can run it manually, but I can't get the

Code: Select all

mlapi.service
to run. I get the following error:

Code: Select all

Traceback (most recent call last):
  File "./mlapi.py", line 3, in <module>
    from flask import Flask, send_file, request, jsonify, render_template
  File "/home/me/.local/lib/python3.8/site-packages/flask/__init__.py", line 14, in <module>
    from jinja2 import escape
  File "/usr/lib/python3/dist-packages/jinja2/__init__.py", line 33, in <module>
    from jinja2.environment import Environment, Template
  File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 15, in <module>
    from jinja2 import nodes
  File "/usr/lib/python3/dist-packages/jinja2/nodes.py", line 23, in <module>
    from jinja2.utils import Markup
  File "/usr/lib/python3/dist-packages/jinja2/utils.py", line 656, in <module>
    from markupsafe import Markup, escape, soft_unicode
ImportError: cannot import name 'soft_unicode' from 'markupsafe' (/home/noah/.local/lib/python3.8/site-packages/markupsafe/__init__.py)
I'm running the right version of everything in the requirements.txt file. I'm thinking it's a permissions issue, or install location. I probably installed everything under sudo -i instead of issuing individual sudo commands. Is that a problem? It does work. It just won't run automatically.

4. My detection times are understandably slow without GPU or TPU acceleration. What are people's best strategies to speed things up? I'm thinking disable face-detection for now, along with dialing-in motion events and probably also detection area. I increased the allowed CPU count, but the utilization didn't increase, I can't figure out why.

I'm well appreciative of any guidance or tips you can offer.

Thanks!
User avatar
iconnor
Posts: 3197
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: neo-ZMES - Public Beta

Post by iconnor »

You may get faster responses from the slack channel. All the major players in the ES/ML space generally hang out there.

I think nvidia 1080 or better is where you want to be for gpu.

In 1.37.* we have the ability to run commands on event start/stop, so ES isn't really even needed anymore. Might be something you want to investigate.

Also in 1.37 there are a bunch of options for reducing cpu use.

Anyways, would definitely like to chat more with you and get you involved in improving and documenting all these setup details.

Isaac
arndt
Posts: 1
Joined: Thu Jul 23, 2020 9:15 pm
Location: Ludigsburg
Contact:

Re: neo-ZMES - Public Beta

Post by arndt »

Hi everyone,

Does anyone know where these repos have gone?

https://github.com/baudneo/pyzm.git
https://github.com/baudneo/zmeventnotification.git
https://github.com/baudneo/mlapi.git

With some effort I managed to get everything working. And everything went great for one years. Now I wanted to install the whole thing again on a new computer with a larger graphics card. And now they're gone.

I would be very grateful for any tips
User avatar
iconnor
Posts: 3197
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: neo-ZMES - Public Beta

Post by iconnor »

@baudneo has decided to remove them. Without speaking for him, we understand that he feels unappreciated. We were not able to get funding for his efforts, or support him in time. Working in open source is often thankless and draining.

We respect his decision, although we hope he will come back after a rest.

While various people, including the other ZM devs are in possession of a copy of this code, until we have his blessing to make it available, we will not do so. Others who have it may do as they wish of course, to the limits of the license it was released under.

For now, either copy what you've got, or use the original ZMES.
Magic919
Posts: 1381
Joined: Wed Sep 18, 2013 6:56 am

Re: neo-ZMES - Public Beta

Post by Magic919 »

It’s a shame if that’s where we are.

I followed Asker long the ZMES path and it breathed some welcome life into my ZM setup. With object recognition, Pushover and ZMNinja I got what I needed.

I didn’t quite keep up with Baudneo and his revival/development, but it looked exciting and interesting. I wish him good luck for the future.

Feels like the end of something.
-
Post Reply