You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In total, this pipeline consumes 15 SHAVE cores and 16 CMX slices. The pipeline is running an object detection model compiled for 6 SHAVE cores.
123
123
124
+
CPU usage
125
+
=========
126
+
127
+
When setting the :ref:`DepthAI debugging level` to debug (or lower), depthai will also print our CPU usage for LeonOS and LeonRT. CPU usage
128
+
at 100% (or close to it) can cause many undesirable effects, such as higher frame latency, lower FPS, and in some cases even firmware crash.
129
+
130
+
Compared to OAK USB cameras, OAK PoE cameras will have increased CPU consumption, as the networking stack is running on the LeonOS core. Besides
131
+
reducing pipeline (doing less processing), a good alternative is to reduce 3A FPS (ISP). This means that 3A algorithms (auto exposure, auto white balance
132
+
and auto focus) won't be run every frame, but every N frames. When updating DepthAI SDK's `camera_preview.py <https://github.com/luxonis/depthai/blob/main/depthai_sdk/examples/CameraComponent/camera_preview.py>`__
133
+
example (code change below), the LeonOS CPU usage decreased from 100% to ~46%:
134
+
135
+
.. code-block:: bash
136
+
137
+
# Without 3A FPS limit on OAK PoE camera:
138
+
Cpu Usage - LeonOS 99.99%, LeonRT: 6.91%
139
+
140
+
# Limiting 3A to 15 FPS on OAK PoE camera:
141
+
Cpu Usage - LeonOS 46.24%, LeonRT: 3.90%
142
+
143
+
Not having 100% CPU usage also drastically decreased frame latency, in the example for the script below it went from ~710 ms to ~110ms:
144
+
145
+
.. image::
146
+
147
+
.. code-block:: diff
148
+
149
+
from depthai_sdk import OakCamera
150
+
151
+
with OakCamera() as oak:
152
+
color = oak.create_camera('color')
153
+
left = oak.create_camera('left')
154
+
right = oak.create_camera('right')
155
+
156
+
+ # Limiting 3A to 15 FPS
157
+
+ for node in [color.node, left.node, right.node]:
0 commit comments