从pascalvoc xml文件的边界框中剪切图像的工具。
pascalvoc-to-image的Python项目详细描述
pascalvoc到图像
这个存储库包含一个python脚本,可以轻松地从带注释的pascalvoc图像中剪切图像。它将:
- 读取包含xmls的目录
- 将xmls解析为可读格式
- 在单独的文件夹中为所有创建的边界框创建图像
用法
使用脚本非常简单,因为它只有三个参数。
usage: pascalvoc-to-image [-h] pascalDirectory imageDirectory saveDirectory
positional arguments:
pascalDirectory A path to the directory with Pascal VOC XML files
imageDirectory A path to the directory with images
saveDirectory A path to the directory to save Pascal boundingbox images to
optional arguments:
-h, --help show this help message and exit
安装
点
$ pip install pascalvoc-to-image
手动
$ git clone https://www.gitlab.com/jdreg95/pascalvoc-to-image.git
$ cd pascalvoc-to-image
$ sudo pip install .