Pascal VOC格式的边界框注释

时间:2018-04-26 13:58:56

标签: amazon-web-services bounding-box

我想使用Faster-RCNN方法在Tensorflow中进行对象检测。

我计划使用Amazon Mechanical Turk众包来获取注释。但是,有没有人知道是否有任何支持mturk的边界框注释工具并以Pascal VOC格式在xml文件中输出注释。

1 个答案:

答案 0 :(得分:0)

这里是详细的文档和源代码: https://github.com/trinath503/Python/tree/master/Generate_Pascal_VOC_Files

注意:您需要以指定的格式传递数据

pascal_voc_data = '''
    [
        {
            "folder":"folder",
            "filename": "1.jpg",
            "path":"path",
            "source":{"database":"database"},
            "size":{"width":256,"height":256,"depth":3},
            "segmented":0,
            "objects":[{"name":"name","pose":"pose","truncated":"truncated","occluded":"occluded","bndbox":{"xmin":3,"xmax":33,"ymin":3,"ymax":33}},{"name":"name","pose":"pose","truncated":"truncated","occluded":"occluded","bndbox":{"xmin":3,"xmax":33,"ymin":3,"ymax":33}}]
        },
        {
            "folder":"folder",
            "filename": "2.jpg",
            "path":"path",
            "source":{"database":"database"},
            "size":{"width":256,"height":256,"depth":3},
            "segmented":0,
            "objects":[{"name":"name","pose":"pose","truncated":"truncated","occluded":"occluded","bndbox":{"xmin":3,"xmax":33,"ymin":3,"ymax":33}},{"name":"name","pose":"pose","truncated":"truncated","occluded":"occluded","bndbox":{"xmin":3,"xmax":33,"ymin":3,"ymax":33}}]
        }
    ]
'''