PASCAL VOC Writer

Install

pip install pascal-voc-writer

Use

from pascal_voc_writer import 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')

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章