Skip to main content

CVAT DATA FLOW

New

  • Add support for export in YOLOv8 segmentation and detection formats (for segmentation dataset_format = "yolo_seg")
  • Add support for installation via pip
  • Add support for downloading multiple tasks from different projects

Overview

This utility facilitates the download of datasets from CVAT, preparing them for training and testing purposes. Key features include:

  • Downloading datasets from CVAT in any supported format.
  • Merging multiple tasks to form a consolidated dataset.
  • Randomly segmenting the dataset into training, validation, and testing subsets.

Local Installation

Clone the repository:

git clone https://github.com/ai-iaguzhinskii/cvat_data_flow.git

Install the dependencies:

pip3 install -r requirements.txt

Configuration

Edit the configuration as per your requirements in the config_file:

[CVAT]
URL = # URL of the CVAT server, e.g., http://localhost:8080
LOGIN = # CVAT user login, e.g., admin
PASS = # CVAT user password, e.g., admin

[DOWNLOAD]
TASKS_IDS = # Task IDs for downloading, e.g., [111, 222, 333]
PROJECTS_IDS = # Project IDs for downloading, e.g., [111, 222, 333]

[DATASET]
FORMAT = # Desired dataset format. Refer to CVAT documentation for options, e.g., coco
# For YOLOv8 segmentation and detection formats use "yolo_seg" and "yolo_det" respectively
SAVE_PATH = # Directory to save the downloaded datasets, e.g., /home/user/datasets
SPLIT = # Define random splits for the dataset, e.g., {"train": 0.8, "val": 0.1, "test": 0.1}

[OPTIONS]
ONLY_BUILD_DATASET = # Toggle to build dataset only if tasks are previously downloaded, e.g., True
LABELS_MAPPING = # Define label mappings, e.g., {"car": "vehicle", "person": "pedestrian"}
DEBUG = # Toggle debug mode, e.g., True

Usage

To run the program:

python3 cvat_data_flow/main.py

Note: Ensure to replace placeholders in the configuration with actual values before executing.

Installation via PIP

The utility can be installed via pip:

pip3 install cvat-data-flow

Usage as a Python Package

The utility can also be used as a Python package. Here's an example:

from cvat_data_flow import CVATDataFlow

cvat_data_flow = CVATDataFlow(
        url='http://cvat.example.com',
        login='username',
        password='password',
        save_path='/path/to/save/dataset',
        projects_ids=[1, 2, 3],
        only_build_dataset=False,
        dataset_format='coco',
        split=[('train', 0.7), ('val', 0.2), ('test', 0.1)],
        labels_mapping={'person': 'person', 'car': 'vehicle'}
    )

cvat_data_flow.download_data()
cvat_data_flow.build_dataset()

License

This project is licensed under the MIT License - see the LICENSE file for details.

Metadata

Release files for cvat-data-flow 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cvat-data-flow 0.1.0
File Size Uploaded Provenance Actions
cvat_data_flow-0.1.0.tar.gz 12.5 kB Without provenance Details for cvat_data_flow-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cvat-data-flow 0.1.0
File Interpreter ABI Platform Actions
cvat_data_flow-0.1.0-py3-none-any.whl Python 3 none any Details for cvat_data_flow-0.1.0-py3-none-any.whl

Total release size: 27.3 kB

Release files / cvat_data_flow-0.1.0.tar.gz

Download URL cvat_data_flow-0.1.0.tar.gz
Size 12.5 kB
Tags Source
SHA-256 checksum
How to use checksums
2cb50aa11f1e723436ec714180d4bd0c522d2ed79672f26d925972c15c4294fb
BLAKE2b-256 checksum
How to use checksums
1367b1e22d869ddae0c95fc9c5d6b3c734116491d1498eb4de020628d0366f7f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.11.5

Release files / cvat_data_flow-0.1.0-py3-none-any.whl

Download URL cvat_data_flow-0.1.0-py3-none-any.whl
Size 14.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1f8041bd77fc6c296176e46628eca39212a381280b41776e7e5681577175e916
BLAKE2b-256 checksum
How to use checksums
0256970dc1ac5d86decf9ce937333d1220c0f7dfe5375aec9b4acdc3ce304203
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.11.5

Security for cvat-data-flow 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page