DeepStream-Yolo
DeepStream-Yolo copied to clipboard
Is there a way to obtain the coordinates of the bounding box
I used yolov5 to train a model for recognizing icons. I want to know how to get the specific coordinate position (X,Y coordinate) of the bounding box
Maybe you can edit ./nvdsinfer_custom_impl_Yolo/nvdsparsebbox_Yolo.cpp
If one wants to redraw the boxes in another way or to draw polygons on the frame, Is there any way to do that ??
https://github.com/NVIDIA-AI-IOT/deepstream_python_apps
you can add the following lines to all_bbox_generated function in deepstream_app_main.c, then compile the file and copy the new bin file to the bin folder.
float left = (float)obj->rect_params.left;
float top = (float)obj->rect_params.top;
float width = (float)obj->rect_params.width;
float height = (float)obj->rect_params.height;
g_print("Object ID: %d\n", obj->object_id);
g_print("Class ID: %d\n", obj->class_id);
g_print("Bounding Box (Left, Top, Width, Height): %.2f, %.2f, %.2f, %.2f\n", left, top, width, height);