Excessive CPU load with newer versions than 5.8.6.7 version of BI

Gyula614

Young grasshopper
Joined
Mar 28, 2023
Messages
60
Reaction score
10
Location
Hungary
If you go down to D1 on your sub streams you will see a massive improvement. If you are running your substeams at 1MP/2MP then why have substreams turned on at all? Might as well disable them and just use a single stream.
Thanks, will try D1 or 640*480 whichever is available on the camera. full resolution at high fps/bit rate must be used for identification. 3 streams are ideal I think because phone apps can use a low bit-rate low resolution secondary and AI can use a high bit rate fixed res. third.
 

Gyula614

Young grasshopper
Joined
Mar 28, 2023
Messages
60
Reaction score
10
Location
Hungary
Just did an experimental test with CP AI Benchmark tab. Got an image from the web:


Rescaled that to various sizes: 4k, 2k, 1280, 720, 640, 320, 160 wide images and provided them to the AI benchmark.
Then checked the resulting detection %, FPS and CPU load.
  • Detection % of the person on the 160 wide was less by 10% (68 %) than on the others. Others (320 ... 4k) had the same 78-79 %).
  • FPS from 160 to 720 width was pretty much the same. Above 720 it was in inverse proportion to the width.
  • CPU load was around 10 % up to 720. Above 720 it rose to 40 % at 4k. It may be due to CPU-based downscaling to AI input.

From these I think it seems that:
  • Anything above 720 width has no advantage (as the CPU downscales anyway, not the AI is that processes...) in detection accuracy.
  • Anything above 720 significantly prolonges AI detection time (CPU time may be added) and loads the CPU, hence also requires more power and generates more heat.

It's good to know for AI detection. I wanted to see it for sure.
 

Gyula614

Young grasshopper
Joined
Mar 28, 2023
Messages
60
Reaction score
10
Location
Hungary
However now both YoloV5 and YoloV8 give much more false positive detections, in CP AI 2.6.2 than it was in 2.0.8.
So will revert to 2.0.8 tomorrow. Later version should be better I thought but it seems that it has kind of reached its limits by many reasons.
 

tofu

Getting the hang of it
Joined
May 3, 2019
Messages
117
Reaction score
74
Location
NYC
I have the same issue with the same version number of BI. Running latest cpai--

Idle is 5%, but when motion hits I spike to 100%. Issue is not present on 5.8.6.7.

If I turn off ai, the issue is not present.

On 5.8.6.7 and below, motion rarely brings CPU usage above 10-12%, even with AI enabled and functioning correctly.
 

wpiman

Pulling my weight
Joined
Jul 16, 2018
Messages
337
Reaction score
246
Location
massachusetts
I noticed my AI MQTT messages changed after an upgrade. I rolled back to 5.8.7.1 and the messages are working as I expect.

Rolled BACK to 5.8.7.1... The message are coming in as intended. Shows me the direction....


5/15/2024 11:31:03 AM
Plate detected: 4986ZH Probability: 98% MOTION TYPE Motion_C>D
5/15/2024 11:23:35 AM
Plate detected: 3KMH56 Probability: 100% MOTION TYPE Motion_D>C

This is my log BEFORE the rollback.... It is reporting motion within the zones....

5/15/2024 9:55:02 AM
Plate detected: 1FCJ27 Probability: 100% MOTION TYPE Motion_ABC
5/15/2024 9:50:22 AM
Plate detected: 4BJG68 Probability: 99% MOTION TYPE Motion_ABC
 

tofu

Getting the hang of it
Joined
May 3, 2019
Messages
117
Reaction score
74
Location
NYC
I narrowed the high CPU usage down to when it sends images to the cpai server

Less images are less cpu usage

It has nothing to do with cpai because the issue persists even if I kill the cpai service.

Image burn in, static objects, time between images, "on alert" function -- all had no noticeable effect whether disabled or enabled

This is only a problem post 5.8.6.7
 
Top