CVAT Python SDK
CVAT SDK is a Python library. It provides you access to Python functions and objects that simplify server interaction and provide additional functionality like data validation and serialization.
SDK API includes several layers:
- Low-level API with REST API wrappers. Located at
cvat_sdk.api_client. Read more
- High-level API. Located at
cvat_sdk.core. Read more
- PyTorch adapter. Located at
cvat_sdk.pytorch. Read more
In general, the low-level API provides single-request operations, while the high-level one implements composite, multi-request operations, and provides local proxies for server objects. For most uses, the high-level API should be good enough, and it should be the right point to start your integration with CVAT.
The PyTorch adapter is a specialized layer
that represents datasets stored in CVAT as PyTorch
This enables direct use of such datasets in PyTorch-based machine learning pipelines.
To install an official release of CVAT SDK use this command:
pip install cvat-sdk
To use the PyTorch adapter, request the
pip install "cvat-sdk[pytorch]"
We support Python versions 3.7 - 3.9.
To import package components, use the following code:
For the high-level API:
import cvat_sdk # or import cvat_sdk.core
For the low-level API:
For the PyTorch adapter: