General AI Settings
- Thixotropic
- Posts: 865
- Joined: Wed Sep 04, 2019 7:20 pm
- Location: Low-Earth Orbit
General AI Settings
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?
-
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?
-
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
Re: General AI Settings
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.
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.
Re: General AI Settings
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
If you agree, let's start that list here.
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

Forum Moderator.
- Please see Self Help Content.
- Have you checked for your issue in the built in BI5 help file ? Or online here.
- Support feedback: Startup Configuration Guide - The Solution to Most Issues
- Thixotropic
- Posts: 865
- Joined: Wed Sep 04, 2019 7:20 pm
- Location: Low-Earth Orbit
Re: General AI Settings
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
Re: General AI Settings
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).
- Thixotropic
- Posts: 865
- Joined: Wed Sep 04, 2019 7:20 pm
- Location: Low-Earth Orbit
Re: General AI Settings
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...?
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
Re: General AI Settings
Ah, the inquisitive mind
The answer to all of your questions is to experiment.

The answer to all of your questions is to experiment.
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.So should I pick something like 5 or 10 images? 20 images? 100?
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.And as for the analyze time, I'm setting it now to 200ms per image...is that too little or too much or...?
Forum Moderator.
- Please see Self Help Content.
- Have you checked for your issue in the built in BI5 help file ? Or online here.
- Support feedback: Startup Configuration Guide - The Solution to Most Issues
- Thixotropic
- Posts: 865
- Joined: Wed Sep 04, 2019 7:20 pm
- Location: Low-Earth Orbit
Re: General AI Settings
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?
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
Re: General AI Settings
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.
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.
- Please see Self Help Content.
- Have you checked for your issue in the built in BI5 help file ? Or online here.
- Support feedback: Startup Configuration Guide - The Solution to Most Issues
Re: General AI Settings
Is it interesting to check "Use main stream if available" in AI ?