CodeProject.AI Version 2.0

Thanks truglo for the tip on the delayed service start, it's all working ok now on a reboot. Maybe there should be a change to the BI service when AI is enabled to add the service dependency to the BI service so it can then be a normal auto start but won't do that until the AI is up first rather than use delayed start and risk a no start should a random other auto service fail to function which is nothing to do with BI\AI.
Email Ken at BI that you had to do this to get it to work. I emailed him the same thing.
 
Anyone willing to lend any thoughts on this strange issue I'm seeing? A good chunk of the time when I'm alerted on motion, I will be notification alerts that have the things noticed boxed and labeled with confidence ratings (1 & 2). However another decent amount of the time, I get alerts like 3 & 4 where it's clear what the motion alert was caused by, but it's not boxed or labeled (there are no boxes or labels anywhere in the image). Hopefully it's obvious, but these are just cropped areas not the entire image. What am I doing wrong?
 

Attachments

  • 1.png
    1.png
    170 KB · Views: 58
  • 2.png
    2.png
    259.5 KB · Views: 55
  • 3.png
    3.png
    161.9 KB · Views: 55
  • 4.png
    4.png
    165.2 KB · Views: 49
Anyone willing to lend any thoughts on this strange issue I'm seeing? A good chunk of the time when I'm alerted on motion, I will be notification alerts that have the things noticed boxed and labeled with confidence ratings (1 & 2). However another decent amount of the time, I get alerts like 3 & 4 where it's clear what the motion alert was caused by, but it's not boxed or labeled (there are no boxes or labels anywhere in the image). Hopefully it's obvious, but these are just cropped areas not the entire image. What am I doing wrong?
Camera Settings - Trigger - Artificial Intelligence - Burn label mark-up onto alert images
Check box on the AI window per camera. Above ALPR section.
 
  • Like
Reactions: fenderman
Camera Settings - Trigger - Artificial Intelligence - Burn label mark-up onto alert images
Check box on the AI window per camera. Above ALPR section.

This is my settings page for the camera that provided all of those alerts...

My alert settings page has the the "Attach trigger leading-edge image (from alerts list)" box checked, and the "Attach motion leading-edge image (if possible)" box unchecked, in case that matters?
 

Attachments

  • 5.png
    5.png
    104 KB · Views: 94
Last edited:
This is my settings page for the camera that provided all of those alerts...

My alert settings page has the the "Attach trigger leading-edge image (from alerts list)" box checked, and the "Attach motion leading-edge image (if possible)" box unchecked.
So it's the checkbox above the ALPR section label.
This is a setting for each camera. Some cameras can be checked, and others not. If you want to see those boxes and labels, then check the "Burn labels" checkbox, if you don't, then uncheck that box.
If you want it to be consistent, you would check or uncheck for every camera.
Myself, I don't use that.
Cars are cars, people are people, gets confusing with animals.
Birds are dogs, Birds are cats, cats are dogs, my wife and I can be dogs depending on posture, squirrels are dogs.
I can tell what triggered the alert by looking at the picture.
HTH
 
So it's the checkbox above the ALPR section label.
This is a setting for each camera. Some cameras can be checked, and others not. If you want to see those boxes and labels, then check the "Burn labels" checkbox, if you don't, then uncheck that box.
If you want it to be consistent, you would check or uncheck for every camera.
Myself, I don't use that.
Cars are cars, people are people, gets confusing with animals.
Birds are dogs, Birds are cats, cats are dogs, my wife and I can be dogs depending on posture, squirrels are dogs.
I can tell what triggered the alert by looking at the picture.
HTH
I occasionally turn this on if I am getting what appears to be false alerts, just to see what is triggering the AI.
If you are getting "notifications" that very, it might be on the alerts actions on alert action set page.
On Configure push notification page, there is an option to send rich push notification, where you can select alert image, camera image, etc.
I don't know how that would change anything.
I don't do that, sms is too unreliable, email is too slow, blue iris app push images disappear.
I have been using Telegram or Pushover for more than a year now. I send the alert image.
 
So it's the checkbox above the ALPR section label.
This is a setting for each camera. Some cameras can be checked, and others not. If you want to see those boxes and labels, then check the "Burn labels" checkbox, if you don't, then uncheck that box.
If you want it to be consistent, you would check or uncheck for every camera.
Myself, I don't use that.
Cars are cars, people are people, gets confusing with animals.
Birds are dogs, Birds are cats, cats are dogs, my wife and I can be dogs depending on posture, squirrels are dogs.
I can tell what triggered the alert by looking at the picture.
HTH

What I am saying is all 4 of those pictures I originally posted, came from that same camera with the box already checked. Meaning whatever is causing the issue I'm seeing unfortunately has nothing to do with the checkbox :(
 
What I am saying is all 4 of those pictures I originally posted, came from that same camera with the box already checked. Meaning whatever is causing the issue I'm seeing unfortunately has nothing to do with the checkbox :(
remember the same camera has 7 different profiles and each profile can have different AI settings. So double check you don't have a profile schedule change going on that camera.
 
  • Like
Reactions: fenderman
remember the same camera has 7 different profiles and each profile can have different AI settings. So double check you don't have a profile schedule change going on that camera.

That's a great point, but I don't even use profiles on my system unfortunately. I should've been clearer in my initial post, but those pictures were all within not very many minutes of each other, too.

I'll keep playing around with it see if I can figure out any tweaks that change behavior and go from there. Thanks!
 
Iohlin5

If you click the save AI analysis details then you can look and see what the confidence number is or you can just decrease the min confidence from 70% to something lower like 40% to see maybe AI is finding the dogs at 65% so you wouldn't see the box around the dogs since it doesn't meet your 70% setting. I'm still learning but that would be my approach.
 
  • Love
Reactions: David L
Iohlin5

If you click the save AI analysis details then you can look and see what the confidence number is or you can just decrease the min confidence from 70% to something lower like 40% to see maybe AI is finding the dogs at 65% so you wouldn't see the box around the dogs since it doesn't meet your 70% setting. I'm still learning but that would be my approach.
Excellent idea. That may shed some light as to what is going on.
I just found out recently if you have analysis details selected, and do a ctrl-double click on an alert, it will show you what has gone on with the ai.
Sorry, that's all the ideas I have.
My experience is there are WAY too many settings; there are a lot of settings that can break the way this works. There's quite a learning curve.
 
  • Like
Reactions: David L
Iohlin5

If you click the save AI analysis details then you can look and see what the confidence number is or you can just decrease the min confidence from 70% to something lower like 40% to see maybe AI is finding the dogs at 65% so you wouldn't see the box around the dogs since it doesn't meet your 70% setting. I'm still learning but that would be my approach.
Excellent idea. That may shed some light as to what is going on.
I just found out recently if you have analysis details selected, and do a ctrl-double click on an alert, it will show you what has gone on with the ai.
Sorry, that's all the ideas I have.
My experience is there are WAY too many settings; there are a lot of settings that can break the way this works. There's quite a learning curve.
Good ideas thank you guys. The way I have it set up my understanding is it's not supposed to even alert me unless something like a dog or person is actually detected with that confidence level, but completely agree on the number of settings and maybe I'm still missing something. I'll try playing around with the Ai analysis re-check the next time I see one of those alerts without the boxes roll through. Thank you!
 
I just noticed these errors this evening. I am on v2.08-beta, installed on Windows, CPU only. Anyone seeing this too?

AI detection seems to be working but perhaps these errors is related to site being unaccessible/down?
Why is this software checking so often?
codeprojectai site down.png
 
Last edited:
  • Like
Reactions: David L
@pm3klb @hapstabu I wanted to post back on my issue as I'm 98% sure I've figured it out as I haven't seen the issue reoccur in over 24 hours. Turns out apparently my NAS must've been getting a little too hammered with all the stuff I've got going on - I switched my alerts folder from there to my C:/ drive (which is ultimately a different shared storage server but this one is at least SSD-backed) and the problem seems to have gone away. Must be something with latency during write or something but either way I just wanted to update in case anyone else ever encounters similar issues and sees this post. Thanks again!
 
  • Like
Reactions: pm3klb
BI 5.7.0.5, CodeProject.AI v2.0.8-beta on W10 Pro.

CPU only was working fine. I just got an Nvidia GTX 1650 half-height card for my Dell Optiplex 5050 SFF.

I installed Nvidia Driver, CUDA Toolkit 11.7 and cuDNN install script per steps here: CodeProject.AI Server: AI the easy way..

I then tried to "Enable GPU" for YOLOv5 6.2. I saw that it stopped the service but once it restarted, I'm still on CPU.

AI detection is still working but via CPU.

Any thing else I can try? See screenshots below.

Enable GPU.pnginstall modules.pngsystem info.pngnvidia-smi.png

"Use GPU" is grayed out in BI5
BI5 grayed out.png

I see the Nvidia GPU on Task Manager
gpu on task manager.png
 
Last edited:
BI 5.7.0.5, CodeProject.AI v2.0.8-beta on W10 Pro.

CPU only was working fine. I just got an Nvidia GTX 1650 half-height card for my Dell Optiplex 5050 SFF.

I installed Nvidia Driver, CUDA Toolkit 11.7 and cuDNN install script per steps here: CodeProject.AI Server: AI the easy way..

I then tried to "Enable GPU" for YOLOv5 6.2. I saw that it stopped the service but once it restarted, I'm still on CPU.

AI detection is still working but via CPU.

Any thing else I can try? See screenshots below.

View attachment 155858View attachment 155859View attachment 155860View attachment 155861

"Use GPU" is grayed out in BI5
View attachment 155862
Since CP.AI was installed when you did not have a Nvidia GPU it did not install the correct Python packages for Nvidia GPU. Try uninstalling CP.AI then reinstall
 
  • Like
Reactions: joegr
@MikeLud1 Thank you for the advice. Uninstalling/reinstalling CodeProject.AI did the trick. I see that I am on CUDA for both YOLOv5 and ALPR now, yeah!

But the performance of the AI detection was not as good as I had hope ~700 - 800ms (see 2nd screenshot). I did some reading and assumed a GTX 1650 card would be sufficient for these types of detection, at least this card should be more performant than a 1050.

A related note, for all cameras, the AI is configured to use substream image. Only the dedicated ALPR camera is using main stream image (1080p).

on cuda.png alpr.png
 

Attachments

  • on cuda.png
    on cuda.png
    388.8 KB · Views: 9
Mike, I also looked at non-ALPR detection with ipcam-general model using substream image. I can see CUDA spike in Task Manager so I assume Nvidia card was used by CP.AI.

Anything else I can try to see if I can get better performance (<100 ms)? ipcam-general.pngcuda spike.png
 
Mike, I also looked at non-ALPR detection with ipcam-general model using substream image. I can see CUDA spike in Task Manager so I assume Nvidia card was used by CP.AI.

Anything else I can try to see if I can get better performance (<100 ms)? View attachment 155876View attachment 155877
You can try Object Detection (YOLOv5 .NET), you must disable Object Detection (YOLOv5 6.2) because you can not run both at the same time. I am see faster times with Object Detection (YOLOv5 .NET). One note Object Detection (YOLOv5 .NET) does not have all my custom models, if a model you are using is missing you can download them from the below link.

You can also try going into Nvidia Control Panel and set the Power management mode to Prefer maximum performance. This will stop the GPU from going into low power mode and keep the Pstate at P2

1677966208407.png
1677966537351.png
 
  • Like
  • Love
Reactions: ni4ni and actran