Skip to main content

Tool to cut images from bounding boxes in PascalVOC XML files.

Project description


This repository contains a Python script that can easily cut images from annotated PascalVOC images. It will:

  • Read the directory containing the XMLs
  • Parse the XMLs to a readable format
  • Create images for all created bounding boxes in a separate folder


Using the script is pretty simple, since it only has three parameters.

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
$ cd pascalvoc-to-image
$ sudo pip install .

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pascalvoc_to_image-1.0.0.tar.gz (3.3 kB view hashes)

Uploaded source

Built Distribution

pascalvoc_to_image-1.0.0-py3-none-any.whl (3.8 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page