pythonmachine-learningyolobounding-boxyolov5

How to get bounding box labels and it's format in Yolo 3D


I have had implemented Yolo 3D model in my workspace, and it is working fine. I am getting an image as an output. So I would like to know where I can get the labels for my 3D bounding boxes. And I would even like know to the the format in which labels are stored is it.

x,y,x,y... format or x,y,z,x,y,z... format.

(Edit) I have implemented the Yolo 3D model: https://github.com/ruhyadi/YOLO3D

I downloaded the pretrained weights, and I have run the inference using:

python inference.py \
    --weights yolov5s.pt \
    --source eval/image_2 \
    --reg_weights weights/resnet18.pkl \
    --model_select resnet18 \
    --output_path runs/ \
    --show_result --save_result

Now in the runs folder, I am just getting a PNG image as an output. My output is:

enter image description here

Now I would like to even get the points for the 3D bounding boxes in this image, and I would even like to know the format in which those points are stored are they in x,y,x,y.. format or in x,y,z,x,y,z.. format?


Solution

  • Hello everyone so I have had found the solution of my question. There is a Math.py script in library folder. There is a function create_corners in Math.py, we can use this function in our inference.py script in order to get labels of 3d bounding boxes. And the format of our 3d bounding boxes is x,y,z,x,y,z... , it is mentioned in the Math.py script only.