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
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
56a5bf7b2bcbb943c42560cf12f52a1a59cda3980f12809012d34496a65b67f1
|
|
| MD5 |
82c83c7676cc8cc46bec1758beeb5a90
|
|
| BLAKE2b-256 |
c51f5c432e29143c7ebfa1eee1c381261d8b290497e9c9256fa982eda2a1c2dd
|
Provenance
The following attestation bundles were made for cvatkit-0.1.0.tar.gz:
Publisher:
pypi-publish.yml on franioli/cvatkit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cvatkit-0.1.0.tar.gz -
Subject digest:
56a5bf7b2bcbb943c42560cf12f52a1a59cda3980f12809012d34496a65b67f1 - Sigstore transparency entry: 846052540
- Sigstore integration time:
-
Permalink:
franioli/cvatkit@62386ca3456edce2cfe3e7185924e17f1579198e -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/franioli
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@62386ca3456edce2cfe3e7185924e17f1579198e -
Trigger Event:
release
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5fc32f4adb4741d3b239852484c5071b7b6cc2a933499ab621ef56c89718637f
|
|
| MD5 |
87c8011695cc40b7d3c740fa71ec1951
|
|
| BLAKE2b-256 |
7c0f77f12cff68dfc45dc06102f6dd96a3dee05510427185e8e9394a510a53b9
|
Provenance
The following attestation bundles were made for cvatkit-0.1.0-py3-none-any.whl:
Publisher:
pypi-publish.yml on franioli/cvatkit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cvatkit-0.1.0-py3-none-any.whl -
Subject digest:
5fc32f4adb4741d3b239852484c5071b7b6cc2a933499ab621ef56c89718637f - Sigstore transparency entry: 846052544
- Sigstore integration time:
-
Permalink:
franioli/cvatkit@62386ca3456edce2cfe3e7185924e17f1579198e -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/franioli
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@62386ca3456edce2cfe3e7185924e17f1579198e -
Trigger Event:
release
-
Statement type: