Skip to main content
This page provides real-world examples of using the CVAT CLI for common annotation workflows.

Prerequisites

Before running these examples:
  1. Install CVAT CLI: pip install cvat-cli
  2. Set up authentication (recommended):
  3. Have access to a CVAT server (local or remote)

Basic Workflows

Simple Image Annotation Workflow

Create a task, annotate it (manually in the web UI), then export the results.

Video Annotation Workflow

Annotate specific frames from a video.

Batch Processing Multiple Datasets

Create multiple tasks from different directories.

Advanced Workflows

Pre-annotation and Review Pipeline

Import pre-annotations, review them, then export.

Backup and Migration

Backup tasks from one server and restore to another.

Auto-annotation Pipeline

Create tasks, auto-annotate them, and export results. detector.py:
Pipeline script:

Multi-Organization Workflow

Work with tasks across different organizations.

Format Conversion

Convert Between Annotation Formats

Export a task in one format and import into another task in a different format.

Export All Tasks in a Project

Export every task in a project.

Environment-Specific Examples

Development Environment Script

Script configured for local development.

Production Environment Script

Script configured for production server.

Automation Examples

Scheduled Backup Script

Automate regular backups of all tasks.

Continuous Integration Example

Validate annotations in CI/CD pipeline.

Tips and Best Practices

Using Configuration Files

Create a config file for common settings: cvat-config.sh:
Source it before running commands:

Error Handling

Add error handling to scripts:

Logging

Add logging to track operations:

Parallel Processing

Process multiple tasks in parallel:

Next Steps