如何将JSON数据转换为Pascal VOC格式?

时间:2018-10-24 11:42:33

标签: json

我想将JSON数据转换为Pascal VOC格式。

这是我的json文件格式:

[
{
"Frame_count":1,
output:[
{
"Objects_classname":"car1",
"x_val":313.52719,
"y_val":325.85834,
"width":210.02463,
"height":201.64935
},

{
"Objects_classname":"person1",
"x_val":992.84949,
"y_val":277.18243,
"width":64.80127,
"height":210.47083
},

],
"Total_objects_detected":2,
}
]

我想上面的json数据需要转换成Pascal_VOC格式。 这里x_val表示xmin,y_val表示ymin&xmin + width类似地为xmax,ymin + height为ymax。和pascal_VOC中的其他数据,例如

pose = unspecified,
truncated = 0
folder and filename,path will be any junk data.
database = unknown
size of frame = 1280 * 720
segmented = 0
name = class name from json file
difficult = 0

0 个答案:

没有答案