Site commands enable you to interact directly with the deployed Deepomatic sites from your terminal. Here is the list of actions that you can do:
- create / delete
- install / uninstall
- current (start, stop, logs, status)
- list / save / load
- update / upgrade / rollback
- model (infer, draw, blur)
To create a site, you need to use the following command and to specify a name and the application version that you want to deploy on your site. You can then change this application version.
Create a site
deepo site create -n my-super-site -v app_version_id
To delete a site, you need to use the following command and to specify the Site Id that you want to delete.
Delete a site
deepo site delete -s site_id
To obtain the manifest necessary for the installation of your site, you must use the following command, specifying the Site Id and the type of manifest that you want to fit with your deployment.
Get manifest for a site
deepo site manifest -i site_id -t gke
The target manifest are:
- gke: Google Kubernetes Engine
Run locally the following command. The site will be installed using the latest docker-compose / kubernetes manifest downloaded from the API.
Install a site
deepo site install site_id
Uninstalling a site removes all versions and files from a site.
Uninstall a site
deepo site uninstall site_id
The show command displays the currently deployed site's id, and the id of the currently installed application.
Display current site id and installed application
deepo site show
currentcommand lets you use the following submenu for the currently deployed site:
Start current site
deepo site current start
Stop current site
deepo site current stop
Get logs from current site
deepo site current logs
Get status of current site
deepo site current status
listcommand returns the ids of the sites that have been installed.
List installed sites
deepo site list
savecommand creates an archive that contains the given site, which can been installed on another server (e.g. offline)
Save a site
deepo site save -s site_id -a achive_path
loadcommand loads a site from an archive generated by a
Load a site
deepo site load -a achive_path
upgradecommand install a new version of the site (using the latest docker-compose/kubernetes manifest from the api)
Upgrade a site
deepo site upgrade -s site_id -a app_version_id
rollbackcommand reloads the nth previous version (upgrade followed by rollback 1 does nothing)
Rollback a site
deepo site rollback -s site_id -n rollback_index
interventioncommand lets you interact with the customer API. There must then be a
customer-apiservice in your application to work. You can then use the create / delete / infer / status commands.
Create an intervention
deepo site intervention create
Delete an intervention
deepo site intervention delete
Add an image to an intervention
deepo site intervention infer
Get intervention status
depeo site intervention status
When you deploy an application version on a site, it is possible to run inferences on the model version included in the application version.
To retrieve the
MODEL_VERSION_IDof the model version that you want to use within your application and the corresponding
Routing Key, you need to go on the Apps tab in the Deployment section and click on the app version that is deployed on your site.
MODEL_VERSION_IDis specified with the
ROUTING_KEYcorresponds to the rabbitMQ queue identifier.
You will need to provide one additional parameters to run model actions: the
AMPQ_URL. It corresponds to the rabbitMQ address. You will find this address in your server deployment files. It should look like
This parameter will be defined during the GPU server setup. Besides, you don't need to specify any credentials.
Running an inference with on-premises Server
deepo site model infer -i img.jpg -o pred.json -r 123 -k queue -u amqp://user:[email protected]:port/vho
There are four different model actions:
infer: Compute predictions only.
draw: Display the prediction result, whether tags or the bounding boxes.
blur: Blur the bounding boxes.
noop: Benchmark input and output processing capabilities.
They follow the same recipe:
- 1.Retrieve one or several inputs.
- 2.Compute predictions using the trained neural network
- 3.Output the result in different formats: image, video, JSON, stream, etc.
deepo site model infer -i myinput -o myoutput1 myoutput2 ...
The Deepomatic CLI supports different types of input:
- Image: Supported formats include
- Video: Supported formats include
- Studio JSON: Deepomatic Studio JSON format, used to specify several images or videos.
Sample input JSON format
- Directory: Analyse all images and videos found in the directory.
- Digit: Retrieve the stream from the corresponding device. For instance, 0 for the installed webcam.
- Network stream: Supported network streams include
Inputs are specified using the
inputoption. Below an example with each type of inputs.
Sample input commands
deepo site model infer -i /path/to/my_img.bmp ... # Image
deepo site model infer -i /path/to/my_vid.mp4 ... # Video
deepo site model infer -i /path/to/my_studio.json ... # Studio JSON
deepo site model infer -i /path/to/my_dir ... # Directory
deepo site model infer -i 0 ... # Device number
deepo site model infer -i rtsp://ip:port/channel ... # RTSP stream
The Deepomatic CLI supports different types of output:
- Image: Supported formats include
- Video: Supported formats include
- Run JSON: Deepomatic Run JSON format for raw predictions.
- Studio JSON: Deepomatic Studio JSON format for Studio-like prediction scores. This is specified using the
- Integer wildcard JSON: A standard Run/Studio JSON, except that the name contains the frame number. For instance
-o frame %03d.jsonwill output
- String wildcard JSON: Same as the integer wildcard except this time the frame name is used. For instance
-o pred_%s.jpgwill output
- Standard output: On rare cases you might want to output the model results directly to the process standard output using the
stdoutoption. For instance this allows you to stream directly to vlc.
- Display output: Opens a window and displays the result. Quit with
Output are specified using the
outputoption. Below an example with each type of inputs.
Please note that in order to avoid duplicate computations, it is possible to specify several outputs at the same time, for instance to blur an image and store the predictions.
Sample output commands
deepo site model draw -i img.jpg -o img_drawn.jpg ... # Image
deepo site model draw -i vid.mp4 -o img_drawn_%04d.jpg ... # Wildcard images
deepo site model draw -i vid.mp4 -o vid_drawn.mp4 ... # Video
deepo site model draw -i img.jpg -o pred.json ... # Run JSON
deepo site model draw -i img.jpg -o pred.json -s ... # Studio JSON
deepo site model draw -i vid.mp4 -o pred_%s.json ... # String wildcard JSON
deepo site model draw -i vid.mp4 -o pred_%04d.json ... # Integer wildcard JSON
deepo site model draw -i vid.mp4 -o stdout ... # Standard output
deepo site model draw -i vid.mp4 -o window ... # Display output
deepo site model draw -i vid.mp4 -o vid_drawn.mp4 pred_%04d.json ... # Multiple outputs
Commands have additional options that you can use with a flag. There is a short flag
-fand a long flag
--flag. Note that one use a simple
-while the other uses two
--. Also some options need an additional argument. Find below the option table. When indicated,
allmeans that all four commands
Input FPS used for video extraction.
Number of frames to skip inbetween two frames.
Recursive directory search.
Output FPS used for video reconstruction.
Convert from Run to Studio format.
Fullscreen if window output.
Use prediction from precomputed JSON.
Neural network recognition version ID.
Threshold for predictions.
AMQP url for on-premises deployments.
Recognition routing key for on-premises deployments.
Overlay prediction score.
Do not overlay prediction score.
Overlay the prediction label.
Do not overlay the prediction label.
Increase output verbosity.