zmeventnotification no bbox image

Forum for questions and support relating to the 1.34.x releases only.
Post Reply
fritz74
Posts: 2
Joined: Sun May 31, 2020 1:41 pm

zmeventnotification no bbox image

Post by fritz74 » Sun May 31, 2020 2:07 pm

Hi,
I'm running zoneminder 1.34.15 on an odroid n2.
To fit it into my smarthome I added the zmeventnotification server 5.14 with hooks enabled.
Unfortunately I have a problem which I'm not able to solve by myself.
ZMEvent detects alarms and writes two images (EID-alarm / snapshot.jpg) to /var/lib/zmeventnotification/images.
But altough you can see persons on the pictures, it won't create an "bbox" image.
Also there is no notice (e.g. (a) 96% person) on the zoneminder event site.

To find a hint to the reason, I took a few of those "alarm"-pictures and start the zm_detect.py script manual, to see whether they are correct classified.
(I copied the image to my project-folder)

Code: Select all

odroid@odroid:/var/lib/zmeventnotification/bin$ sudo python3 zm_detect.py -c /etc/zm/objectconfig.ini -f /home/odroid/Projekte/9857-snapshot.jpg 
[a] detected:person:96% --SPLIT--[{"type": "object", "label": "person", "box": [1122, 298, 1198, 496], "confidence": "96.04%"}]
So the person would be perfectly recognized, but no "bbox" image will be created.
Perhaps it's because of the following problem which I don't understand.
If I test the same event with the zm_event_start.sh script, I get the following error.

Code: Select all

odroid@odroid:/var/lib/zmeventnotification/bin$ sudo -u www-data /var/lib/zmeventnotification/bin/zm_event_start.sh 9857 1
Traceback (most recent call last):
  File "/var/lib/zmeventnotification/bin/zm_detect.py", line 658, in <module>
    bbox, label, conf, args.get('monitorid'))
  File "/usr/local/lib/python3.6/dist-packages/zmes_hook_helpers/image_manip.py", line 167, in processPastDetection
    saved_bs = pickle.load(fh)
EOFError: Ran out of input
Perhaps someone can give me a hint, whats wrong or where I can look further.
Thanks in advance, greetings from germany and moreover thanks for the great work!!!

Fritz
objectconfig.ini
(861 Bytes) Downloaded 13 times
zmeventnotification.ini
(1.36 KiB) Downloaded 13 times

User avatar
asker
Posts: 1297
Joined: Sun Mar 01, 2015 12:12 pm

Re: zmeventnotification no bbox image

Post by asker » Sun May 31, 2020 5:27 pm

I think the key issue was in past detections, I was not closing the file handle properly to flush the write, and if detections happened close to each other, this error would occur.

Please stop the ES, pull ES master and update using

Code: Select all

sudo -H ./install.sh --install-hook --install-es --no-install-config --no-interactive
Then restart ES
--
My collection of ZoneMinder learnings:
https://wiki.zoneminder.com/Various_ZM_thoughts

fritz74
Posts: 2
Joined: Sun May 31, 2020 1:41 pm

Re: zmeventnotification no bbox image

Post by fritz74 » Sun May 31, 2020 6:40 pm

Thank you very much for your help.
I did it as you suggested and now everything works like a charm.
:D :D :D
Have a nice day/evening

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests