depthai-core icon indicating copy to clipboard operation
depthai-core copied to clipboard

[BUG] incorrect spatial location for yolov8 detections when using depthai-core

Open SeokHyunAhn opened this issue 9 months ago • 1 comments

Bug: Incorrect spatial location for YOLOv8 detections

Hello, I am using a Jetson AGX Orin and OAK-D PRO PoE.

I am conducting object detection and depth measurement experiments using both Python and C++.

I customized the spatial_tiny_yolo.py and spatial_tiny_yolo.cpp code from examples/spatialdetection, modifying the blob file to yolov8n_coco_640x352.blob and setting the preview size to (640, 352).

When running the Python script, the spatial location measurements were relatively accurate. However, under the same conditions, when running the C++ built program, the depth measurement performance was inconsistent and incorrect.

Comparison of actual vs. measured depth values:

Image

For example, within the range 5.6m to 6.8m, no matter how I moved the object, the measured depth remained 7.469m.

Question:

Is there any difference between the way depth is measured in the Python and C++ APIs?

Any guidance on this issue would be appreciated. Thank you!

SeokHyunAhn avatar Mar 18 '25 09:03 SeokHyunAhn

@jakaskerl would you mind helping out here? There's no difference between the C++ and Python, as Python API sits on top of the C++ one, so it's likely something is different between the examples. Perhaps one has subpixel enabled and the other doesn't or something similar.

moratom avatar Mar 20 '25 13:03 moratom