Metadata-Version: 2.4
Name: cvatkit
Version: 0.1.0
Summary: A toolkit for reading and processing CVAT annotation files
Project-URL: Homepage, https://github.com/yourusername/cvat-toolkit
Project-URL: Documentation, https://github.com/yourusername/cvat-toolkit#readme
Project-URL: Repository, https://github.com/yourusername/cvat-toolkit.git
Project-URL: Issues, https://github.com/yourusername/cvat-toolkit/issues
Author-email: Francesco Ioli <francescoioli@cnr.it>
License: MIT
Keywords: annotations,computer-vision,cvat,image-annotations,xml
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Image Recognition
Requires-Python: >=3.8
Requires-Dist: matplotlib>=3.7.5
Requires-Dist: numpy>=1.20.0
Requires-Dist: shapely>=2.0.7
Provides-Extra: dev
Requires-Dist: bumpver>=2025.1131; extra == 'dev'
Requires-Dist: hatch>=1.14.2; extra == 'dev'
Requires-Dist: pytest-cov>=4.0.0; extra == 'dev'
Requires-Dist: pytest>=7.0.0; extra == 'dev'
Requires-Dist: ruff>=0.1.0; extra == 'dev'
Requires-Dist: twine>=6.1.0; extra == 'dev'
Description-Content-Type: text/markdown

# 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

```bash
pip install -e .
```

## Quick Start

```python
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`](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.
