Hello,
I have a minor question about VPU and CPU usage while using OAK-D camera. When the code part starts with:

with dai.Device() as device:

device.startPipeline(pipeline)

after this, is everything being processed in VPU of the Camera?

Also, [system] [info] Cpu Usage - LeonOS 21.57%, LeonRT: 4.04%
gives the continuous VPU usage after the initialization of dai.Device with "with" ? I am trying to understand if I define a function inside "with", wondering if this function will be called by VPU of the camera instead of the CPU of the host computer.

Thanks in advance!
Bests
Cem

    Uce
    If you define a function inside the with block, it will not be executed by the VPU. The VPU only executes tasks that are part of the pipeline. Any Python code you write, including functions, will be executed by the CPU of the host computer.

    The CPU usage information you see (Cpu Usage - LeonOS 21.57%, LeonRT: 4.04%) refers to the usage of the two Leon cores on the Myriad X VPU. The Myriad X VPU has two Leon cores: LeonOS and LeonRT. LeonOS handles tasks like device initialization, pipeline setup, and communication with the host. LeonRT is responsible for real-time tasks like managing the data flow between different hardware blocks on the Myriad X.

    Thanks,
    Jaka

    • Uce likes this.