This command allows you to import Annotations into an existing RemoteDataset. These Annotations can be in one of the following supported formats:

  • coco
  • dataloop (Bounding boxes, tags, and segments only)
  • csv_tags
  • csv_tags_video
  • darwin
  • labelbox
  • pascal_voc
  • superannotate
$ darwin dataset import cars darwin /home/annotations/nice_cars_v3/
Fetching remote class list...
Retrieving local annotations ...
Fetching remote file list...
2 annotation file(s) found.
0 classes needs to be created.
0 classes needs to be added to andreas-team/cars
Working... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00
Working... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00

If you are importing Annotations that have new AnnotationClasses, a prompt will be displayed to confirm whether or not the user wants to create the new AnnotationClasses:

2 classes are missing remotely
About to add the following classes
	Class 1, Type: Class type
	Class 2, Type: Class type
Do you want to continue [Y/N]

Overwriting annotations

By default, the import command will attempt to overwrite any existing annotations with imported ones. You'll be presented with a warning when doing so:

Importing annotations...
Empty annotations will be skipped, if you want to delete annotations rerun with '--delete-for-empty'.
The following 4 dataset items already have annotations that will be overwritten by this import:
- dataset_item_1.jpg
- dataset_item_2.jpg
- dataset_item_3.jpg
- dataset_item_4.jpg
Do you want to proceed with the import? [y/N]

You can bypass the warning with the optional --overwrite argument in your import command:

$ darwin dataset import cars darwin /home/annotations/nice_cars_v3/ --overwrite

If you instead want to append the imported annotations, you can do so with the --append argument:

$ darwin dataset import cars darwin /home/annotations/nice_cars_v3/ --append

🚧

Ensure your images and videos have been successfully uploaded and processed

Before you import annotations, make sure your target images and videos are marked as New, or have been previously annotated already.

🚧

Import formats

Also make sure to import VideoAnnotation's for video files (and DICOM files) and Annotation's for normal images. If you swap them, the operation will fail.

Positional arguments:

  • dataset: The RemoteDataset we want to import annotation to.
  • format: The format of the annotations to import.
  • files: The location of the annotation files or the folder where the annotation files are.

Optional arguments:

  • --append: Append annotations instead of overwriting.
  • --yes: Skips prompts for creating and adding classes to the dataset.

For example: Before importing, a dataset without any annotations would show a count of 0 for each dataset class under the class filters:

After running the CLI command, we'll see instance counts for each class in the dataset. This indicates that annotations have been imported.

After this step, you can use other CLI commands to move the images into the next stages, or a human can review the annotations manually.


Next up

Having trouble understanding the docs? Have a refresh on V7 Concepts!