Annotation converter between different formats
Project description
DagsHub Annotation Converter
This package is intended to be a multi-type importer/exporter/converter between different annotation formats.
This package is currently in development and has not that many features implemented. The API is not stable and is subject to change.
Support Matrix for image annotations
Export > / Import V | YOLO v5+ BBox | YOLO v5+ Segmentation | Yolo Poses | COCO | DagsHub Datasource (Label Studio) | Label Studio | CVAT Image |
---|---|---|---|---|---|---|---|
YOLO v5+ BBox | - | ✅ | |||||
YOLO v5+ Segmentation | - | ✅ | |||||
YOLO Poses | - | ✅ | |||||
COCO | - | ||||||
DagsHub Datasource (Label Studio) | ✅ | ✅ | ✅ | - | |||
Label Studio | - | ||||||
CVAT Image | ✅ | - |
Example usage, importing annotations from COCO_1K and uploading it into a DagsHub Datasource:
from dagshub_annotation_converter.image.importers import YoloImporter
from dagshub_annotation_converter.image.exporters import DagshubDatasourceExporter
from dagshub.data_engine.datasources import get_datasource
# Assuming that the current worker directory is the root of the repo and images are stored in "data" folder
importer = YoloImporter(
data_dir="data", # Where the images are stored
annotation_type="segmentation", # or bbox for bounding boxes
meta_file="custom_coco.yaml" # file with the classes
)
proj = importer.parse()
exporter = DagshubDatasourceExporter(
datasource=get_datasource("<user>/<repo>", "<my datasource>"),
annotation_field="exported_yolo_annotations"
)
exporter.export(proj)
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
Built Distribution
Close
Hashes for dagshub_annotation_converter-0.0.11.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3cd277ce7d8977d8dc52298cf2ccc690fc782817a1b56530365f5a7bec8a44cd |
|
MD5 | 8cf3150c3d85fd453e4c56f88463bd1e |
|
BLAKE2b-256 | c0d573ac86ee8dda7d0a0b44da0d840c0d8a480f536e027a510587ec379f51de |
Close
Hashes for dagshub_annotation_converter-0.0.11-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ca85b885d429911275aaea4be89dfc57bc4298c099dc887c9040e3dec37daf83 |
|
MD5 | 1c2508cb71f1884240a61f7e7ab6767b |
|
BLAKE2b-256 | c1db441fea5558e176f4f8d9be3b6c7c5a80d5a902103dbd48ee2137ebf97111 |