Skip to main content

Tools for creating and manipulating computer vision datasets

Project description

cvdata

Tools for creating and manipulating computer vision datasets

OpenImages

To download various image classes from OpenImages use the script cvdata/openimages.py. This script currently only supports writing annotations in PASCAL VOC format. For example:

$ python cvdata/openimages.py --label Handgun Shotgun Rifle --exclusions /home/james/git/cvdata/exclusions/exclusions_weapons.txt --base_dir /data/cvdata/weapons --format pascal

The above will save each image class in a separate subdirectory under the base directory, with images in a subdirectory named "images" and the PASCAL VOC format annotations in a subdirectory named "pascal".

Rename annotation labels

In order to rename the image class labels of annotations use the script cvdata/visualize.py. This script currently supports annotations in KITTI (.txt) and PASCAL VOC (.xml) formats. It is used to replace the label name for all annotation files of the specified format in the specified directory. For example:

$ python rename.py --labels_dir /data/cvdata/pascal --old handgun --new firearm --format pascal

Visualize annotations

In order to visualize images and corresponding annotations use the script cvdata/visualize.py. This script currently supports annotations in COCO (.json), Darknet (.txt), KITTI (.txt), and PASCAL VOC (.xml) formats. It will display bounding boxes and labels for all images/annotations in the specified images and annotations directories. For example:

$ python cvdata/visualize.py --format pascal --images_dir /data/weapons/images --annotations_dir /data/weapons/pascal

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

cvdata-0.0.1.tar.gz (24.2 kB view hashes)

Uploaded Source

Built Distribution

cvdata-0.0.1-py3-none-any.whl (32.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page