Package: deepomatic-cli
deepomatic-command-line-interfaceDeepomaticCommand Line Interface.This command line interface has been made to help you interact with our services via the command line.CLI DocumentationFind the complete documentation atdocs.deepomatic.com/deepomatic-cli/Installationpipinstalldeepomatic-cliIf you need rpc support, prefer:# requires deeomatic-rpc package to be installedpipinstalldeepomatic-cli[rpc]AutocompletionTo activate the autocompletion the easiest way is to add the following line to your shell config file:eval"$(register-python-argcompletedeepo)"For example if you use bash:cat<<"EOF">>~/.bashrc# activate deepomatic-cli autocompleteeval"$(register-python-argcompletedeepo)"EOF(If it slows down your shell startup too much, you can pre-generate the completion into a static file then source it in your.bashrc: that doesn't change when deepo-cli is updated (except when updatingargcompleteitself).)For more information, checkout the documentation ofargcompleteFAQopencv-python(-headless) installation takes foreverDepending on your pip version, it might rebuild it from source. 19.3 is the minimum supported versionCheck version withpip -VUpdate withpip install 'pip>=19.3'Window output doesn't work. I get acv2.error.deepomatic-cliships withopencv-python-headlessas most of the features don't need a GUI.
This also avoids requiring libGL on the system (it is for example usually not there in docker containers).
If you want to use the GUI features, we recommend installingopencv-pythonafter installingdeepomatic-cli:pipinstalldeepomatic-cliopencv_install=$(pip3freeze|grepopencv-python-headless|sed's/-headless//g')pipuninstallopencv-python-headless
pipinstall$opencv_installAbout the output video codecThe CLI makes heavy use of OpenCV which does not provide the ability to configure the video encoder settings.
We can choose the codec to use (FourCC), but we can't choose the bitrate, quality, number of pass, profile or any other settings.
The quality chosen by OpenCV remains a small mystery, it seems to vary depending on the codec.If for some reason the output video encoding does not suit you (too heavy, bad quality), here are our options:Changing the FourCCSet the--fourccoption of the CLI. Theopencv-pythonpackage only provide the codecs which have a free license.
This means you will not be able to chooseavc1orhevc. We provide a dockerfile and an installation script to rebuildopencv-pythonwith x264 encoder (corresponding toacv1FourCC).
The readme can be foundhere. Please makes sure you can use it (it is patented and not free).If you are on windows, there is an alternative usingopenh264:Download thelibrary(should work with openh264-1.7.0-win64.dll.bz2)Extract the archive inC:\Windows\System32or in the same directory where the CLI command is launchedPiping to ffmpeg or cvlcIf you want more freedom on the encoding settings, we suggest piping the CLI toffmpegorcvlcby using the option-o stdout(working with infer, draw, blur and noop commands).
In both case you need to tellffmpegorcvlcabout the resolution, framerate and color space of the input stream.
You can useffprobeormediainfoto get the resolution and framerate of your input video.
The color space (chroma) does not depend on your input video but on our CLI which by default output BGR color space.Again, make sure you can legally use the codec specified in the command.Example usingffmpegdeepoplatformmodeldraw-i$input_video_path-ostdout-r$model_id|ffmpeg-frawvideo-pixel_formatbgr24-video_size1280x720-framerate15-i--c:v$codec$output_video_pathExample usingcvlcBGR color space is not supported bycvlc, so we have to convert the stream toRGB.deepoplatformmodeldraw-i$input_video_path-ostdout-r$model_id--output_color_spaceRGB|cvlc--demux=rawvideo--rawvid-fps=15--rawvid-width=1280--rawvid-height=720--rawvid-chroma=RV24---sout"#transcode{vcodec=$codec}:std{access=file,dst=$output_video_path}"vlc://quitBugsPlease send bug reports tosupport@deepomatic.com