CodeProject.AI Version 2.0

EvanVanVan

Pulling my weight
Joined
Jul 29, 2022
Messages
135
Reaction score
102
Location
NJ
I just switched to the GPU version of CPAI. Getting some wild results lots of "nothingness" dected as dog's and cats with 60-70%+ confidence, but also some good results. I realize the AI/the models are not perfect but hopefully get better with time.

Right now, I've got it set it:

50% min-confidence
10 real time images
analyzed @ 750 ms each

Is there anything different or better I should try?

Thank you
 

Village Guy

Pulling my weight
Joined
May 6, 2020
Messages
291
Reaction score
161
Location
UK
I just switched to the GPU version of CPAI. Getting some wild results lots of "nothingness" dected as dog's and cats with 60-70%+ confidence, but also some good results. I realize the AI/the models are not perfect but hopefully get better with time.

Right now, I've got it set it:

50% min-confidence
10 real time images
analyzed @ 750 ms each

Is there anything different or better I should try?

Thank you
IMHO Setting 50% minimum confidence is very low and is likely to return some pretty crazy results. I would suggest at least 70%. Personally I use 80%, this stops the local magpies being recognised as people :)
 

CCTVCam

Known around here
Joined
Sep 25, 2017
Messages
2,676
Reaction score
3,508
I'm using 50% without any issue. Then again, I'm not using custom models but standard and only trying to detect people, car, buses, trucks and bicycles.

I've yet to have a single false alarm.

Surpriingly as well, confidence is low in a lot of recognitions which I wouldn't get alerts for at 80%. eg many people car / recogs are in the 60's.

eg. Car (been sat there for around 8hrs now) - 55% and it's the same car that's there everyday and straight on view right in front of the camera!!

Car.jpg
 
Last edited:

EvanVanVan

Pulling my weight
Joined
Jul 29, 2022
Messages
135
Reaction score
102
Location
NJ
I was really looking more for suggestions on Real Time Images and the time Analyze each times, but I found pretty good information here:
But I'm now I'm wondering if CPAI is using the GPU properly...I am up to 16 cameras with a RTX 3090 (so a very fast GPU), but it seems like there's a lot of CPU usage going on with 0% GPU usage. (Unless that CPU usages accounts for all CPU usage (Blue Iris, etc?)


CPAI.png

CPAI-object detection info.png

CPAI-server info.png
 

biggen

Known around here
Joined
May 6, 2018
Messages
2,584
Reaction score
2,884
I was really looking more for suggestions on Real Time Images and the time Analyze each times, but I found pretty good information here:
But I'm now I'm wondering if CPAI is using the GPU properly...I am up to 16 cameras with a RTX 3090 (so a very fast GPU), but it seems like there's a lot of CPU usage going on with 0% GPU usage. (Unless that CPU usages accounts for all CPU usage (Blue Iris, etc?)


View attachment 164509

View attachment 164510

View attachment 164511
What does your object detection module say? GPU or cpu?
 

EvanVanVan

Pulling my weight
Joined
Jul 29, 2022
Messages
135
Reaction score
102
Location
NJ
What does your object detection module say? GPU or cpu?
I think the first screenshot shows it enabled, and the 3rd screenshot "info" also shows it enabled with more details (cuda, etc.)

In BI > AI, it says Use GPU.
 

EvanVanVan

Pulling my weight
Joined
Jul 29, 2022
Messages
135
Reaction score
102
Location
NJ
I have a RTX 3090 use the Object Detection (YOLOv5 .NET) module it is faster the then the Object Detection (YOLOv5 6.2) module

Object Detection (YOLOv5 .NET) module
...

Object Detection (YOLOv5 6.2) module
...
Interesting, thank you. I was just going off the CPAI module description, that described the .NET module for CPU users and the 6.2 module for GPU users, but I'll try switching it up.
 

onyxlinkia

Getting the hang of it
Joined
Aug 16, 2015
Messages
158
Reaction score
62
I just turned on code AI for my cameras. But it seems like it's giving me false positives for detecting people at night due to IR and spider web moving around.....how to correct this other than keep cleaning the web? I even turned on the accuracy to over 70%.
 

Village Guy

Pulling my weight
Joined
May 6, 2020
Messages
291
Reaction score
161
Location
UK
I just turned on code AI for my cameras. But it seems like it's giving me false positives for detecting people at night due to IR and spider web moving around.....how to correct this other than keep cleaning the web? I even turned on the accuracy to over 70%.
A quick spray around the camera with Spiderex will help keep the webs away until the next heavy rainfall.
 

1fxman

Pulling my weight
Joined
Aug 29, 2018
Messages
273
Reaction score
143
Location
Oklahoma
I just turned on code AI for my cameras. But it seems like it's giving me false positives for detecting people at night due to IR and spider web moving around.....how to correct this other than keep cleaning the web? I even turned on the accuracy to over 70%.
Did you try and delete camera from BI, then add it back reset camera setting? I had the same problem form months. Was asking folks on here, trying different things. Nothing worked. So, a couple weeks ago I thought I’d delete one of the 4 cameras giving me trouble. When I added it back I pretty much left CPAI at factory settings. Well hell, No false triggers. I thought maybe the camera just quit working. But no, it worked flawless. I couldn’t believe it until I did my other trouble cameras one at a time. For the past 2 weeks I’v only got 2 crows and on raccoon false trigger. And that was last night and this morning. Gives me something to tweak. Before I did the del/add I was getting thousands of false triggers. And my phone was blowing up. Originally, I had 6 cameras giving me trouble. I got so frustrated with CPAI I replaced 2 with a new AI camera. I sure the 2 I took down can now be put back up somewhere else.

oh, and this is out in a wooded area. Lots of bugs & spiders.
 

onyxlinkia

Getting the hang of it
Joined
Aug 16, 2015
Messages
158
Reaction score
62
Thanks, I will give this a try.

Did you try and delete camera from BI, then add it back reset camera setting? I had the same problem form months. Was asking folks on here, trying different things. Nothing worked. So, a couple weeks ago I thought I’d delete one of the 4 cameras giving me trouble. When I added it back I pretty much left CPAI at factory settings. Well hell, No false triggers. I thought maybe the camera just quit working. But no, it worked flawless. I couldn’t believe it until I did my other trouble cameras one at a time. For the past 2 weeks I’v only got 2 crows and on raccoon false trigger. And that was last night and this morning. Gives me something to tweak. Before I did the del/add I was getting thousands of false triggers. And my phone was blowing up. Originally, I had 6 cameras giving me trouble. I got so frustrated with CPAI I replaced 2 with a new AI camera. I sure the 2 I took down can now be put back up somewhere else.

oh, and this is out in a wooded area. Lots of bugs & spiders.
 

CCTVCam

Known around here
Joined
Sep 25, 2017
Messages
2,676
Reaction score
3,508
To avoid false positives I'd say keep the number of objects detected to a minimum. The more you detect, the greater the chances a false object will match one of them.

In my case I'm not seeing much machine learning. The detection rate stays around the same at 55-65% a lot of the time. I'm not seeing any evidence it's learning and improving.

For maximum accuracy, and minimum false, I also think many have the right idea in using trip wires not motion with AI to confirm. Motion works but anything not static has motion which puts the emphasis almost totally on AI to filter the results. With trips, there's likely far less alerts so far less chance of the AI getting it wrong. Simple percentages at work. 10% false of 100 alerts is a lot less than 10% false of 1,000 alerts.
 

David L

IPCT Contributor
Joined
Aug 2, 2019
Messages
8,068
Reaction score
21,128
Location
USA
To avoid false positives I'd say keep the number of objects detected to a minimum. The more you detect, the greater the chances a false object will match one of them.

In my case I'm not seeing much machine learning. The detection rate stays around the same at 55-65% a lot of the time. I'm not seeing any evidence it's learning and improving.

For maximum accuracy, and minimum false, I also think many have the right idea in using trip wires not motion with AI to confirm. Motion works but anything not static has motion which puts the emphasis almost totally on AI to filter the results. With trips, there's likely far less alerts so far less chance of the AI getting it wrong. Simple percentages at work. 10% false of 100 alerts is a lot less than 10% false of 1,000 alerts.
Agreed. Trips can sometimes be hard to setup correctly but worth the results.

I remember watching this video:

 

biggen

Known around here
Joined
May 6, 2018
Messages
2,584
Reaction score
2,884
To avoid false positives I'd say keep the number of objects detected to a minimum. The more you detect, the greater the chances a false object will match one of them.

In my case I'm not seeing much machine learning. The detection rate stays around the same at 55-65% a lot of the time. I'm not seeing any evidence it's learning and improving.

For maximum accuracy, and minimum false, I also think many have the right idea in using trip wires not motion with AI to confirm. Motion works but anything not static has motion which puts the emphasis almost totally on AI to filter the results. With trips, there's likely far less alerts so far less chance of the AI getting it wrong. Simple percentages at work. 10% false of 100 alerts is a lot less than 10% false of 1,000 alerts.
I don't think any learning is happening with CPAI. The models you are using are already trained and "learned". You will have to train your own models to use with CPAI for each camera's FOV if you really want to get false alerts down to a bare minimum and get accuracy up as high as possible.

Honestly, I've given up on CPAI for a while. I've found Dahua IVS coupled with Human detection works for my needs. I never miss a human or car coming into my driveway with IVS like I did with CPAI.
 

onyxlinkia

Getting the hang of it
Joined
Aug 16, 2015
Messages
158
Reaction score
62
Agreed. Trips can sometimes be hard to setup correctly but worth the results.

I remember watching this video:

Thanks for the video, very cool, didn't know i can set up that many trip wires.
 

onyxlinkia

Getting the hang of it
Joined
Aug 16, 2015
Messages
158
Reaction score
62
To avoid false positives I'd say keep the number of objects detected to a minimum. The more you detect, the greater the chances a false object will match one of them.

In my case I'm not seeing much machine learning. The detection rate stays around the same at 55-65% a lot of the time. I'm not seeing any evidence it's learning and improving.

For maximum accuracy, and minimum false, I also think many have the right idea in using trip wires not motion with AI to confirm. Motion works but anything not static has motion which puts the emphasis almost totally on AI to filter the results. With trips, there's likely far less alerts so far less chance of the AI getting it wrong. Simple percentages at work. 10% false of 100 alerts is a lot less than 10% false of 1,000 alerts.
I only set it to detect person and vehicle on cam, only person in another cam.
 
Top