Hello everyone on this forum. I had been emailing to support@luxonis for support and got suggested by Erik to ask for help here.

So I am trying to run yolov4_tiny pretrained on OAKD and detect distance of all the objects that are detected. I am using https://docs.luxonis.com/projects/api/en/latest/samples/SpatialDetection/spatial_tiny_yolo/ and the pretrained model suggested in there.

I am facing 3 issues:-

  1. The Bounding Boxes are overlapping too much and way too many false positives are there. I am attaching the images of the same.
    Changing the value of setIouThreshold from 0.1 to 0.9 make no changes to the same.
  2. The amount of jittering and movement of bounding boxes leading to different x,y,z corrdinates (spatial coordinates). (Unable to upload the vid )
  3. Disconnect of the OAK-D from the system with X_LINK_ERROR. Almost 3 times out of 10, the Camera is failing to connect and showing this error.
    ANy help will be appreciated
    Regards
    Sagar

    Hi sagargupta,

    Have you tried changing the yolo specific parameters in the script. I think the problem you are experiencing is related to incorrect anchor use. It seems to me that the preset parameters were optimally set for yolov3-tiny and therefore work great when testing on yolov3, despite it being a lighter and less complex model (24 layers as opposed to 38 on v4). I got pretty much the same result as you on v4.

    As for the disconnecting, ensure you are running the latest version of depthai. @erik might know more 🙂

    Hope this helps,
    Jaka

    Yes, this very much looks like incorrect achnors/masks. Please copy them from the json that tools.luxonis.com app provided.
    Thanks, Erik