Codeproject AI not checking after alert has been triggered

General discussion about Blue Iris
Post Reply
langas6
Posts: 6
Joined: Wed Jan 24, 2024 4:50 am

Codeproject AI not checking after alert has been triggered

Post by langas6 »

Hey guys,

Running testing on BI5 and CPAI and seeing what i can do with it.

One thing i've run into and not sure if this is a limitation of the software and the triggering system, or just me being a bit of a n00b (most likely).

I'm trying to get the AI part of it to check the whole time a trigger has been... triggered without having to cancel the trigger after 1 second.

Use case: Random tree moves in frame and sets off the Trigger, then a couple of seconds later someone walks into the frame, where it doesn't then check with the AI, hence not recording either (only recording on Alert so far, no need for hours and hours of "driveway" with nothing happening), this is with the "End trigger unless re-triggered within" to 30 seconds.

If I set the "End trigger unless re-triggered within" down to 1 second, my theory is that every second, it will check for new triggers and check with AI, but the problem is that i then can't set a "post-alert" time of 30 seconds (or longer). Which means if someone stands still or the AI % drops below my threshold, then the recording stops and i miss a whole lot of valuable info.

I"m sure this makes sense in my brain, but not sure if i'm relaying it proprely.

(I apologize early if i'm just thick and havn't been able to use the right keywords in my searching, both here and googling)

Cheers
User avatar
TimG
Posts: 2569
Joined: Tue Jun 18, 2019 10:45 am
Location: Nottinghamshire, UK.

Re: Codeproject AI not checking after alert has been triggered

Post by TimG »

Hi, if you enable the DAT files, you will see that the first identified item has an asterisk next to it. It then stops.
You can force it to continue through your specified number of images by putting something in Cancel that you won't see. "Unicorn" is becoming popular.
Forum Moderator.
Problem ? Ask and we will try to assist, but please check the Help file.
langas6
Posts: 6
Joined: Wed Jan 24, 2024 4:50 am

Re: Codeproject AI not checking after alert has been triggered

Post by langas6 »

Hey Jason,

Pretty much, I'd like to just record when there something I care about (a person walking around in the yard at all).

I can't seem to find a way for the AI to always check while the trigger is active. It seems to check once at the start of the trigger then not again, depending how long the end trigger tine is. If I set to 1 second, it'll keep throwing to the AI every second as it resets the trigger every second. But if I set it to 30 seconds to have a good amount of time after the AI finds something, then it won't check again until that 30 second time out.

Usually case for me is when it's windy, the trees will set off the trigger all the time, so I have to decide between a short record time when it does find something or miss a tonne of things that I actually want to record because the AI isn't checking all the time for things I want.

Compute power isn't a problem as I'm running a coral tpu which pulls about 3 watts and can do about 10 inferences a second. So having it check pretty much always is no issue.

Thanks for the reply everyone and the help ☺️☺️

Cheers
langas6
Posts: 6
Joined: Wed Jan 24, 2024 4:50 am

Re: Codeproject AI not checking after alert has been triggered

Post by langas6 »

So have worked out that it only checks with CPAI 4 times and that's it, as confirmed by the .dat files, but can't find anywhere in the options to do x checks per second or check when alert is triggered always or something like that.

Can't find a place to show a photo of it, but it does at T-1050,T+0,T+200,T+450, and all Error when it triggers, but only at the start of the trigger, which is why it's failing on motion check. As it'll only check the 4 times in the 30 second if the trigger/motion stays active if i have the "end trigger unless triggered within" set to 30 seconds, but then i get it checking every second when it's set to 1 second (of course :P)

Do we know if there's anywhere in the software to increase the amount of times it sends the motion/trigger/alert to CPAI or if there's another option like the "pre-record" time to have a "post-record" time that i don't know about somewhere?

Hope this helps?
louyo
Posts: 180
Joined: Sat Apr 18, 2020 1:16 am

Re: Codeproject AI not checking after alert has been triggered

Post by louyo »

Like this?
Attachments
alertAI.png
alertAI.png (190.73 KiB) Viewed 2724 times
langas6
Posts: 6
Joined: Wed Jan 24, 2024 4:50 am

Re: Codeproject AI not checking after alert has been triggered

Post by langas6 »

Yeah exactly that, but I've only got it set at 2..

From my understanding that's the amount of positive ID's if needs to confirm the trigger/alert before it will record the clip.

If I can set that to say 50 or more then it might keep checking, but will it need to be above the confidence % for the whole 50 images for the data to be recorded to disk?
louyo
Posts: 180
Joined: Sat Apr 18, 2020 1:16 am

Re: Codeproject AI not checking after alert has been triggered

Post by louyo »

My understanding is that it will stop and record as soon it satisfies the conditions you have set, withing the model you have chosen. If you want it to keep going, put something that is NOT in the model. Many use unicorn (well, except the believers). That is the way it is working for me for about half a dozen cameras. We don't use AI on cameras that are not prone to false alerts.
langas6
Posts: 6
Joined: Wed Jan 24, 2024 4:50 am

Re: Codeproject AI not checking after alert has been triggered

Post by langas6 »

Have just emailed to BI support in hope they have something i can change as it doesnt' seem to matter what i put into the options, it will never record for the 30 seconds post confirmation of motion if the motion isn't a "person" at the first second or 2 of the motion. So i get constant 30 second blocks where nothing's checked or recorded (trees blowing next to a road with cars driving and people walking past the front of the house).

Not sure if there's some sort of registry hack that needs to be done to get this happening the way i need/want it to happen.

This was the email to help clear what i'm after as i know i may not have explained it properly above...

Hey guys,

Using Blue Iris and Codeproject AI, it seems you can't get the AI to
constantly check the frames in the image where the motion is set, past
the point of the trigger (2 frames plus the number of frames you set
for checking, the + realtime images option, in my case 2 frames, so 4 total).

I'm trying to get it to check the motion in the trigger for the whole
time of the trigger so i can catch anything that's moving and check
with CPAI all the time. It's only checking 4 frames then stops
checking, but the trigger is still active. If i set the "End trigger
if not re-triggered in" to 1 second, it will check with CPAI every
second, but then i only get 1 second of post-motion recording. But
then if i set it to 30 seconds (to get 30 seconds pre and post
motion), then it will only check with CPAI at the start of each 30
second block, never checking again after the trigger has been set.

I've been thinking of running code on motion to change the motion
sense area setting in the registry (where it seems all the data for BI
is stored) so it will change from high to low to high etc sensitivity
so it will keep triggering the AI to check the frames while there's
motion active. But I think this is a bit too "hacky" for a bit of
software like BI which should have this built in.

Hoping there's something i'm missing with how they both integrate
together and if there's a way to tell it that while the motion
detection is active, keep checking the frames that have motion active.

Cheers

Stuart
MikeBwca
Posts: 1121
Joined: Thu Jun 20, 2019 5:39 am

Re: Codeproject AI not checking after alert has been triggered

Post by MikeBwca »

...
Last edited by MikeBwca on Fri Apr 05, 2024 11:35 am, edited 1 time in total.
langas6
Posts: 6
Joined: Wed Jan 24, 2024 4:50 am

Re: Codeproject AI not checking after alert has been triggered

Post by langas6 »

Thank you Mike and everyone.

I guess either i was thick or was interpreting the interface a bit wrong (bit of both maybe :P)

Didn't realise you could set the + images to as much as you want and it not overlap the max "end trigger unless triggered" timeframe.

Have it set at 30 seconds pre-record and 15 for the end trigger on both of them and it seems to find anything whenever there is movement in the timeframe i set. Seems it's that "images" that i was getting stuck on the understanding on how it works what what it does. I thought it needed that number of frames from CPAI to be confirmed before it would trigger the alert, rather than just needing 1 frame/confirmation of "yes there's a *person*" to activate the alert and record what's there.

Will test it over the coming days/weeks, but initially it's working better.

I've put the timer back to 100ms as the coral TPU can usually get the inferencing done in 60-70ms, so it can run all the time and do it's thing. Once i get to multiple cameras (only have 1 for testing at the moment), i'll probably need to change it to higher so each camera has some "airtime" with the stick to do it's thing.

Thanks again for the help with this everyone!
Post Reply