Skip to main content

some tools about pascal voc format dataset

Project description

Pascal VOC Tools

This package includes some tools about pascal voc format dataset like read xml, write xml, resize image.

XmlReader

from pascal_voc_tools import XmlReader

>>> xml_path = './test.xml'
>>> reader = XmlReader(xml_path)
>>> ann_dict = reader.load()

som functions for reading a xml file and geting data in it.

XmlWriter

from pascal_voc_tools import XmlWriter

>>> writer = XmlWriter(image_path, image_width, image_height, image_depth, database, segmented)
>>> writer.add_object(name, xmin, ymin, xmax, ymax, pose, truncated, difficult)
>>> writer.save(save_path)

Actually, if you have a dict have the format same as loaded dict from XmlReader, you can simply used like:

>>> writer = XmlWriter()
>>> writer.save(save_path, ann_dict)

DatasetResize

from pascal_voc_tools import DatasetResize

>>> resizer = DatasetResize(root_voc_dir, save_voc_dir)
>>> resizer.resize_dataset_by_min_size(min_size)
>>> resizer.copy_imagesets()  # if the file include

DataSplit

from pascal_voc_tools import DataSplit

>>> spliter = DataSplit(root_dir)
>>> result = spliter.split_by_rate(test_rate)
>>> spliter.save(result)

add Augmenter from https://github.com/Paperspace/DataAugmentationForObjectDetection

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

pascal_voc_tools-0.1.13.tar.gz (19.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pascal_voc_tools-0.1.13-py3-none-any.whl (26.4 kB view details)

Uploaded Python 3

File details

Details for the file pascal_voc_tools-0.1.13.tar.gz.

File metadata

  • Download URL: pascal_voc_tools-0.1.13.tar.gz
  • Upload date:
  • Size: 19.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.9.1 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.5.2

File hashes

Hashes for pascal_voc_tools-0.1.13.tar.gz
Algorithm Hash digest
SHA256 299f9f132c68dbef4928248734574ed51492ae0486ae49e237703a1d7dbb0a5f
MD5 37a634c2d612433417828e1ec65579d6
BLAKE2b-256 0f69722e42ad7fb50834aacc03f9dcffb4956cbec96623602838b294fa05a4a8

See more details on using hashes here.

File details

Details for the file pascal_voc_tools-0.1.13-py3-none-any.whl.

File metadata

  • Download URL: pascal_voc_tools-0.1.13-py3-none-any.whl
  • Upload date:
  • Size: 26.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.9.1 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.5.2

File hashes

Hashes for pascal_voc_tools-0.1.13-py3-none-any.whl
Algorithm Hash digest
SHA256 0b661a833d4f58d9a3192f9d72e61eca6bb014a08dc676e9966ed42972e8a2af
MD5 1bc9a6424ac16b26d4cba2e1c5346d5c
BLAKE2b-256 923fd447f008bbe2e460dbe20e3b9646d40ec1b19356189ecbbfa19c60af3f5a

See more details on using hashes here.

Supported by

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