以pascal voc格式创建图像注释xml文件
pascal-voc-writer的Python项目详细描述
此库可用于在pascal voc中创建图像注释xml文件 文件格式。
安装
pip install pascal-voc-writer
使用
# Writer(path, width, height)
writer = Writer(‘path/to/img.jpg’, 800, 400)
# ::addObject(name, xmin, ymin, xmax, ymax)
writer.addObject(‘cat’, 100, 100, 200, 200)
# ::save(path)
writer.save(‘path/to/img.xml’)