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
1
export DEEPOMATIC_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Copied!
1
set DEEPOMATIC_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Copied!

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
1
# Setup credentials
2
export DEEPOMATIC_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
3
4
# Upload simple image
5
deepo studio add_images -d mydataset -i myimage.jpg
6
7
# Upload all images in directory
8
deepo studio add_images -d mydataset -i mydir
9
10
# Upload all images in directory and subdirectories
11
deepo studio add_images -d mydataset -i mydir --recursive
Copied!

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
1
# Setup credentials
2
export DEEPOMATIC_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
3
4
# Upload simple json
5
deepo studio add_images -d mydataset -i myimage.json --json
6
7
# Upload all images in directory
8
deepo studio add_images -d mydataset -i mydir --json
9
10
# Upload all images in directory and subdirectories
11
deepo studio add_images -d mydataset -i mydir --json --recursive
Copied!
The location key in the JSON must be a local path relative from the JSON location, or an absolute path on your machine.