我想将一个注释转换为另一个注释。我想将此(下面是SUN RGB-D数据集)转换为VGG注释器格式。
....{'polygon': [{'x': [324, 838, 818, 336],
'y': [-3, -2, 70, 6],
'XYZ': [[-0.2739587426, -1.809480548, 3.58175683],
[2.69867897, -1.518897533, 3.017847061],
[2.525081635, -1.082973242, 2.948248625],
[-0.1911270916, -1.733556151, 3.550940037]],
'object': 16,
'annotator': '61.141.250.32'}]}
VGG注释格式的示例(这是来自Mask RCNN的气球示例):
{'name': 'polygon',
'all_points_x': [586, 510, 441, 389, 331, 268, 196, 158, 135, 156, 210, 307, 403, 437, 443, 425, 448, 481, 506, 513, 503, 511, 502, 583, 669, 755, 800, 811, 803, 784, 755, 717, 668, 620, 586],
'all_points_y': [133, 116, 115, 126, 149, 185, 261, 339, 438, 560, 664, 784, 868, 893, 929, 964, 964, 961, 965, 958, 936, 910, 896, 836, 752, 636, 538, 454, 392, 329, 270, 220, 175, 149, 133]},
'region_attributes': {}}}},
所以问题是,为什么一个人具有负值?如何处理它们?因为VGG格式中没有负值,所以我认为这是分割遮罩的遮罩从某个角度来看的像素数。