我如何将JSON VGG文件注释转换为YOLOv3注释格式?

问题描述 投票:-1回答:1

我目前正在使用YOLOv3对象检测器开发用于板检测的深度学习模型,我在1470张图像上使用了VGG图像注释器,并以JSON和CSV格式导出了它们:VGG annotation in JSON format

VGG annotation in CSV format

[您可以看到我使用了多边形和矩形,因为某些板的形状很尴尬,我尝试将它们转换为YOLOv3格式的注解,但是这样做很麻烦。

任何帮助将不胜感激。

deep-learning computer-vision data-annotations yolo
1个回答
0
投票
我知道的Yolo v3具有以下格式的注释:[classID, x_center, y_center, w, h],除了classID是一个整数外,其余所有四个数字都是分别由image_height (H)image_width (W)规范化的0和1之间的实数。因此,要获得[x_min, y_min, x_max, y_max],需要[]

    校正偏移量
  1. [x_0, y_0, x_1, y_1] = [x_center - w/2, y_center - h/2, x_center + w/2, y_center + h/2]
    应用尺寸
  • [x_min, y_min, x_max, y_max] = [x_0, y_0, x_1, y_1] \dot_product [W H W H]
  • © www.soinside.com 2019 - 2024. All rights reserved.