Page 1 of 1

Multiple image analysis from one event?

Posted: Fri Nov 01, 2024 12:18 pm
by BaconButty
Hi All,

I was wondering if there was a way to do this already built in, or even if I could someone fire off multiple events with different image locations manually.

Basically I've spent about a year tweaking the the exact time the image used for ML analysis is taken and it's impossible to get it right. Like at night, a motion sensor light can activate the alarm, and the image used will be before the person comes into view. Soloution is to extend the delay, but during the day, that delay will be too long. Just a simple example.

What I would love to do is be able to set it so that it say, does 3 images, at 2 second intervals, and picks the first one where a relevant match is found. Is that possible?

If not, could I write say an intermediate python script or something to launch three instances with different image sampling times, or would that just break everything?

Thanks for reading!

Re: Multiple image analysis from one event?

Posted: Fri Nov 01, 2024 4:00 pm
by iconnor
I would have thought that frame_id=bestmatch mode would do what you want...

You have the code so you can make it do whatever you want.

Re: Multiple image analysis from one event?

Posted: Fri Nov 01, 2024 10:19 pm
by BaconButty
Cheers for the reply.

So I take it I'm basically on my own if I want to try and do what I said (which is fine, I can give it a go).

Thanks for the heads up on "frame_id=bestmatch". If I'm reading this right, this will cause the detection script to analyse two frames, which I might be able to conjigger into some values that give me enough variance to try two sections of the clip.

I'm just not getting this bit fully.
The detection scripts DO NOT analyze all frames recorded so far. That would take too long (well,
not if you have a powerful GPU). It only analyzes two frames at most, depending on your frame_id
value in objectconfig.ini. Those two frames are snapshot and alarm, assuming you set
frame_id=bestmatch
• snapshot is the frame that has the highest score. It is very possible this frame changes after the detection
is done, because it is entirely possible that another frame with a higher score is recorded by ZM as the event
proceeds
How can it have a snapshot and alarm frame, if snapshot is the only selected after the algorithm is done?

EDIT: It was already set for best match unfortunately.

Re: Multiple image analysis from one event?

Posted: Fri Nov 01, 2024 10:58 pm
by iconnor
You can also take a look at @baudneo's version called zomi.

https://github.com/baudneo/zomi-client/
https://github.com/baudneo/zomi-server/

He takes a different approach, more like what you want to do.

You may want to follow my branch at https://github.com/connortechnology/zomi-client as he is taking a break and I've fixed a couple things in my rough-in-tags branch.

Re: Multiple image analysis from one event?

Posted: Sat Nov 02, 2024 2:42 am
by BaconButty
Looking at example_client.yml that's *exactly* what I want to do!

I'm just a bit of a disaster at setting this stuff up in general, and I'm a bit dodgy about trying something that's only in an Alpha state. I might give it a go next weekend, that's for the link though, I really like the look of Zomi!

If I do go to try it, do I have to do anything with regards to removing the current ML stuff? Or will the Zomi install just link itself in and remove that itself?

Re: Multiple image analysis from one event?

Posted: Sun Nov 03, 2024 9:18 pm
by iconnor
They can co-exist. you can just turn off the event server in options.