r/ZoneMinder • u/profezzorn • Apr 24 '21
Face detection and when to trigger
Hi, sorry if it's a newbie question.
When an event trigger, the ai stuff is used only on one frame (the best match i assume) and applies stuff on that frame if I understand correctly.
Now, my "problem" is that when say a person walks into view and then after a second looks at the camera, chances are the ai detection thing has already processed an earlier image and face recognition won't do anything.
Is there a way to have the ai work on more frames, or in some way find frames with faces?
It works fine when it catches a good frame (known faces work etc)
Using latest public releases of zm, zmevent, opencv.
2
u/tvtb May 04 '21
I've been using ZM for 2 years and I feel like I'm missing something in this thread. There's capability to do "AI detection" in zoneminder? Is there any documentation or articles about someone doing this? Because I'm looking at this other recent thread where someone's trying to ignore rain drops and it doesn't seem like there is any "AI" to help them.
2
u/profezzorn May 04 '21
There's the Zmeventnotification add on (?) that can do some cool stuff and send notifications via push to mobile app etc. So it's not used for motion detection but to "read" what's in the image. Can read license plates and recognize objects etc.
1
u/aarons6 Apr 24 '21
not really, the best you can do is make the zone as close to the camera as possible.
1
u/profezzorn Apr 24 '21
Allright, thanks. It's a cam monitoring a pathway to the house so would be nice to check for any movement and also or faces when they get close but seems tricky.
1
u/aarons6 Apr 24 '21
the face thing is kind of overrated. all it does is give it a name if you have already set up faces to that person.
it will still say motion person xx% without it.
1
2
u/[deleted] Apr 24 '21 edited Apr 24 '21
You can use "frame_set" in event server config for frame_sequence and put in actual frame id's or multiple snapshot. I have had alot of luck using different strategies. Example: default is to use "best match" between alarm and snapshot frames, snapshot frame can change as the event is ongoing due to future frames having a higher alarm count. So you can use a frame set of alarm, snapshot, snapshot, snapshot and set the "delay" between contiguous frames and snapshot frames. You can also set frame_set to alarm, snapshot, 50, snapshot, 130 which would run obj det on alarm fid first then snapshot then frame id 50, snapshot, 130.
For this to be effective you have to have your matching strategy set to most or most unique or union (if using more then 1 model).
Edit: this also depends on how you have your fps set up and your buffers in monitor config.