zmeventnotification server object detection image labeling missing

Discussion topics related to mobile applications and ZoneMinder Event Server (including machine learning)
Post Reply
beatles1235
Posts: 2
Joined: Sun Sep 19, 2021 1:46 pm

zmeventnotification server object detection image labeling missing

Post by beatles1235 »

I'm not quite sure if I worded this question correctly, I've been searching all over but I haven't quite found anyone else with this issue though.

What I'm looking to resolve is most of my object detections seem to be working excellent, but what I haven't quite understood is retrieving the object detection image from zoneminder and zmninja.

This looks great, and I'd like to have a labeled image I can have sent to me in my push notifications in zmninja.
Example:
ObjectDetectionLabeled.PNG
ObjectDetectionLabeled.PNG (848.67 KiB) Viewed 8723 times
With my next event (below), it detected person, but zoneminder has this as a GIF, and I don't have the same outlines and label of the object of the first image (which is just a picture)
ObjectDetectionNotLabeled_LI.jpg
ObjectDetectionNotLabeled_LI.jpg (849.69 KiB) Viewed 8723 times
Is this just an issue with zoneminder? or am I doing something incorrectly in my configuration. Ideally, I don't really care about the mp4/GIF for my push notification on zmninja since I have Android (can't see it).

In this case, the first picture's eventID is 6871, so when I go to the URL:
https://hostname/zm/index.php?view=imag ... &width=600

I get the first picture in this post.

But when I go to (the second image):
https://hostname/zm/index.php?view=imag ... &width=600

It's a GIF with no labeling, and since I have android I don't receive this picture since it's a GIF/MP4

I tried to replace objdetect with objdetect_image, but I just get a blank page.

Logs on ZM show:

"No Frame found for event(6870) and frame id(objdetect_image)"

If this is a ZM issue, I'm on the latest (probably buggy) 1.37.1, so let me know if I should just uninstall and downgrade.
User avatar
asker
Posts: 1553
Joined: Sun Mar 01, 2015 12:12 pm

Re: zmeventnotification server object detection image labeling missing

Post by asker »

Always look at logs. Hope you've read the debugging section of the ES/ML docs and have configured debug logs. In this case, your zm_detect logs will give you a lot of hints on what may be happening.

Given I don't know what your logs are saying, here is a guess about what is probably happening:
1. You have GIF animation enabled
2. For some reason (that you'll find out when you look at your logs) your first event did not create a GIF while your second event did
3. When you do "fid=objdetect", ZM first looks for a GIF. If it finds it, it will return the GIF. If not, it will look for JPEG. So for the first, it did not find GIF, so it returned the image. For the second it found the GIF. When you change it to fid=objdetect_jpg, it will _always_ return the jpg

So:
a) Turn off GIF generation (create_animation=no) in your objconfig.ini. This should take care of it and you should get what you want
b) Change your picture URL to

Code: Select all

https://portal/zm/index.php?view=image&eid=EVENTID&fid=objdetect_jpg&width=600 
(to force jpeg images, but a) should be all you need)


If you don't care about GIFs, don't waste your CPU creating them.
I no longer work on zmNinja, zmeventnotification, pyzm or mlapi. I may respond on occasion based on my available time/interest.

Please read before posting:
How to set up logging properly
How to troubleshoot and report - ES
How to troubleshoot and report - zmNinja
ES docs
zmNinja docs
beatles1235
Posts: 2
Joined: Sun Sep 19, 2021 1:46 pm

Re: zmeventnotification server object detection image labeling missing

Post by beatles1235 »

That fixed my issues, thank you! I don't believe I have debugging enabled on the ES, so I'll enable them and take a look at what the logs are saying.

Thanks again!
Post Reply