• DepthAI
  • OAK-D PoE camera working very slowly and very laggy

Hi guys, this is my first time working on the projects like this but I usually work on web development (backend).

So I got the gen2-cumulative-object-counting project from the official sources GitHub page and custom-sized it a lot. The main purpose of my project is to count how many people entered and went out of the room, and should send the collected data every 5 minutes. I implemented these functions everthing is working fine but the streaming is so laggy and because of that not counting correctly. I'm using an OAK-D PoE camera for my project. This project is for production purposes. Please help me in advance, I need your help guys. Here's the basic understanding of the project if a person passes both green lines it should count +1 or -1

So why it's working so slowly? is there any optimizations I should do or do some testing? Every thing is working fine but so slow

the image is just for demonstration, Actual position of the camera will be above the door, so the camera now is upside looking to the floor

    Hi Fakhrullo
    Might it be the bandwidth requirements for the project that cause the low FPS?
    https://github.com/luxonis/depthai-experiments/tree/master/random-scripts#oak-bandwidth-test - check your network bandwidth to make sure you don't have a bottleneck somewhere that limits the throughput.
    Check the frame sizes and rate at which you are trying to send them via Ethernet. Perhaps it exceeds the available bandwidth resulting in laggy/slow execution.

    Thoughts?
    Jaka

      jakaskerl
      Hi there 🙂 as you told I checked all of them:
      OAK Bandwidth - Downlink 41.3 mbps | Uplink 29.6 mbps
      OAK Latency - Average latency 13.76 ms, Std: 20.9
      POE Test - speed: 1000 (OK), full duplex: 1 (OK), boot mode: 3 (OK)
      Blob Test - Inputs - Name: data, Type: DataType.U8F, Shape: [300, 300, 3, 1] (StorageOrder.NCHW) Outputs - Name: detection_out, Type: DataType.FP16, Shape: [7, 100, 1, 1] (StorageOrder.NCHW)
      and embedding_nn.setBlobPath(blobconverter.from_zoo(name="mobilenetv2_imagenet_embedder_224x224", zoo_type="depthai", shaves=6))
      is there anything incorrect?

        6 days later

        jakaskerl

        Hey Jaka, how r u doing? Sorry for the late response for some personal reasons I couldn't reply to you.

        It's connected to RassberyPi via wifi ethernet cable, I run the test on that machine and results are good,

        Bandwidth: Downlink = 647mbps, Uplink = 225mbps

        Latency: Average = 2.16ms, Std: 0.5

        I think there's no issue with latency or bandwidth, the problem could be there is somewhere bottleneck, what do you think bro?

          Hi Fakhrullo
          Object counting is partially run on the host (rpi in your case) so it could be that the rpi not capable enough for your modified code and which could introduce delays.

          Any chance you can add a MRE code here so we can potentially discover what the problem is?

          Thanks,
          Jaka