Why has CPIA slowed my detection times to ~30 seconds in BI?

cbm214

n3wb
Joined
Nov 15, 2021
Messages
12
Reaction score
0
Location
UK
I've had BlueIris running successfully for a year or so now, originally with DeepStack and more recently with CodeProject.AI. Here's the spec of the PC it's running on:

System Manufacturer: Dell Inc.
System Model: OptiPlex 7070
System Type: x64-based PC
Processor(s): 1 Processor(s) Installed.
[01]: Intel64 Family 6 Model 158 Stepping 10 GenuineIntel ~3000 Mhz
BIOS Version: Dell Inc. 1.10.0, 27/09/2021
Total Physical Memory: 16,166 MB


I updated BI to version 5.6.9.8 (from 5.6.6.1) and updated CPAI to 2.0.3 (from 1.6.8).

I now notice that detection speeds have gone from around 1 second for a single camera alert and around 16 seconds when 4/5 cameras are triggered at the same time, to around 6 seconds for a single camera alert and around 35 seconds for 4/5 cameras. I first noticed a problem when I saw multiple 'AI: timeout' messages in the BI log. I increased the AI timeout in BI to 40 seconds, this stops the timeouts but surely this is slow, 35 seconds for the AI to work, other people seem to be in the milliseconds/one or two seconds. it also feels like a way around the problem and not the fix. I do notice the CPU sits at 100% when multiple cameras are triggered, this won't help. It didn't do this will older versions of BI/CPAI. I don't have a NVidia card to run GPU on.

Part of BI log showing times
1 28/02/2023 15:52:29.386 BackDoor AI: Alert cancelled [AI: timeout] 38591ms
0 28/02/2023 15:52:29.478 Sheds AI: [Objects] person:93% [2970,783 3810,2144] 25896ms
0 28/02/2023 15:52:37.809 DiningDoor AI: [Objects] person:92% [528,398 1051,1572] 40179ms
0 28/02/2023 15:52:39.785 Kitchen AI: [Objects] person:91% [2042,183 2294,937] 32445ms
0 28/02/2023 15:52:39.785 Kitchen AI: [Objects] person:71% [1885,303 2048,573] 32445ms


When I look at the CodeProject webpage 127.0.0.1:32168 I can see I have the Face Processing and License Plate Reading module running. 'Object Detection (YOLOv5.6.2) is running, YOLOv5.NET is not enabled.

1677600941897.png

I'm not sure what I need to do to speed things up, something must be wrong somewhere I just don't know where.

One thought I've got is to use the custom models, in Deepstack days these were smaller than the default models, had less items to look for (like broccoli) so were quicker. With CPAI I'm not sure how to use these custom models in a hope this would speed things up. I'm looking for a HowTo on this, struggling with this too.

Any advice on how to make things as good if not better than before?

TIA
 

cbm214

n3wb
Joined
Nov 15, 2021
Messages
12
Reaction score
0
Location
UK
OK, a bit of an update. So I reduced detections time considerably by using the custom models. I've also reduced the number of '+ real-time images' from 10 to 5. I set the level to 10 when using Deepstack, CPAI seems to work just as well with 5. I've also changed the 'analyze one each:' to 750ms. Both of these settings is in the Artificial Intelligence button in each cameras 'Trigger' tab. Analysis time is around 500ms to 10 seconds now when multiple cameras are triggered at the same time.

Another bonus I've found that saves A LOT of CPU % when there's no trigger is to tick the option 'Limit decoding unless required' in the Video tab for each camera. When looking at a group of cameras, any movement is 'stepped', not fluid. When a camera is triggered then decoding takes place (as expected). Ticking this option has resulted in the CPU % averaging around 7% for 10 8MP cameras (well, one camera is 5MP) where as before it was around 25%.

Custom models work really well. So far everything works well, I just can't detect broccoli ;)
 
Top