docling-cvat-tools
CVAT annotation tools for Docling document processing and evaluation.
This package provides comprehensive tools for working with CVAT (Computer Vision Annotation Tool) annotations in the context of Docling document processing and evaluation workflows.
Features
- CVAT XML Parsing: Parse and validate CVAT XML annotation files
- Document Conversion: Convert CVAT annotations to
DoclingDocumentformat - Validation: Validate CVAT annotations for correctness and completeness
- Visualization: Generate HTML visualizations of annotated documents
- CLI Tools: Command-line utilities for common CVAT workflows
Installation
pip install docling-cvat-tools
Or install as an optional dependency of docling-eval:
pip install "docling-eval[campaign-tools]"
Requirements
- Python >=3.10,<4.0
- docling-core (document types)
- docling (for document processing)
Usage
CLI Tools
Validate CVAT annotations
docling-cvat-validator path/to/annotations.xml
Convert CVAT to DoclingDocument
docling-cvat-to-docling --input_path path/to/cvat_folder --output-dir output/
Python API
from docling_cvat_tools.cvat_tools.parser import parse_cvat_file
from docling_cvat_tools.cvat_tools.cvat_to_docling import convert_cvat_to_docling
from docling_cvat_tools.cvat_tools.validator import validate_cvat_sample
# Parse CVAT XML file
parsed = parse_cvat_file(Path("annotations.xml"))
# Validate annotations
validation_result = validate_cvat_sample(
xml_path=Path("annotations.xml"),
image_filename="page_000001.png"
)
# Convert CVAT folder to DoclingDocuments
results = convert_cvat_to_docling(
xml_path=Path("annotations.xml"),
input_path=Path("document.pdf"),
image_identifier="page_000001.png",
output_dir=Path("output")
)
Integration with docling-eval
This package is designed to work seamlessly with docling-eval. When installed as an optional dependency, it enables CVAT-specific features in the evaluation framework:
- CVAT dataset builders (
CvatDatasetBuilder,CvatPreannotationBuilder) - CVAT evaluation pipelines
Package Structure
docling_cvat_tools.cvat_tools: Core CVAT parsing, conversion, and validationdocling_cvat_tools.datamodels: CVAT-specific data modelsdocling_cvat_tools.visualisation: HTML visualization utilitiesdocling_cvat_tools.cli: Command-line interface toolsdocling_cvat_tools.utils: Utility functions
Development
# Install in development mode
uv sync
# Run tests
uv run pytest
License
MIT
Metadata
Release files for docling-cvat-tools 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| docling_cvat_tools-0.1.0.tar.gz | 84.5 kB | With provenance | Details for docling_cvat_tools-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| docling_cvat_tools-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for docling_cvat_tools-0.1.0-py3-none-any.whl |
Total release size: 170.7 kB
Release files / docling_cvat_tools-0.1.0.tar.gz
| Download URL | docling_cvat_tools-0.1.0.tar.gz |
|---|---|
| Size | 84.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9e0816e65bb689983c9e0af1f26505104b11ce0fe61abad22b2f4b54be102a30
|
|
BLAKE2b-256 checksum How to use checksums |
175e2a4c4daa6a34748f0a0cfcbf9723f066e0b54483458545fc1f3712f6ae70
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 31, 2026.
Transparency logRelease files / docling_cvat_tools-0.1.0-py3-none-any.whl
| Download URL | docling_cvat_tools-0.1.0-py3-none-any.whl |
|---|---|
| Size | 86.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
058d4113244715a4eca0f22aa133fdd9d32ae3c38175f1178fc31051b8c8fca7
|
|
BLAKE2b-256 checksum How to use checksums |
a1104b8e8bc2fc062c9fa185031f0fee292499726bc0a564e6a482a62a61245a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 31, 2026.
Transparency logSecurity for docling-cvat-tools 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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for docling_cvat_tools-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 31, 2026.
Transparency logA 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.