Deepomatic CLI - Studio

You can add images on the Deepomatic platform using the Deepomatic CLI.

Installation & Credentials

Installation

See the link below to install Deepomatic CLI

Credentials

All Studio actions use the Deepomatic Studio credentials DEEPOMATIC_STUDIO_TOKEN. Ask your Deepomatic Studio administrator for it. As for the Deepomatic Cloud API credentials, you will need to export this variable to your environment.

Linux/MacOS
Windows
Linux/MacOS
export DEEPOMATIC_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Windows
set DEEPOMATIC_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Studio Actions

Studio actions enable you to interact directly with Deepomatic Studio from your terminal. Available actions are:

  • add_images: Upload images and their metadata directly from your local machine.

Add images

Studio destination

First, you will need to retrieve dataset_name from Deepomatic Studio. This is the destination dataset for the upload. Simply go the dataset and retrieve the URL which will contain the dataset name: https://studio.deepomatic.com/projects/<org_slug>/<dataset_name>.

Raw images

To upload all images directly to the specified dataset , you can specify either:

  • A single image file to be uploaded.

  • A directory, in which case all images directly inside the directory will be uploaded.

  • All images in the directory and subdirectories using the --recursive option

Upload simple images to Deepomatic Studio
# Setup credentials
export DEEPOMATIC_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# Upload simple image
deepo studio add_images -d mydataset -i myimage.jpg
# Upload all images in directory
deepo studio add_images -d mydataset -i mydir
# Upload all images in directory and subdirectories
deepo studio add_images -d mydataset -i mydir --recursive

Images and metadata

Sometime you will already have information regarding the images that you'd like to upload along the image. That could be information for pretagging the image, preexisting bounding boxes or metadata such as image provenance.

In order to pass it along with the image during upload time, you will need to use the JSON format, more information about the format can be found on the Deepomatic Studio JSON Upload.

You need to use the --json option, this will indicate to the Deepomatic CLI to look for JSON files instead of images.

The method is then the same as with simple images, you can upload:

  • Single JSON.

  • All JSON in a directory.

  • All JSON in directory and subdirectories with the --recursive option.

Upload images and metadata to Deepomatic Studio
# Setup credentials
export DEEPOMATIC_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# Upload simple json
deepo studio add_images -d mydataset -i myimage.json --json
# Upload all images in directory
deepo studio add_images -d mydataset -i mydir --json
# Upload all images in directory and subdirectories
deepo studio add_images -d mydataset -i mydir --json --recursive

The location key in the JSON must be a local path relative from the JSON location, or an absolute path on your machine.