Skip to content

next-cvat

A Python library for interacting with CVAT (Computer Vision Annotation Tool).

Installation

pip install next-cvat

Quick Start

from next_cvat import Client

# Initialize client from environment variables
client = Client.from_env_file(".env.cvat.secrets")

# Get a project
project = client.project(217969)

# Download project data
project.download_("dataset/")

# Load annotations
from next_cvat import Annotations
annotations = Annotations.from_path("dataset/annotations.xml")

Features

  • Easy-to-use Python interface for CVAT
  • Support for projects, tasks, jobs, and annotations
  • Download and upload functionality
  • Mask annotation support
  • Job status tracking
  • Comprehensive type hints and documentation

Overview

The library provides several key components:

Client

The main entry point for interacting with CVAT. Handles authentication and provides access to projects, tasks, and jobs.

View Client Documentation →

Annotations

Load, save, and query CVAT annotations. Track job status and manage annotation data.

View Annotations Documentation →

Types

Rich set of data types for working with CVAT annotations:

  • Box: Bounding box annotations
  • Polygon: Polygon annotations with segmentation support
  • Mask: Efficient binary mask storage with RLE encoding
  • ImageAnnotation: Container for image annotations
  • JobStatus: Track annotation progress
  • Label: Label definitions with attributes
  • Attribute: Custom annotation attributes

View Types Documentation →

Projects and Tasks

Manage CVAT projects and tasks:

  • Project: Container for tasks and labels
  • Task: Unit of work for annotation
  • Job: Individual annotation assignments

View Project Documentation →
View Task Documentation →
View Job Documentation →

Examples

For detailed usage examples, see the Examples section.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.