General AI Settings

General discussion about Blue Iris

Moderators: HeneryH, TimG

User avatar
Thixotropic
Posts: 865
Joined: Wed Sep 04, 2019 7:20 pm
Location: Low-Earth Orbit

General AI Settings

Post by Thixotropic » Fri Nov 25, 2022 4:44 am

I've no idea what the standard or default settings are for Code Project AI in the AI tab. This one camera's settings; does what I have here seem right, or does anything seem wrong or odd?

For example...
Am I analyzing too long? 750ms seems like a long time to me, but I don't know what the recommended time is. (??)
Should I increase or decrease the number of "real-time images"?
And last but not least, would you recommend switching to MikeLud's custom models?
-
AI-tab_2022-11-24_20-29-47.png
Blue Iris 5.x | Windows 10 Pro Slim | 16GB RAM | i7-7700 3.6 GHz | GTX 1080Ti FE | 8TB RAID NAS | 9 Cams | 2KVA UPS
MikeBwca
Posts: 1156
Joined: Thu Jun 20, 2019 5:39 am

Re: General AI Settings

Post by MikeBwca » Fri Nov 25, 2022 10:21 am

AI documentation starts at page 77 of the BI Help.

750ms is fine, depending on the camera and movement thru it. For people, 750ms is fine. For vehicles going past at 65 mph, you would want 200-5000ms.

Trigger settings AND AI settings are so confusing and intricate.

This is what I have my AI set too...

- Check 'Save AI analysis details.
You will be able to CTL+double-click an alert image to being up AI analysis - for a confirmed or canceled AI alert.

- Uncheck 'Begin analysis with motion-leading image. (Page 78)
This will start the AI analysis near the trigger point, rather than before. This is important when your using '+real rimes images'' & 'analyze one each'.


Something to consider...
If using the default 'By default, the motion-leading image, the alert image (trigger-leading) and 2 additional
images following the trigger are considered ', then your okay.

However, if your alert is going to last over a few seconds (any most will), you may want to analyze more then just a few seconds at the beginning of the alert.

For most alerts the default will work well. But, if anything should occur after the initial images are analyzed (which may be canceled) for the length of the alert, the object will be missed!
Also, if you may have shadows causing false triggers, on a windy day this will cause very long alerts, which will cause missed AI detection of objects you want. For example, on a windy day the alerts may last a few minutes or more. I've had alerts last up to an hour or more! If your analyzing just the first few seconds of an alert, if this is triggered by a shadow, then someone comes into the camera after the initial 2-3 images are analyzed and the analysis ends BUT the alert continues, the AI detection is missed.

What I do to combat shadow movement from trees/bushes is to limit the max length of an alert, and, increase the analysis.

What I do is...
- '+ real-time images' set to 999
- 'analyze each one' set to whatever you want. I use 250ms to 1 second.
- Add something in the 'To cancel' field. I have 'xyz'. This will keep the analysis going until the trigger ends.
- In the Trigger tab, 'Break time/End trigger...' I have 10 seconds. This will make sure the alert will not last long. Set this to whatever you want. But, bear in mind that if you set this too high, the analysis will occur each 'analyze one each' frequency for the number of images you set. This can drive up CPU/GPU quite a bit. For example, setting 999 images, 250ms, and a Break-Time End Trigger of 10 seconds, would result in arounf 40 images being analyzed! This would definably drive up CPU/GPU.
For cameras that have shadow movement, I usually use a frequency of 750ms-1 second. For my front door/window, I use 250ms . I've found that if I use 1 second, a person running thru my yard will sometimes be missed.

If all this is confusing, use the default analysis frequency, then change as needed.

For All... Please reply with corrections & comments good or bad.
User avatar
TimG
Posts: 2467
Joined: Tue Jun 18, 2019 10:45 am
Location: Nottinghamshire, UK.

Re: General AI Settings

Post by TimG » Fri Nov 25, 2022 1:57 pm

It's all a bit chaotic in the BI5 CP-AI "Wild West" as the settings keep changing, and the Help file hasn't caught up. Your settings are as valid as anybody's if they are working, and all any of us can do is experiment until it works.

I am struggling with my drive camera, with the motion I want being missed after a previous trigger a few seconds earlier, and will have a think about your settings. I do think the problem with the 999 images may be that BI5 can't decide which image was "it" until it has reviewed them all. So confusing :|

Maybe we need to get a few generic questions written out, and send them all to Ken for the definitive answers :idea: If you agree, let's start that list here.
Forum Moderator.
User avatar
Thixotropic
Posts: 865
Joined: Wed Sep 04, 2019 7:20 pm
Location: Low-Earth Orbit

Re: General AI Settings

Post by Thixotropic » Fri Nov 25, 2022 5:06 pm

TimG wrote: Fri Nov 25, 2022 1:57 pmIf you agree, let's start that list here.
Sounds good...I'll start.

1) How long should the typical or baseline "Analyze Time" be?

2) What's the typical or recommended number of "real-time images to analyze"?
Blue Iris 5.x | Windows 10 Pro Slim | 16GB RAM | i7-7700 3.6 GHz | GTX 1080Ti FE | 8TB RAID NAS | 9 Cams | 2KVA UPS
MikeBwca
Posts: 1156
Joined: Thu Jun 20, 2019 5:39 am

Re: General AI Settings

Post by MikeBwca » Sat Nov 26, 2022 1:56 am

TimG wrote: Fri Nov 25, 2022 1:57 pm ...
I do think the problem with the 999 images may be that BI5 can't decide which image was "it" until it has reviewed them all. So confusing :|
That's correct (as I understand it). AI will not 'release' the alert until either the alert ends, or, the Break time has been reached. This is why I limit AI to 10 seconds. I may get several AI confirmed in a short time frame. But, I'd rather get them soon, rather than wait several minutes, or however the motion would normally last last. I would be rude to get a break-in alert 20 minutes into the break-in!

For AI choosing the image... It will take the highest %. In the case there is more than 1 object found in the alert in different frames, a 'car' and 'person', I think it takes the first one found highest %. So, if there was a car first then a person, even if the person was 98% the AI will take the highest 'car' even if it was less than the highest person. Or something like that. I figured it out a while ago, then promptly became vague again (I should write this stuff down).
User avatar
Thixotropic
Posts: 865
Joined: Wed Sep 04, 2019 7:20 pm
Location: Low-Earth Orbit

Re: General AI Settings

Post by Thixotropic » Sat Nov 26, 2022 5:02 pm

So should I pick something like 5 or 10 images? 20 images? 100?

I don't want the AI to spend all its time gobbling up needless images for processing but I want to give it enough to work with.

And as for the analyze time, I'm setting it now to 200ms per image...is that too little or too much or...?
Blue Iris 5.x | Windows 10 Pro Slim | 16GB RAM | i7-7700 3.6 GHz | GTX 1080Ti FE | 8TB RAID NAS | 9 Cams | 2KVA UPS
User avatar
TimG
Posts: 2467
Joined: Tue Jun 18, 2019 10:45 am
Location: Nottinghamshire, UK.

Re: General AI Settings

Post by TimG » Sat Nov 26, 2022 6:59 pm

Ah, the inquisitive mind :lol:

The answer to all of your questions is to experiment.
So should I pick something like 5 or 10 images? 20 images? 100?
Is it presently missing motion triggers ? If so add more images and add something to the "To cancel" to keep it checking (Else it stops on the first valid identification). The problem with adding more images appears to be that BI5 has to check them all before it can make a decision. I now have the break time set to 10 seconds (Thanks MikeBwca), the time set to 250ms, and 20 images. With those settings, I expect in the DAT file to see 20 images after the trigger, and for that to take 20 x 250ms = 5 seconds, which is what I am getting. Since I am now getting most triggers, I think I will leave it for a while. I could do 40 images, which would take 40 x 250ms = 10 seconds which would match my break time and should still evaluate all 40 images. I note that when I had set it to 999 images, it showed less than 50 in the DAT files, which makes sense now.
And as for the analyze time, I'm setting it now to 200ms per image...is that too little or too much or...?
I think that depends on your average identification time as shown in the log or the DAT files, and those times are cpu/gpu dependant, as well as hopefully being slightly quicker with MikeLuds custom models. Mine are regularly showing between 60ms to 100ms, so I think I could drop that 250ms down to 100ms. My DAT files show t_ave=83ms.
Forum Moderator.
User avatar
Thixotropic
Posts: 865
Joined: Wed Sep 04, 2019 7:20 pm
Location: Low-Earth Orbit

Re: General AI Settings

Post by Thixotropic » Sun Nov 27, 2022 2:49 pm

TimG wrote: Sat Nov 26, 2022 6:59 pmand those times are cpu/gpu dependant,
That brings up another question...the new readouts on the bottom status bar occasionally (but not always) show a reading for a GPU....but I don't have a graphics card, so I wouldn't think it would find a GPU. (??) Other times it only shows the CPU and memory, it doesn't show the GPU at all.

Is it reading something from the onboard video, which is what I'm using?
new-readouts.png
new-readouts.png (7.51 KiB) Viewed 1842 times
Blue Iris 5.x | Windows 10 Pro Slim | 16GB RAM | i7-7700 3.6 GHz | GTX 1080Ti FE | 8TB RAID NAS | 9 Cams | 2KVA UPS
User avatar
TimG
Posts: 2467
Joined: Tue Jun 18, 2019 10:45 am
Location: Nottinghamshire, UK.

Re: General AI Settings

Post by TimG » Sun Nov 27, 2022 10:00 pm

If you still have the i7-7700 then it must be the built in gpu. Never saw that though.

I stopped using it on mine following an experiment after wondering if hardware acceleration was still required now we have sub streams. I found it wasn't reducing cpu load. All turned off, and I believe CPAI may be able to use it for gpu acceleration soon. It was on the roadmap anyway.
Forum Moderator.
User avatar
jeremypsl
Posts: 40
Joined: Wed Oct 05, 2022 7:42 pm

Re: General AI Settings

Post by jeremypsl » Sat Dec 03, 2022 8:16 am

Is it interesting to check "Use main stream if available" in AI ?
Post Reply