Why is the bounding box is empty

In our implementation, with C++, we are seeing many cases where the bounding box is empty. When this problem starts happening, every other grab of the image results in an empty bounding box, with a null Z value.

What is the best way to find out why the bounding box is null?

ZED Model : ZED 2i
ZED SDK Version : 4.2.5

Here is a snippet of the code:

for (auto obj : mObjects.object_list)
{
if (obj.position.z < minZ || obj.position.z > maxZ)
{
if (verboseLog)
{
spdlog::info(“Object Z value is {}”, obj.position.z);
}
continue;
}
if (obj.confidence < minConfidence)
{
if (verboseLog)
{
spdlog::info(“Object confidence is {}”, obj.confidence);
}
continue;
}
if (obj.id < 0)
{
if (verboseLog)
{
spdlog::info(“Object ID {}”, obj.id);
}
continue;
}

    if (obj.bounding_box.empty())
    {
        spdlog::info("Object bounding_box is empty");
    }
    if (obj.bounding_box_2d.empty())
    {
        spdlog::info("Object bounding_box_2d is empty");
    }

   if (!obj.bounding_box.empty())
    {
        // Where the target is going to be in the next frame
        float nextMinX = obj.bounding_box[0].x + static_cast<float>(msDelay) / 1000 * obj.velocity.x;
        float nextMaxX = obj.bounding_box[3].x + static_cast<float>(msDelay) / 1000 * obj.velocity.x;

        float width = obj.bounding_box_2d[2].x - obj.bounding_box_2d[0].x;
        float height = obj.bounding_box_2d[2].y - obj.bounding_box_2d[0].y;

/////////////////////

Hi @gimudia,

Thank you for reaching us ! To be sure to understand well your issue, while using the Object Detection, you often get an empty bounding box and then the corresponding object always has an empty bounding box, is it right ? Does it concern the obj.bounding_box or obj.bounding_box_2d or both ?

Have you already tried to run this sample zed-sdk/object detection/birds eye viewer at master · stereolabs/zed-sdk · GitHub to test if it gives you non-empty bounding boxes ?

Also, we fixed things in the latest releases, if it is possible for you to update your setup with the SDK release 5.0, I strongly recommend you to do it: ZED SDK 5.0 - Download | Stereolabs

Best regards,