If you are using CVAT for image and video annotations, we have made it easy to import your entire project or single tasks to Encord. Importing into Encord automatically creates the ontology and imports all labels and classifications.

Videos in CVAT projects must be exported as images to ensure successful import into Encord.

Comparing Annotation Shapes: CVAT vs Encord

The following table shows which CVAT shapes are supported in Encord.

CVAT ShapeEncord Equivalent
Rectangle / Bounding BoxRotatable bounding Box
PolygonPolygon
PolylinePolyline
PointsKeypoint
EllipseNot Supported
CuboidNot Supported
SkeletonObject Primitive
TagClassification

Exporting from CVAT

You can either export an entire project or an individual task from CVAT. Keep in mind that every new export creates an entirely new project.

Use the CVAT UI to export your project:

For project exports:

Export project

Or for task exports:

Export task

Then in the popup, ensure that images are saved too:

Export project popup
Choose the “CVAT for images 1.1” export format for images. Projects containing videos have to be exported as images.

Once downloaded, unzip the file to create a directory that contains all your images, together with an annotations.xml file which contains your CVAT ontology, CVAT labels, and CVAT tags (which are the equivalent of Encord Classifications for entire images/frames).


Importing CVAT videos into Encord

Videos in CVAT projects must be exported as images to ensure successful import into Encord. Images can be added to Encord as Single Images (each image is a separate data unit), or as Image Groups (all images have been combined into a single data unit).

See the Importing a CVAT project section below for information.


Importing a CVAT project

CVAT projects are imported into Encord as Manual QA Projects. We recommend converting Manual QA Projects into Workflow Projects.

We recommend increasing the EncordUserClient request timeouts, as imports can take a significant amount of time.

The following script can be used to import CVAT projects into Encord.

If image file names in the CVAT export do not exactly correspond to the file names in the annotation .xml file, use the map_filename_to_cvat_name parameter in LocalImport to map image file names to the names in the .xml file. The following example removes image file extensions so that image_0123.jpeg is recognized as image_0123.

cvat_importer_ret = user_client.create_project_from_cvat(
    LocalImport(
        file_path=data_folder, map_filename_to_cvat_name=lambda x: Path(x).stem
    ),
    dataset_name
)

If the return object is a CvatImporterSuccess, open the Encord platform to ensure that the Project was added.

For possible import options and return types see the SDK reference.


CVAT to Encord Import Limitations

We encourage you to inspect the returned Issuesobject closely. This object informs you about possible limitations during the project/task import.

For example, within CVAT the same label in the ontology can be used for different shapes. Within Encord, a label in the ontology is bound to a specific shape. During import, the importer will detect whether the same CVAT label was used for multiple shapes and create different Encord ontology items for each of them.

There are other limitations which are documented in the Issues object. Please reach out to the Encord team if those need clarification.