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
Release history Release notifications | RSS feed
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.27.tar.gz
(98.2 kB
view hashes)
Built Distribution
Close
Hashes for pascal_voc_tools-0.1.27-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 87a7ae87ba5b4e7f9482b8410628d5bcbdafe26893a512f5ed30372410cbd44b |
|
MD5 | c2ea444318f6cb0e8354f3cee776973a |
|
BLAKE2b-256 | 21a74b20f606aa9184b6e50d1c5c9764879dda386c719a511bbe6c1c5ebea5f4 |