Skip to main content

Yarrow Format parsing lib

Project description

Yarrow: a data format for computer vision


PyPI version Documentation Status Test and Deploy Code style: black Imports: isort

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

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().dict(), fp, default=str)

Format explanation

License

Apache 2.0

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

yarrowformat-2.0.0.tar.gz (36.7 kB view hashes)

Uploaded Source

Built Distribution

yarrowformat-2.0.0-py3-none-any.whl (21.7 kB view hashes)

Uploaded Python 3

Supported by

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