CodeProject.AI Version 2.0

swilliams76360

Getting the hang of it
Joined
Oct 5, 2022
Messages
29
Reaction score
25
Location
texas
After months of constant crashing to complete system reboot, missed alerts, not being able to run any custom models, and not being able to run ver 2.x at all. I have replaced the video card, motherboard, processor, ram, and hard drive, and still the same thing. This past week, on a whim, I replaced my power supply, and to my amazement, that has literally resolved ALL my issues. I am now running the latest BI build and CPAI 2.08 with custom models and i have had zero issues. Who would have thought that a power supply would have caused all my issues. So, to anyone that is experiencing constant reboots, you may want to take a look at your power supply, make sure it is enough wattage to support the heavy load on the cpu and gpu.
 

Pharoahs2

n3wb
Joined
Oct 28, 2022
Messages
5
Reaction score
5
Location
Red Deer, Alberta
In order to use ALPR, do I need to use custom models? Just want to make sure these are the correct settings in the following link. Currently I don't see the plate in the alerts or the status logs of Blue Iris, but I do see them when I Anaylze with AI in the playback clip. Is the correct To confirm "DayPlate,NightPlate"?
CodeProject.AI Version 2.0

Also, just to note, I'm using CPAI in a Docker container.
 

Coltect

Pulling my weight
Joined
Nov 3, 2017
Messages
55
Reaction score
129
Location
Australia
Not sure if this is the right thread as I couldn't find the messages regarding this, but the problem with CodeProject AI Server not being started as a service before Blueiris service and then setting BlueIris to Delayed start can be fixed by adding CodeProject.AI Server as a dependency to Blueiris.
I recently needed to have a console Autologin and display UI3 on boot of the Blueiris server, which didn't work with the Delayed start as Blueiris was not running by the time the unattended login started.


Open an Admin Terminal or Powershell, type cmd to make it an old Command Prompt.

Type
sc query | findstr Project
To display the SERVICE_NAME of CodeProject.AI Server (Just in case it changes at some point in the future, or you are using a different language or whatever)

sc query | findstr Blue
Also check the Blueiris SERVICE_NAME

sc qc Blueiris
will check any existing Dependencies (should be none)

Ultimately do this
sc config Blueiris depend= "CodeProject.AI Server"

Now Blueiris service will depend on CodeProject.AI Server.
Note there is a space after the depend= but NOT one before the = sign. As there is a space in CodeProject.AI Server, use " around the name.

To check that it works, look in services.msc or do a sc qc Blueiris again.

I haven't had to do this for years and couldn't remember the syntax, so credit goes to
https://serverfault.com/questions/24821/how-to-add-dependency-on-a-windows-service-after-the-service-is-installed

Check that page for many other gotchas and uses too.
Hope this helps someone :)
 

jrbeddow

Getting comfortable
Joined
Oct 26, 2021
Messages
374
Reaction score
489
Location
USA
Am I the only one who has successfully gone back to simply using the checkbox in BI that starts and stops the CPAI service automatically? It works for me just fine, just as it did under DeepStack as well. Try it out if you haven't done so for a while, it just might surprise you (and yes, you might need one reboot cycle to get it working properly). Also, it's true that BI will come up a bit before the AI is active and fully started, but probably no more than 20 seconds or so.
 

wpiman

Pulling my weight
Joined
Jul 16, 2018
Messages
332
Reaction score
246
Location
massachusetts
In order to use ALPR, do I need to use custom models? Just want to make sure these are the correct settings in the following link. Currently I don't see the plate in the alerts or the status logs of Blue Iris, but I do see them when I Anaylze with AI in the playback clip. Is the correct To confirm "DayPlate,NightPlate"?
CodeProject.AI Version 2.0

Also, just to note, I'm using CPAI in a Docker container.
I believe so. I didn't have that show up in BI when I was using a docker container so I installed CP.AI locally and it showed up..... Interestingly enough if I go back to docker, the option is there. I am wondering in CP.AI needs to at least be installed locally for ALPR recognition even if you use another server.
 

David L

IPCT Contributor
Joined
Aug 2, 2019
Messages
8,055
Reaction score
21,100
Location
USA
Am I the only one who has successfully gone back to simply using the checkbox in BI that starts and stops the CPAI service automatically? It works for me just fine, just as it did under DeepStack as well. Try it out if you haven't done so for a while, it just might surprise you (and yes, you might need one reboot cycle to get it working properly). Also, it's true that BI will come up a bit before the AI is active and fully started, but probably no more than 20 seconds or so.
So how do you like CP.AI compared to DeepStack?
 

jrbeddow

Getting comfortable
Joined
Oct 26, 2021
Messages
374
Reaction score
489
Location
USA
So how do you like CP.AI compared to DeepStack?
Both work about equally well for me: on an I5-8500, CPU only system, the performance is adequate and roughly identical for now. Clearly CPAI is the direction all development is headed, so I'm hopeful for gradual performance improvements, and fingers crossed that the Coral USB support will eventually come (with better than CPU detection speed).
 

David L

IPCT Contributor
Joined
Aug 2, 2019
Messages
8,055
Reaction score
21,100
Location
USA
Both work about equally well for me: on an I5-8500, CPU only system, the performance is adequate and roughly identical for now. Clearly CPAI is the direction all development is headed, so I'm hopeful for gradual performance improvements, and fingers crossed that the Coral USB support will eventually come (with better than CPU detection speed).
So I am presently I running DeepStack GPU version through BI on a:
1678459811272.png
1678459709947.png

No problems so far.
 
Joined
Mar 3, 2023
Messages
2
Reaction score
0
Location
SoCal
Probably two stupid questions.

First off, I see a lot of you having your alerts with an image showing under the Blue Iris Satus > AI tab, mine is blank there.

Secondly, my Code project times are between 250-350ms, using either YOLO .NET, V5 3.1 or 6.2. using CUDA on a P1000 graphics card.

System specs are as follows
Intel i7-4790
16GB RAM (currently shows 8, need to figure that out..)
Nvidia Quadro P1000 with current drivers and CUDA drivers, etc.
Code project AI Ver 2.0.8 beta
Blue Iris 5.7.1.1 x64
Currently two cameras, a Reolink RLC-842A and a Empiretech IPC-B5442E-SE 3.6mm

I feel like with these specs and GPU I should be running a lot faster on the AI, like sub 100ms. Or is this just a crappier card than I thought?
 

MnM

Young grasshopper
Joined
May 14, 2014
Messages
95
Reaction score
20
So I am presently I running DeepStack GPU version through BI on a:
View attachment 156341
View attachment 156340

No problems so far.

About 3 weeks ago I have pointed my AITool to an instance of CP.AI running on a separate docker server. I am running GPU with a nvidia 1080 and Yolov5 6.2).

I see better processing times (anywhere between 22ms to 60ms - but about 80% of the images processed by CP.AI is around 25ms). In comparison Deepstack was around 70ms to 90ms.

Both my BI server and Docker server running CP.AI are virtual (running on Proxmox - see here and here for details when I started building my server - some things have changed since). Runnings AITool with cloned cameras.

I am planning on taking a backup of my BI server and then move totally to CP.AI (hopefully this weekend) and see how it will perform then. AITool and cloned cameras will be removed and the rest of the cameras will be configured for native BI AI integration.
 
Last edited:

MnM

Young grasshopper
Joined
May 14, 2014
Messages
95
Reaction score
20
I believe so. I didn't have that show up in BI when I was using a docker container so I installed CP.AI locally and it showed up..... Interestingly enough if I go back to docker, the option is there. I am wondering in CP.AI needs to at least be installed locally for ALPR recognition even if you use another server.
This is how I solved the issue with custom models and BI and CP.AI running on different servers.
I created a new folder in the BI server - custom models. In there I created EMPTY files for the custom models that I am using. Pointed BI to the new folder and then I rebooted the BI server. After the reboot they show up in BI.

1678504348792.png1678504348792.png
 

wpiman

Pulling my weight
Joined
Jul 16, 2018
Messages
332
Reaction score
246
Location
massachusetts
This is how I solved the issue with custom models and BI and CP.AI running on different servers.
I created a new folder in the BI server - custom models. In there I created EMPTY files for the custom models that I am using. Pointed BI to the new folder and then I rebooted the BI server. After the reboot they show up in BI.

View attachment 156406View attachment 156406
Thanks. I ended up installing Codeproject locally and they showed up. They appear to stay there AFTER I switched back to using my docker instance.

I am still having issues getting CodeProject to read my plates. It identifies the plate, but can't seem to gather any numbers off of it..
 

Post

Getting the hang of it
Joined
Sep 1, 2016
Messages
56
Reaction score
29
A few weeks ago I switched from Deepstack to CodeProject. The Alert Confirmation is set for "person, car, truck" but all day I receive "person" alerts when it's just the dog roaming around. This rarely happened with Deepstack. But, when I open the clips and select "Testing and Tuning", then "Analyze with AI", it correctly identifies the dog as a dog. Any ideas how to fix this?

1678580736804.png1678580537398.png
 

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
25,041
Reaction score
48,824
Location
USA
A few weeks ago I switched from Deepstack to CodeProject. The Alert Confirmation is set for "person, car, truck" but all day I receive "person" alerts when it's just the dog roaming around. This rarely happened with Deepstack. But, when I open the clips and select "Testing and Tuning", then "Analyze with AI", it correctly identifies the dog as a dog. Any ideas how to fix this?

View attachment 156550View attachment 156549
Keep in mind that the "Analyze with Deepstack/CodeProjectc" under "Testing & Tuning" will ALWAYS perform better than live as it is after the fact and should not be used as an analysis tool to try to figure out why it didn't see and trigger for a car or person. It should only be used to see what AI can find in that clip, like "hmm I wonder if AI can find a toothbrush" and then walk around with a toothbrush and have it identify it. I can run this on a camera not using AI and it will show EVERYTHING that AI has in its objects to find that it sees in the clip. This method will show you EVERY ITEM AI searches for.

With that said, what does the whole field of view show? That looks like a zoomed in image, so it is hard to tell because based on that it appears to be a great field of view, but cropped we have no idea if you are trying to do too much with one field of view. Plus it may be just the time of day, but that appears to be a washed out image - I assume you have dialed in the parameters of the camera and not on auto/default? AI works best when their is some contrast in the scene, so for most the contrast number has to be 8 points or so higher than the brightness number.
 

Post

Getting the hang of it
Joined
Sep 1, 2016
Messages
56
Reaction score
29
Gotcha. Here's the full image. I also have 4 other outdoor cameras and the same thing is happening on those.
1678582090715.png
 

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
25,041
Reaction score
48,824
Location
USA
Gotcha. Here's the full image. I also have 4 other outdoor cameras and the same thing is happening on those.
View attachment 156551
Yeah that seems like a great field of view and not trying to do too much - does it happen at all hours? I could see this sun location being problematic as the dog passed between it.
 

Post

Getting the hang of it
Joined
Sep 1, 2016
Messages
56
Reaction score
29
Yep, it's all day with the dog from camera-to-camera and occasionally a bird or leaf. Here are other views

1678582456116.png1678582536387.png1678582713241.png1678584246316.png
 
Last edited:
Joined
Mar 3, 2023
Messages
2
Reaction score
0
Location
SoCal
I noticed you don't have "dog" in the "to confirm" box. I'm not entirely sure if that has to do with it, but maybe worth a shot? I can't remember, but you may also need to add something to the custom models. I believe "ipcam-combined" has dog.
 

Post

Getting the hang of it
Joined
Sep 1, 2016
Messages
56
Reaction score
29
Yes, that's intentional -- I don't want alerts for the dog , just people, cars, and trucks. Strange thing is I rarely had this problem with Deep Stack and hadn't changed anything when I switched over to CodeProject.
 
Top