CodeProject.AI Version 2.0

biggen

Known around here
Joined
May 6, 2018
Messages
2,574
Reaction score
2,862
It sounds like your system is behaving similar to how mine does. You will likely have continued issues after rebooting unless you make a change to the window services startup for BI. Be default, both BI and CPAI services are set to start automatically. BI has to be changed to "Delayed startup" to allow more time for CPAI to be fully up and running first.

This settings is found by clicking the start button, typing "services", opening the services app, find blue iris on the list, pick delayed startup from the dropdown box, and save. Now when you restart the PC everything should behave as expected.
Yup. Just rebooted the server and the custom list is empty again. I'll try your delayed start or I can also just disable custom models for now so at least I have something working in the mean time.

Edit: Just tried the "Delayed Start" trick but it didn't work for me. Still no custom models available in BI.
 
Last edited:

Tinman

Known around here
Joined
Nov 2, 2015
Messages
1,211
Reaction score
1,479
Location
USA
Yup. Just rebooted the server and the custom list is empty again. I'll try your delayed start or I can also just disable custom models for now so at least I have something working in the mean time.

Edit: Just tried the "Delayed Start" trick but it didn't work for me. Still no custom models available in BI.
The custom models will work even though they do not show up, all the box in BI does is tell you what models are installed, but they are actually installed. You can see this here:

Screenshot 2023-02-14 103037.png
 

biggen

Known around here
Joined
May 6, 2018
Messages
2,574
Reaction score
2,862
The custom models will work even though they do not show up, all the box in BI does is tell you what models are installed, but they are actually installed. You can see this here:

View attachment 154242
Yeah they are located there but BI must not be able to use them. BI log file for motion alerts on cameras with AI enabled shows the alert lasted 50ms with "Nothing found".
 

gwithers

Getting the hang of it
Joined
May 18, 2016
Messages
49
Reaction score
38
The result of BI trying to use a model that BI can't "find" is more like 3-5 ms in my experience. My normal detection times are 45-55 ms per image (with GPU acceleration). BI hasn't always been able to populated the custom models in the drop down box for me but it hasn't affected BI's ability to use custom models I know are there. It has worked either way but I do have the individual camera AI parameters set to use the model I know is there.
 

biggen

Known around here
Joined
May 6, 2018
Messages
2,574
Reaction score
2,862
I emailed BI support. I'll disable custom models for now.
 

jaydeel

BIT Beta Team
Joined
Nov 9, 2016
Messages
1,133
Reaction score
1,242
Location
SF Bay Area
Yeah they are located there but BI must not be able to use them. BI log file for motion alerts on cameras with AI enabled shows the alert lasted 50ms with "Nothing found".
Same here.
I successfully eliminated this by changing the Blue Iris Service 'Startup Type' to 'Automatic (Delayed Start)' … post

EDIT:
Be sure to shutdown PC then restart after making the change.
If it's still not working, you might try increasing the default (global) Windows delay by using a registry setting ... link.
 
Last edited:

slabbel

Young grasshopper
Joined
Dec 12, 2014
Messages
30
Reaction score
24
Release 5.7.0.3 addresses an issue where CPAI service may be restarted multiple times with the below configuration:

(1) Auto Stop/Start with Blue Iris Enabled and
(2) Very active AI Processing and
(3) A Low AI Timout value is in use (default 30 seconds?)
 

blulegend

Young grasshopper
Joined
Dec 3, 2017
Messages
43
Reaction score
11
I upgraded to 5.7.0.3 and the sensitivity of the object detection is still not showing the low, medium, or high options in the drop down.
 

truglo

Pulling my weight
Joined
Jun 28, 2017
Messages
275
Reaction score
103
Same here, but I'm using custom models and not default object detection. Not sure why the dropdown doesn't work when using default object detection though, because it should. Then again, I can see how BI might get confused with ALPR for plates enabled and custom models disabled. I believe ALPR needs license-plate to work, but could be wrong.
 
Last edited:

talguy385

n3wb
Joined
Apr 9, 2022
Messages
6
Reaction score
5
Location
The best colony
Hi all, Can someone explain to me how I would load custom models when I am using CPAI in Docker on a different machine than what blue iris is running on? Do I need to point both the docker and blue iris to the same folder that has the custom models? Does blue iris only need to know of the custom models in order to determine the tags that are trained within the model?
 

gwithers

Getting the hang of it
Joined
May 18, 2016
Messages
49
Reaction score
38
You can map a local folder on the host running the AI server Docker container to the AI server custom model folder. You can do it by starting the container in docker with parameters and that will map a local folder from the host to the AI server custom folder running inside the container. You can then put the custom models you want to use in the local folder on the host and that will then be seen by CPAI server that is running inside the docker container. With the newer versions of CPAI, you don't need to do anything in BI as far as the custom models as it will query the CPAI instance and get the list of custom models that are installed there in the folder you map with the code below. If you don't map the custom model folder, BI will find the custom models that are included with the CPAI installation by default.

Code:
docker run --restart unless-stopped --name CodeProject.AI-Server -d -p 32168:32168 --mount type=bind,source=/folder_location_of_your_choosing/custom_models,target=/app/AnalysisLayer/ObjectDetectionYolo/custom-models,readonly codeproject/ai-server
 
Last edited:

Blackhawk

Young grasshopper
Joined
Nov 24, 2017
Messages
42
Reaction score
14
Sounds like some progress on Coral support! post from Feb 9th

The good news is I have Coral working.

The bad news is: 10 second inference times on a Windows machine, 60 seconds on a Raspberry Pi.

Clearly something is very broken, but I'm using the Google Coral demo, running TFLite, and using their models.

We'll keep plugging away but the hard work of sorting out how to get everything installed, setup, and packaged for deploy has been done.
from CodeProject.AI Server: AI the easy way.
 

Vettester

Getting comfortable
Joined
Feb 5, 2017
Messages
743
Reaction score
698
I just installed 2.0.8 and did not uninstall 2.0.7 or stop any services on two machines and everything is working on both machines. I didn’t even reboot either machine. Well done CPAI team!
 

jrbeddow

Getting comfortable
Joined
Oct 26, 2021
Messages
374
Reaction score
489
Location
USA
Not so fast: I just ran an (upgrade, in-place) install of 2.0.8 over 1.6.7 and while it installed fine. it would not detect anything, despite playing with reboots, starting order of BI and CPAI, still no joy. So, I uninstalled 2.0.8, re-ran the install of 1.6.7 and then went through the process of uninstalling and re-attempting to use 2.0.8, but it hangs with a hash error in regards to "CPAI Server.Stopper" every time (0x80091007 - The hash value is not correct).

I can successfully install up to 2.07 now, but seem to be locked out of ever trying 2.0.8 again.

By the way, are we still expected to use the "workaround" of setting up CPAI to Auto-start within Services, then setup BI to Auto-start (delayed startup), rather than letting BI control this behavior? The BI controlled version used to work just fine prior to any 2.0.x version.
 
Last edited:

MikeLud1

IPCT Contributor
Joined
Apr 5, 2017
Messages
2,214
Reaction score
4,253
Location
Brooklyn, NY
Not so fast: I just ran an (upgrade, in-place) install of 2.0.8 over 1.6.7 and while it installed fine. it would not detect anything, despite playing with reboots, starting order of BI and CPAI, still no joy. So, I uninstalled 2.0.8, re-ran the install of 1.6.7 and then went through the process of uninstalling and re-attempting to use 2.0.8, but it hangs with a hash error in regards to "CPAI Server.Stopper" every time (0x80091007 - The hash value is not correct).

I can successfully install up to 2.07 now, but seem to be locked out of ever trying 2.0.8 again.

By the way, are we still expected to use the "workaround" of setting up CPAI to Auto-start within Services, then setup BI to Auto-start (delayed startup), rather than letting BI control this behavior? The BI controlled version used to work just fine prior to any 2.0.x version.
The issue you had might the below

1676507818124.png
 
Top