Page 1 of 2

AI Expectations?

Posted: Wed Jan 10, 2024 1:44 am
by tardigrade
Just curious what are the advantages of AI and what are the expectations? I'm having trouble with a couple of cameras picking up bush movements and and it catches part of main road but not effective to remove it from view. Can AI reliably be used to trigger alarms and recordings? Will it cause and increase CPU and other resource usage?

Re: AI Expectations?

Posted: Wed Jan 10, 2024 5:17 am
by TimG
With AI it will still trigger, but be sent to CPAI for checking. If you set CPAI to only Alert on person or car, then it should not Alert for movement of the bush.
Cpu is loaded by every additional camera or object you try to identify.

Re: AI Expectations?

Posted: Wed Jan 10, 2024 11:19 am
by IAmATeaf
I don’t personally use Code Project AI but over a year ago I did give Deepstack a try.

In essence you need to run the AI engine somewhere so this is a load. You then configure BI to take snapshot on a trigger event, this snapshot image is then sent to the AI engine to examine, when it examines the snapshot this again increases the load. After examining the snapshot the AI engine sends back a response which BI the acts on to either determine it as a false or positive trigger.

You can configure the interval between snapshots in BI and as each image is passed over for examination you get a spike in the load made by the AI engine.

You can run the AI engine in a separate box but when I ran Deepstack on my BI system which is an i5-6500 during image examination it would spike my CPU load from an idle of around 18-20% all the way up to 90-95%.

I’ve not tried CP:AI to see if it’s any better but I now use the intelligence within my cams to determine if there is a person and then in turn trigger an alert within BI which for me works fine with hardly any false triggers.

Re: AI Expectations?

Posted: Wed Jan 10, 2024 11:30 am
by louyo
Well: "it all depends"
I run GP-AI in a docker image on a Linux virtual machine. Do not see much effect on CPU on the BI system. BUT, I only use AI in specific conditions. Example; two cameras get a lot of false triggers at night, caused by headlights. So, I use a night profile and only look for people on a stairway. The temptation is to use AI on all cameras, all the time. I avoid that.

Re: AI Expectations?

Posted: Wed Jan 10, 2024 8:08 pm
by IAmATeaf
louyo wrote:Well: "it all depends"
I run GP-AI in a docker image on a Linux virtual machine. Do not see much effect on CPU on the BI system. BUT, I only use AI in specific conditions. Example; two cameras get a lot of false triggers at night, caused by headlights. So, I use a night profile and only look for people on a stairway. The temptation is to use AI on all cameras, all the time. I avoid that.
Do you run the Linux VM on the same PC as BI?

When I used Deepstack I did find that running it within a docker container reduced the CPU load. The Deepstack desktop app just killed my desktop dead. Image

Re: AI Expectations?

Posted: Wed Jan 10, 2024 11:16 pm
by louyo
No. The Docker image runs on a Linux VM on an ESXi server. Separate hardware. Ancient server (2012) with 27 BPF processor (bits per fortnight).

AI Expectations?

Posted: Thu Jan 11, 2024 4:39 pm
by IAmATeaf
You can run docker containers within Windows provided you have the Windows subsystem for Linux installed/enabled.

Re: AI Expectations?

Posted: Thu Jan 11, 2024 11:08 pm
by louyo
Advantage, in my setup, the ESXi system has an NVIDIA card that I can pass through to the VM.

Re: AI Expectations?

Posted: Sat Jan 13, 2024 3:03 pm
by tardigrade
So right now I'm using the built in "free" verion of Deepstack/Codeproject. What are the advantages of up grading to the paid versions of AI.

Anyone know a good tutorial for optimizing AI? So far I've gone from 3000 alerts in a day to less than ten last night (also discovered masking so not getting cars on the highway every 12 to 17 seconds on the other side of my hedge row...) Now I'm concerned about what I may NOT be getting. I did pick up the cat and a raccoon yesterday. The odd thing is, before, all the alerts had movement in them. Now I'm getting alerts with nothing going one; nothing is moving so don't know what alerted. It keeps the five seconds preceding the trigger.

Re: AI Expectations?

Posted: Sat Jan 13, 2024 3:36 pm
by TimG
Deepstack (DS) and CodeProject AI (CPAI) are both free AI for cctv, but they are very different products by different people. BI5 started with DS and moved over to CPAI later.
Sentry and Plate recognizer are both commercial products. You will probably have a free tier for a set number of identifications, and then paid tiers if you use more than that.

The pros for Sentry/Plate recognizer are that they should be simple to use, and may be very accurate.
The cons are that:
1. They may cost a lot if you send too many triggers.
2. They may have remote servers which can slow things down.
3. We don't hear of many people using them, as most users prefer the free CPAI, so the forum won't be much help.

CPAI will give you a world of pain if you try to use a gpu and the wrong CUDA version. Keep good back ups as you will need them.