Skip to main content

A toolkit for reading and processing CVAT annotation files

Project description

CVAT Toolkit

A simple Python package for reading CVAT (Computer Vision Annotation Tool) annotation files.

Features

  • Read CVAT annotations from XML or ZIP files
  • Parse Polygons, Bounding Boxes, and Masks
  • Filter by label or image name
  • Clean, typed API

Requirements

  • Python >= 3.8
  • numpy >= 1.20.0

Installation

pip install -e .

Quick Start

from cvatkit import CvatReader

# Load annotations (XML or ZIP)
reader = CvatReader("annotations.xml")

# Print summary
print(reader)

# Get polygons filtered by label
polygons = reader.get_polygons(label="collapse")

# Access polygon data
for polygon in polygons:
    print(f"Image: {polygon.image_name}")
    print(f"Points: {polygon.points}")  # numpy array (N, 2)
    print(f"Attributes: {polygon.attributes}")

Examples

See demo.ipynb for complete examples including:

  • Reading from XML and ZIP files
  • Working with polygons, boxes, and masks
  • Filtering by label and image name
  • Using iterators for large datasets
  • Getting statistics and summaries

License

MIT License - see LICENSE file for details.

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

cvatkit-0.1.0.tar.gz (267.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cvatkit-0.1.0-py3-none-any.whl (12.8 kB view details)

Uploaded Python 3

File details

Details for the file cvatkit-0.1.0.tar.gz.

File metadata

  • Download URL: cvatkit-0.1.0.tar.gz
  • Upload date:
  • Size: 267.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for cvatkit-0.1.0.tar.gz
Algorithm Hash digest
SHA256 56a5bf7b2bcbb943c42560cf12f52a1a59cda3980f12809012d34496a65b67f1
MD5 82c83c7676cc8cc46bec1758beeb5a90
BLAKE2b-256 c51f5c432e29143c7ebfa1eee1c381261d8b290497e9c9256fa982eda2a1c2dd

See more details on using hashes here.

Provenance

The following attestation bundles were made for cvatkit-0.1.0.tar.gz:

Publisher: pypi-publish.yml on franioli/cvatkit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cvatkit-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: cvatkit-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 12.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for cvatkit-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5fc32f4adb4741d3b239852484c5071b7b6cc2a933499ab621ef56c89718637f
MD5 87c8011695cc40b7d3c740fa71ec1951
BLAKE2b-256 7c0f77f12cff68dfc45dc06102f6dd96a3dee05510427185e8e9394a510a53b9

See more details on using hashes here.

Provenance

The following attestation bundles were made for cvatkit-0.1.0-py3-none-any.whl:

Publisher: pypi-publish.yml on franioli/cvatkit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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