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.