No project description provided
Project description
xml2arr
Extract bounding boxes from XML format.
Instalation
pip install xml2arr
Usage
from xml2arr import extract, extract_to_file
XML_PATH = "/path/to/xml/exmaple.xml"
# Result as a python list
result = extract(XML_PATH)
# Saved to output file
OUT_PATH = "/path/to/output"
extract_to_file(XML_PATH, OUT_PATH)
Input
XML structure:
<annotation>
<folder>painted_nails</folder>
<filename>n3.png</filename>
<path>C:/Users/username/img/n3.png</path>
<source>
<database>Unknown</database>
</source>
<size>
<width>0</width>
<height>0</height>
<depth>3</depth>
</size>
<segmented>0</segmented>
<object>
<name>no</name>
<pose>Unspecified</pose>
<truncated>0</truncated>
<difficult>0</difficult>
<bndbox>
<xmin>46</xmin>
<ymin>294</ymin>
<xmax>354</xmax>
<ymax>718</ymax>
</bndbox>
</object>
<annotation>
Output
Expected output, can be saved to file or returned as a list:
[[46, 294, 354, 718]]
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
xml2arr-0.1.tar.gz
(6.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
xml2arr-0.1-py3-none-any.whl
(6.6 kB
view details)
File details
Details for the file xml2arr-0.1.tar.gz.
File metadata
- Download URL: xml2arr-0.1.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8058924f790b8d3439c3b13f3016031e2004c960ef8c3154b0770a3c30344fb7
|
|
| MD5 |
6189b105c9f01c1ddbd2550e0311a91c
|
|
| BLAKE2b-256 |
562bb20b4cff8e6649fb46983884cc9efca466bf060c7a111e04472893bca0a7
|
File details
Details for the file xml2arr-0.1-py3-none-any.whl.
File metadata
- Download URL: xml2arr-0.1-py3-none-any.whl
- Upload date:
- Size: 6.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9b1232748208797bd7bf4006e7ec470e803b8d3c0535f082e6e6b78218ce2e81
|
|
| MD5 |
6c48be44a90652c6d55580700fd488c9
|
|
| BLAKE2b-256 |
ab7b2756189c37256af2381279cb9a41fa57d99dafa29c53b3787e361478ba87
|