CPAI confirm times roughly doubled when "Default object detection" is unchecked in BI...

truglo

Pulling my weight
Joined
Jun 28, 2017
Messages
275
Reaction score
103
The past few weeks I have been running BI with "Default object detection" enabled (checkbox in BI ai main settings page). All of my cameras have "objects:0" in their custom model list, along with ipcam-combined, license-plate, and delivery (depending on the camera's role). With these settings, cpai confirm times average 300msec for most of the cams, with my lpr taking ~500-600msec (since it's also doing plates/deliveries).

Today I decided to play with disabling "Default object detection" in the main settings, together with removing "objects:0" from all of my cameras. After doing this and rebooting, cpai would not start with Bi despite that checkbox being enabled. I manually started cpai using the button in BI settings, and it appeared to function, including restarting properly after further reboots. This part seems workable, but wanted to mention in case it helps. The non-workable part showed up when I started getting triggers. I noticed a huge increase in confirm times... like at least doubled! Now my fastest confirm was no less than 600msec, and my lpr was taking like 1000-2000msec! I verified in BI ai explorer that nothing funny was going on... everything seemed OK except the confirm times were huge.

So I experimented further... I went back to my previous settings, and confirm times went back down. I redid the changes again, and the confirm times went back up. So this seems very repeatable. I have no GPU just intel 3570 w/8gb. Has anyone else observed this behavior? Is there anything else I can test to help devs fix it?

[edit: I just noticed when I switch back to my original "faster" config, cpai does not restart properly on the first reboot either. So the reboot/cpai restart problem appears to happen whenever default object detection is changed. Upon first reboot after changing this setting, the BI ai settings page shows the button "stop now". AI does not function (timeout 0ms), but the cpai webui shows the server available (but 0 confirms and no response to BI triggers). To get it working normally again, I have to hit stop now, wait a minute, hit start, and a minute later it works (and will survive a reboot afterwards).]
 
Last edited:

MikeLud1

IPCT Contributor
Joined
Apr 5, 2017
Messages
2,219
Reaction score
4,264
Location
Brooklyn, NY
The past few weeks I have been running BI with "Default object detection" enabled (checkbox in BI ai main settings page). All of my cameras have "objects:0" in their custom model list, along with ipcam-combined, license-plate, and delivery (depending on the camera's role). With these settings, cpai confirm times average 300msec for most of the cams, with my lpr taking ~500-600msec (since it's also doing plates/deliveries).

Today I decided to play with disabling "Default object detection" in the main settings, together with removing "objects:0" from all of my cameras. After doing this and rebooting, cpai would not start with Bi despite that checkbox being enabled. I manually started cpai using the button in BI settings, and it appeared to function, including restarting properly after further reboots. This part seems workable, but wanted to mention in case it helps. The non-workable part showed up when I started getting triggers. I noticed a huge increase in confirm times... like at least doubled! Now my fastest confirm was no less than 600msec, and my lpr was taking like 1000-2000msec! I verified in BI ai explorer that nothing funny was going on... everything seemed OK except the confirm times were huge.

So I experimented further... I went back to my previous settings, and confirm times went back down. I redid the changes again, and the confirm times went back up. So this seems very repeatable. I have no GPU just intel 3570 w/8gb. Has anyone else observed this behavior? Is there anything else I can test to help devs fix it?

[edit: I just noticed when I switch back to my original "faster" config, cpai does not restart properly on the first reboot either. So the reboot/cpai restart problem appears to happen whenever default object detection is changed. Upon first reboot after changing this setting, the BI ai settings page shows the button "stop now". AI does not function (timeout 0ms), but the cpai webui shows the server available (but 0 confirms and no response to BI triggers). To get it working normally again, I have to hit stop now, wait a minute, hit start, and a minute later it works (and will survive a reboot afterwards).]
The first time a model is used after restarting CodeProject.AI it will be slow because it needs to load the model into memory. Once loaded into memory speeds will drop.
 

truglo

Pulling my weight
Joined
Jun 28, 2017
Messages
275
Reaction score
103
What version of BI?
5.6.7.3, which I believe is the latest release. CPAI is 1.6.8, which is also I think the latest release.

The first time a model is used after restarting CodeProject.AI it will be slow because it needs to load the model into memory. Once loaded into memory speeds will drop.
This must have been it. I played more and observed memory go from 25% right after a reboot, to 38% after all of the models have been used. After the models were used a few times, confirm times drop to normal in both cases. From now on I'll wait for a few triggers before making an assesment.
 
Top