CodeProject.AI Version 2.5

TDatta

n3wb
Joined
Nov 27, 2020
Messages
8
Reaction score
2
Location
New York
The Coral has a limited amount of memory and running two models is causing the CPU to be used and that is what is causing the slow speed.
Thanks that makes sense. Confirmed cpu is used for some calls when looking at info in CPAI.

Any thoughts on the rest of the erratic behavior.
CPAI is latest version, using EfficientDet, small or tiny.
I feel this is a BI issue, not sending calls properly or something similar, since the issues didn’t exist before updating BI.

lastly, is there some way to integrate your custom models into the docket image of CPAI? Or are they not ready for Coral, or maybe already in there?
 
Last edited:

MikeLud1

IPCT Contributor
Joined
Apr 5, 2017
Messages
2,214
Reaction score
4,253
Location
Brooklyn, NY
Thanks that makes sense. Confirmed cpu is used for some calls when looking at info in CPAI.

Any thoughts on the rest of the erratic behavior.
CPAI is latest version, using EfficientDet, small or tiny.
I feel this is a BI issue, not sending calls properly or something similar, since the issues didn’t exist before updating BI.

lastly, is there some way to integrate your custom models into the docket image of CPAI? Or are they not ready for Coral, or maybe already in there?
If you think there is a issue with an update to Blue Iris then email Blue Iris support. For custom models for the Coral I am not sure when we will have them.
 

CCTVCam

Known around here
Joined
Sep 25, 2017
Messages
2,676
Reaction score
3,506
I will stick with my AMD GPU based system running yolo5vNET (large) with custom models.

My single Coral TPU (yolo8v / medium) test system is using the same cameras and trigger settings, while inference is faster with Coral (about 15ms vs 25-30ms), otherwise Coral is not doing so well. Accuracy is way lower, if yolo5v/custom detects something at 75%, coral yolov8/no custom models might detect it at 45-55%. Setting threshold for alert this low causes a lot of false positives.
I can't really see how the Coral would affect accuracy. It simply processes the information sent to it. If there's an accuracy issue it's more likely with the Yolo 8 model than the Coral. The only influence you should see from the Coral is one affecting speed, one way or another, or discarded calls if it's struggling to keep up.
 

CCTVCam

Known around here
Joined
Sep 25, 2017
Messages
2,676
Reaction score
3,506
The Coral has a limited amount of memory and running two models is causing the CPU to be used and that is what is causing the slow speed.
Shouldn't it be using system memory?
 

mailseth

Getting the hang of it
Joined
Dec 22, 2023
Messages
124
Reaction score
87
Location
California
The Coral uses 8-bit integers, so there may be some degradation due to that. It shouldn’t be noticeable, however. I suspect that there has been something else going on.

The Coral also only has 8 mb of internal memory. A model such as YOLOv8 medium is 24 mb in size. So all of the model past those first 8 mb of parameters runs on the CPU. One advantage of multiple TPUs is you’re able to put the first 8 mb on one TPU and the second 8 mb on the next TPU.
 

snuuba

n3wb
Joined
Feb 23, 2024
Messages
10
Reaction score
6
Location
Finland
Here is another test with single Coral TPU. I switched to "tiny" Yolov8 model to alleviate possible problems with memory. Blueiris 5.8.8.1 / CP.AI 2.5.6 (fresh install as per first page instructions)

This alert was cancelled with AI error 500, due to "Unable to create interpreter"

Screenshot 2024-03-07 090735.png

Few seconds later CP.AI was able to process one of the frames, most of the frames ended up with "Unable to create interpreter".

Screenshot 2024-03-07 090908.png

CP.AI info:

Screenshot 2024-03-07 091958.png

System info:

Screenshot 2024-03-07 092052.png
 

snuuba

n3wb
Joined
Feb 23, 2024
Messages
10
Reaction score
6
Location
Finland
CPAI is running on a separate server

Restarting BI results in all CPAI calls failing, regardless of which options are enabled. It seems I need to go and start changing settings for it to work. I can change settings back to the starting configuration which didnt work, but will now work after cycling through different settings.

When I was running CP.AI in a remote server, I used "Override server" option on per camera "AI" option page. I think that this results in Blue Iris using default model on the remote CP.AI server and images are processed (sometimes, mostly with AI Error 500)

When running CP.AI locally with Coral model I had to enable "Default object detection" in "Blue Iris settings", without that option no request were shown in CP.AI console, but Blue Iris reported something like "nothing found, 4ms", not sure about the exact wording.

Screenshot 2024-03-07 093941.png
 

snuuba

n3wb
Joined
Feb 23, 2024
Messages
10
Reaction score
6
Location
Finland
I can't really see how the Coral would affect accuracy. It simply processes the information sent to it. If there's an accuracy issue it's more likely with the Yolo 8 model than the Coral. The only influence you should see from the Coral is one affecting speed, one way or another, or discarded calls if it's struggling to keep up.
Yes, the difference in accuracy is due to using default model yolo8v with Coral vs using Ipcam Custom models with non coral system. Getting ip-cam custom models support with Coral would probably fix this.
 

TDatta

n3wb
Joined
Nov 27, 2020
Messages
8
Reaction score
2
Location
New York
When I was running CP.AI in a remote server, I used "Override server" option on per camera "AI" option page. I think that this results in Blue Iris using default model on the remote CP.AI server and images are processed (sometimes, mostly with AI Error 500)

When running CP.AI locally with Coral model I had to enable "Default object detection" in "Blue Iris settings", without that option no request were shown in CP.AI console, but Blue Iris reported something like "nothing found, 4ms", not sure about the exact wording.

View attachment 188797
Thanks. I’ll try out the override. I wonder if there is a way to see what BI is passing to CPAI for each call.
 

Tinman

Known around here
Joined
Nov 2, 2015
Messages
1,211
Reaction score
1,479
Location
USA
Having an issue with getting BI to show the custom models on the latest update 5.8.8.2 Rebooted 2 times and tried the start/stop AI in BI itself, no luck. Reverted back to 5.8.8.1 and they show up first time.

I sent BI support a note.

175.jpg
 

MikeLud1

IPCT Contributor
Joined
Apr 5, 2017
Messages
2,214
Reaction score
4,253
Location
Brooklyn, NY
Having an issue with getting BI to show the custom models on the latest update 5.8.8.2 Rebooted 2 times and tried the start/stop AI in BI itself, no luck. Reverted back to 5.8.8.1 and they show up first time.

I sent BI support a note.

View attachment 188817
All you need to do is restart Blue Iris service and the custom model list will update.
 
Joined
Mar 13, 2023
Messages
21
Reaction score
9
Location
Texas
Regarding the issue with the greyed-out AI settings in AI, I had to first stop the CodeProject AI service that was running on my remote AI box and then restart the BI service. Doing this unlocked the screen and allowed me to make changes. I hope this helps someone else who is running CPAI on a remote machine (not on the same box as BI).

And thanks to all that keep providing excellent support here. This is such a cool product combination and it is great to have the support to make it work.
 

hapstabu

Getting the hang of it
Joined
Aug 29, 2020
Messages
66
Reaction score
41
Location
US
Having an issue with getting BI to show the custom models on the latest update 5.8.8.2 Rebooted 2 times and tried the start/stop AI in BI itself, no luck. Reverted back to 5.8.8.1 and they show up first time.

I sent BI support a note.

View attachment 188817
CodeProject.AI Server service needs to be up and running before Blue Iris starts.
Blue Iris pulls the models when it starts, so if CodeProject is not there yet, you will get no model list.
Set the Blue Iris service to Automatic (Delayed Start).


Sent from my iPlay_50 using Tapatalk
 

hapstabu

Getting the hang of it
Joined
Aug 29, 2020
Messages
66
Reaction score
41
Location
US
Regarding the issue with the greyed-out AI settings in AI, I had to first stop the CodeProject AI service that was running on my remote AI box and then restart the BI service. Doing this unlocked the screen and allowed me to make changes. I hope this helps someone else who is running CPAI on a remote machine (not on the same box as BI).

And thanks to all that keep providing excellent support here. This is such a cool product combination and it is great to have the support to make it work.
So does that mean that Ken has added some functionality to modify the models listbox contents, as opposed to the listbox being populated automatically when Blue Iris starts? (And you could do nothing to change it?)
Interesting. I'll have to look at that.



Sent from my iPlay_50 using Tapatalk
 

Tinman

Known around here
Joined
Nov 2, 2015
Messages
1,211
Reaction score
1,479
Location
USA
All you need to do is restart Blue Iris service and the custom model list will update.
Mike, rebooting the computer does this and has always worked before, also doing the stop/start thing in BI 4 times is not normal. As soon as I reverted to 5.8.8.1 they showed up. Just my opinion, but this has ALWAYS been a buggy issue. I update almost every time to test revisions and this is the biggest pain of testing.
 

MikeLud1

IPCT Contributor
Joined
Apr 5, 2017
Messages
2,214
Reaction score
4,253
Location
Brooklyn, NY
Mike, rebooting the computer does this and has always worked before, also doing the stop/start thing in BI 4 times is not normal. As soon as I reverted to 5.8.8.1 they showed up. Just my opinion, but this has ALWAYS been a buggy issue. I update almost every time to test revisions and this is the biggest pain of testing.
I am on 5.8.8.2 and custom model list is working fine.
 

Tinman

Known around here
Joined
Nov 2, 2015
Messages
1,211
Reaction score
1,479
Location
USA
CodeProject.AI Server service needs to be up and running before Blue Iris starts.
Blue Iris pulls the models when it starts, so if CodeProject is not there yet, you will get no model list.
Set the Blue Iris service to Automatic (Delayed Start).


Sent from my iPlay_50 using Tapatalk
Thank you, For some reason mine was set back to automatic, why ?? beats me, but I had that changed a long time ago :) Anyway changed it and updated to 5.8.8.2 and then a reboot and it worked !
 

Tinman

Known around here
Joined
Nov 2, 2015
Messages
1,211
Reaction score
1,479
Location
USA
I am on 5.8.8.2 and custom model list is working fine.
Well, I got it now. Wondering does the service settings change when BI has an update? Mine was set back to automatic instead of Automatic delayed start. Anyway, something else to keep an eye on when testing :)
 

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
25,041
Reaction score
48,823
Location
USA
So does that mean that Ken has added some functionality to modify the models listbox contents, as opposed to the listbox being populated automatically when Blue Iris starts? (And you could do nothing to change it?)
Interesting. I'll have to look at that.
No, if running CodeProject, because CodeProject runs as a service and the models are already defined, this area is greyed out on that page and why you can't access it.

This option is only available because those running DeepStack have to tell BI which custom models they have, so if you were running DeepStack, this area isn't greyed out.

At some point, some future update to BI will break the ability for DeepStack to work, at which point this box and the box to autostart will disappear as those are only for DeepStack and not Code Project.
 
Top