Yarrow Format parsing lib
Project description
Yarrow: a data format for computer vision
What is it ?
yarrow is a python package to parse, manipulate and serialize data following the yarrow data schema. This format is oriented around computer vision data and is heavily inspired by the COCO dataset format and was initially developed and used in Michelin projects.
The full description can be found here with the rules on how to fill different fields.
How to install
pip install yarrowformat
Install it locally
make setup
source .venv/bin/activate
How to use
You can find multiple examples in the examples directory and the package API in the documentation (still WIP). Here are a few examples.
import json
from yarrow import YarrowDataset
# say you have a yarrow file at path
file_path = "path/to/file.yarrow.json"
yar_set = YarrowDataset.parse_file(file_path)
# You now have a YarrowDataset !
# Add annotations
annot = Annotation(...) # see documentation for parameters
yar_set.add_annotation(annot)
# now save it somewhere else
with open("path/to/other/file.yarrow.json", "w") as fp:
json.dump(yar_set.pydantic().model_dump(exclude_none=True), fp, default=str)
Format explanation
License
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
yarrowformat-2.1.2.tar.gz
(35.9 kB
view details)
Built Distribution
File details
Details for the file yarrowformat-2.1.2.tar.gz
.
File metadata
- Download URL: yarrowformat-2.1.2.tar.gz
- Upload date:
- Size: 35.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4e2e84ec5a2ea7683faea89539636a2321024ca37195e656f5b20c9045b0ce5d |
|
MD5 | ed4e9e879470fe2a21b2e1145e42d28c |
|
BLAKE2b-256 | c2d7fc343575b4cef442d8c95c8c0f3ee0b6b0b32cd5e533c147b8f9e5853262 |
File details
Details for the file yarrowformat-2.1.2-py3-none-any.whl
.
File metadata
- Download URL: yarrowformat-2.1.2-py3-none-any.whl
- Upload date:
- Size: 21.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 48d3886fedbe289c65dbe64656057e4f93f9c57214a221d80d604ca7a083cf11 |
|
MD5 | 4177682d20fb3c9b825fd9955fb72ccb |
|
BLAKE2b-256 | 8e5f72a3f978953f31ed831f02119acd4aae594ed6c04ae1438d69c9978c76ee |