Strange loss of Code Project AI custom models

toastie

Getting comfortable
Joined
Sep 30, 2018
Messages
254
Reaction score
82
Location
UK
Here BI is on 5.7.3.0 and Code Project AI on 2.0.8.0, it's all been working OK until I noticed this afternoon that there were no Alert clips showing, none since 5.55am this morning. We've been out this morning doing some shopping so I hadn't noticed.
I could see plenty in All clips that were made this morning by our movements outside, along with parcels being delivered when we were away.

First I did a Database Repair/Regenerate, this didn't reveal any missed Alerts. I then noticed in the Global Settings AI tab that to the right of the ticked box, Use custom models, it was empty. I temporarily upgraded BI to 5.7.4.1 which repopulated the previously empty box with the custom models, and Alerts were back being created. I could see my neighbor putting out his trash for the men tomorrow.

How could there be a deletion of AI settings. All Clips were still being created, I could see our parcels being delivered when we were out. I've gone back to BI 5.7.3.0 and it's all working as expected.
Compact/Repair DB happens at 2am, no power cuts, no router issue (nothing in the log), the cameras don't go through the router to the BI PC anyway. There are no storage issues, there's loads of free space on the HD and it all goes to the New folder. I just record Triggers and Alerts not continuous, I have a separate NVR for that.
It could be a one off issue, we'll see. Approaching this from a suspicious aspect, could this in any way represent a hack?
 

toastie

Getting comfortable
Joined
Sep 30, 2018
Messages
254
Reaction score
82
Location
UK
It's sort of happened again, a couple of days ago before bed I upgraded Code Project from 2.0.8.0 to 2.1.8.0 and then noticed next day that I had no fresh Alerts. In BI Global settings AI tab there was nothing in the "Use custom models" box. I made no progress reinstalling 2.1.8.0 or updating BI, so I uninstalled 2.1.8.0 and went back to 2.0.8.0 which repopulated the Use customs models box. It's all working again, Alert clips are back that is.

I'm a bit reluctant to upgrade to a Beta version of Code project in future. In Bi I usually only install the latest critical or highly stable update.
 
Joined
Oct 28, 2022
Messages
2
Reaction score
1
Location
Norway
I had the custom models disappear every time I had to reboot the PC. When BI started after reboot the custom models would be missing, and I had to stop and restart BI/Code Project AI services in the right order(do not remember what order that was) for them to be detected. I solved it by switching off the setting to let BI control the Code Project AI service, and setting BI-service to "Automatic (Delayed Start)" and Code Project AI-serivce to "Automatic".
Before the change I also lost the custom modes sometimes on service-restarts, and I guess that is what you are experiencing.
 
Joined
Mar 10, 2021
Messages
10
Reaction score
4
Location
US
I have been going nuts with this issue for some time now. I have tried all sort of fixes and the models just randomly show up when they want to. This mostly happens on new loads and once I can get them to show up it seems fine, but I can't figure out what triggers them to show. I did notice that the systems that show the models have a custom-models folder in the program files folder under the modules directory (see second screenshot). The systems that have this issue are missing these files (see third screenshot). I guess the answer is, when do these files get created/downloaded by CodeProject? During installation? And if they are missing, why are they missing?

I also found this article which I have yet to dive into, but may shed some light on the subject if there is a mismatch on folders BI is looking for.

Screenshot 2023-06-09 212504.png
Screenshot 2023-06-09 212726.png
Screenshot 2023-06-09 215255.png
 
Joined
Jun 14, 2023
Messages
2
Reaction score
0
Location
Atlanta
I have been going nuts with this issue for some time now. I have tried all sort of fixes and the models just randomly show up when they want to. This mostly happens on new loads and once I can get them to show up it seems fine, but I can't figure out what triggers them to show. I did notice that the systems that show the models have a custom-models folder in the program files folder under the modules directory (see second screenshot). The systems that have this issue are missing these files (see third screenshot). I guess the answer is, when do these files get created/downloaded by CodeProject? During installation? And if they are missing, why are they missing? soccer random

I also found this article which I have yet to dive into, but may shed some light on the subject if there is a mismatch on folders BI is looking for.

View attachment 165254
View attachment 165255
View attachment 165258
Detailed and easy to perform command operations
 

mcnugget

n3wb
Joined
Feb 8, 2016
Messages
5
Reaction score
0
I have been going nuts with this issue for some time now. I have tried all sort of fixes and the models just randomly show up when they want to. This mostly happens on new loads and once I can get them to show up it seems fine, but I can't figure out what triggers them to show. I did notice that the systems that show the models have a custom-models folder in the program files folder under the modules directory (see second screenshot). The systems that have this issue are missing these files (see third screenshot). I guess the answer is, when do these files get created/downloaded by CodeProject? During installation? And if they are missing, why are they missing?

I also found this article which I have yet to dive into, but may shed some light on the subject if there is a mismatch on folders BI is looking for.

View attachment 165254
View attachment 165255
View attachment 165258
Any luck with this? Having the same, but it seems like the restarting the cpai sometimes works with a delayed population of the models box. But mostly painful
 
Joined
Mar 10, 2021
Messages
10
Reaction score
4
Location
US
I haven't. I got mine working and they have been stable. I have really only seen this on new installs. I did go into CodeProject and uninstall and reinstall the modules I was using. I think it does the downloads sometime during that process.
 

Tinman

Known around here
Joined
Nov 2, 2015
Messages
1,213
Reaction score
1,481
Location
USA
I would run BI 5.7.7.18 (latest) and CPAI 2.1.9 (latest). They both have addressed timing issues and I have run 2.1.9 for a couple months now with zero issues. CPU mode using Yolov5.NET
 

kzaoaai

n3wb
Joined
Nov 3, 2019
Messages
5
Reaction score
0
I haven't. I got mine working and they have been stable. I have really only seen this on new installs. I did go into CodeProject and uninstall and reinstall the modules I was using. I think it does the downloads sometime during that process.
Maybe it's specific to CUDA, but this is the only way it worked for me.
 

bug99

Pulling my weight
Joined
Dec 27, 2016
Messages
397
Reaction score
154
maybe this applies, maybe not. What worked for me was: making sure that one custom module (only one and none were blank) was selected for each camera that was to use AI, and only one Object detection module was running (status tab), and then restart the AI service (or the BI server with AI on it).
 

Krazzz

n3wb
Joined
Dec 4, 2023
Messages
6
Reaction score
1
Location
USA
I realize that this is an old thread but I am hoping that it has gone quiet because you are no longer having the issues. I have BI version 5.8.1.5 and CPAI 2.3.4.0. I have the following to get the custom models to load:

1. Reboot PC
2. Uncheck Custom Model, close BI, Open BI, Check Custom Models.
3. Start/Stop CPAI through BI
4. Set BI to delayed start, CPAI to Automatic (not controlled by BI)
5. Uninstalled/Reinstalled Modules
6. Uninstalled/Reinstalled CPAI


AI.jpg
 

jrbeddow

Getting comfortable
Joined
Oct 26, 2021
Messages
374
Reaction score
489
Location
USA
I realize that this is an old thread but I am hoping that it has gone quiet because you are no longer having the issues. I have BI version 5.8.1.5 and CPAI 2.3.4.0. I have the following to get the custom models to load:

1. Reboot PC
2. Uncheck Custom Model, close BI, Open BI, Check Custom Models.
3. Start/Stop CPAI through BI
4. Set BI to delayed start, CPAI to Automatic (not controlled by BI)
5. Uninstalled/Reinstalled Modules
6. Uninstalled/Reinstalled CPAI


View attachment 180702
I don't think you can simultaneously run the "Default object detection" with the "Custom models", at least it is not recommended, if technically possible.

Try unchecking the "Default object detection", then see if you can use the Custom models.
 

Krazzz

n3wb
Joined
Dec 4, 2023
Messages
6
Reaction score
1
Location
USA
I unchecked all of the boxes and then tried just the Custom Models and nothing worked.
 

jrbeddow

Getting comfortable
Joined
Oct 26, 2021
Messages
374
Reaction score
489
Location
USA
I unchecked all of the boxes and then tried just the Custom Models and nothing worked.
Perhaps try after a reboot. If no luck there, disable the main tab "use AI server" checkbox, then another reboot, then try again. If still no luck, disable the AI again, uninstall CPAI, delete the recommended directories, reboot, re-install CPAI, reboot, wait 15-30 minutes for the installation to truly complete, then try again.

Have you also made sure that you aren't trying to run two "competing" versions of object detection modules within CPAI (that NEVER works): ie: either the .NET version or one of the CUDA versions, not both simultaneously.
 
Top