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.25.tar.gz (98.2 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.25-py3-none-any.whl (108.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pascal_voc_tools-0.1.25.tar.gz
  • Upload date:
  • Size: 98.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

File hashes

Hashes for pascal_voc_tools-0.1.25.tar.gz
Algorithm Hash digest
SHA256 0c30417cec7e2d2a6f6c91df0448fe42a83e141184214ff0e74ff0469cc2854b
MD5 1457958c09b5342e14baf5e035884316
BLAKE2b-256 16a7971fa5762b129c0d374383443f933219805c2d963272440073cd3cb1a980

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pascal_voc_tools-0.1.25-py3-none-any.whl
  • Upload date:
  • Size: 108.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

File hashes

Hashes for pascal_voc_tools-0.1.25-py3-none-any.whl
Algorithm Hash digest
SHA256 04cc65dcd6992175cdaa2088aa54d70220fa62a66ae317c54d7e4d2167b181a9
MD5 0d8a8244ad4429c136f1219d21708a4b
BLAKE2b-256 48af527c90ca7f40fb340d4c89cfee15007b632f5af821cad5a9bec6f6043a12

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