CVAT provides flexible options for importing annotations and exporting datasets in various formats. You can work with datasets through the web interface, command-line tools, or programmatically using the SDK.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/cvat-ai/cvat/llms.txt
Use this file to discover all available pages before exploring further.
Export Datasets
Exporting allows you to download your annotated data in formats compatible with popular machine learning frameworks and tools.Export via Web UI
- Navigate to your task or project
- Click the Actions menu (three dots)
- Select Export dataset
- Choose your desired format from the dropdown
- Toggle Save images if you want to include image data
- Click OK to start the export
Export via CLI
The CVAT CLI provides theexport-dataset command for tasks:
--format: Annotation format (see supported formats)--output: Output file path--no-images: Export annotations only, exclude images
Export via SDK
The Python SDK provides programmatic access to export functionality:format_name: Format identifier (e.g., “COCO 1.0”, “YOLO 1.1”)filename: Output file path or nameinclude_images: Include image data (default: True)pbar: Progress reporter for tracking download statusstatus_check_period: Seconds between status checkslocation: Export location (LOCAL or CLOUD_STORAGE)cloud_storage_id: Cloud storage ID if using cloud location
Import Annotations
Importing allows you to load existing annotations into CVAT tasks, useful for pre-annotation, transfer learning, or combining datasets.Import via Web UI
- Open your task
- Click the Actions menu
- Select Upload annotations
- Choose the annotation format
- Select your annotation file
- Click OK to upload
Import via CLI
Use theimport-dataset command to upload annotations:
--format: Annotation format matching your input file--input: Path to annotation file (JSON or ZIP)
Import via SDK
Programmatically import annotations using the SDK:format_name: Annotation format identifierfilename: Path to annotation fileconv_mask_to_poly: Convert masks to polygons (default: None)status_check_period: Seconds between status checkspbar: Progress reporter
Format Requirements
Each format has specific requirements for successful import:File Structure
- JSON formats (COCO, Labelme): Single JSON file or ZIP with JSON
- Text formats (YOLO): ZIP archive with .txt files and data.yaml
- XML formats (Pascal VOC): ZIP with annotations/ and images/ directories
Label Matching
When importing annotations:- Labels must exist in the task before import
- Label names must match exactly (case-sensitive)
- Missing labels will cause import to fail
- Web UI: Task settings → Labels
- CLI:
--labelsparameter when creating task - SDK: Include labels in task specification
Image Matching
CVAT matches imported annotations to images by filename:- Annotations reference images by filename
- CVAT matches these to uploaded task images
- Unmatched images are skipped with warnings
Common Issues
Export Issues
Export fails or times out:- Large datasets may take time; check background jobs
- Increase
status_check_periodfor large exports - Check server logs for specific errors
- Verify annotations are saved in the task
- Check if format supports your annotation types
- Some formats have limitations (see format conversion)
Import Issues
“Label not found” errors:- Create all required labels before import
- Check label names match exactly
- Use soft_attribute_import for dynamic attribute creation
- Ensure annotation filenames match uploaded images
- Check file extensions and paths
- Verify images were uploaded successfully
- Verify file structure matches format requirements
- Check JSON syntax for format-specific fields
- Ensure ZIP archives have correct directory structure
Best Practices
- Test with small datasets first before bulk operations
- Backup before importing to avoid overwriting existing work
- Verify labels match between source and destination
- Use appropriate formats for your annotation types
- Check format compatibility with your ML framework
- Monitor background jobs for large import/export operations
- Use version control for annotation files
Next Steps
- Supported Formats - Complete list of available formats
- Format Conversion - Converting between formats
- CLI Reference - Full CLI command documentation
- SDK Reference - Complete SDK API documentation