2024-04-20 12:26:01 发布
网友
我正在寻找一个在线服务,允许我用边界框标注图像,我找到了labelbox,但边界框标签格式不同于我需要的格式,即yolo
这是一种格式:"bbox": { "top": 186, "left": 192, "height": 300, "width": 519 }
"bbox": { "top": 186, "left": 192, "height": 300, "width": 519 }
我需要的格式是x_center y_center width height,值也需要介于0和1之间
x_center y_center width height
bbox = {"top": 186, "left": 192, "height": 300, "width": 519} y1 = bbox["top"] x1 = bbox["left"] height = bbox["height"] width = bbox["width"] x2 = x1+width y2 = y1+height x_center = round((x1+x2)/2) y_center = round((y1+y2)/2) bbox_list = [x_center, y_center, width, height]
相关问题 更多 >
编程相关推荐