Command Line Tool (cli)

This is the command line tool from das-element.

It contains the API (supporting Python 2 & 3) and the classification of image, sequence and movie files.

You can deploy it on your render farm to use it in a post-render process for tagging of elements

Versions

There are two command line tool (CLI) versions with a different range of features and file size.

cli

This version is optimized to receive data from the database or update an element.
Smaller in file size and fast to use, but has a reduced set of features.

get-categories Get all categories of the library get-category Get category entity get-element-by-id Get element entity from element ID get-element-by-name Get element entity from element name get-element-by-uuid Get element entity from element UUID get-elements Get all elements of the library get-libraries Get all libraries data for current config get-library-template-mappings Get all library template mappings get-tag Get tag entity get-tags Get all tags of the library license Show license update Updates database entity

cli_full

Includes all features of the CLI, like ingesting files, rendering proxies or running a machine learning model.
This version has larger in file size and is slower.

delete-element Delete element get-categories Get all categories of the library get-category Get category entity get-element-by-id Get element entity from element ID get-element-by-name Get element entity from element name get-element-by-uuid Get element entity from element UUID get-elements Get all elements of the library get-libraries Get all libraries data for current config get-library-template-mappings Get all library template mappings get-meaningful-frame Validate meaningful thumbnail frame number get-paths-from-disk Get all file paths from a given folder. get-tag Get tag entity get-tags Get all tags of the library info Show machine learning model info ingest Ingest new element license Show license predict Predict the category for a give file path. render-element-proxies Render the proxy files for an element... update Updates database entity

Installation

Save the software to your preferred location. That’s all!

On Linux make sure to run this command to make the file executable:

chmod +x das-element-cli_{version}_lin

API

To learn more about the application programming interface (API) follow this link here.

Documentation

docu.api.das-element.com

Python API

GitHub - das-element/python-api: Python API

 

How To machine learning prediction

Each version will be shipped with the model inside. Use the info flag to get the version number

Simple usage

Valid file paths are …

  • single file (single image or movie file):

    • /path/to/file.exr

    • /path/to/file.mov

  • sequence of files

    • /path/to/sequence.#.exr

    • /path/to/sequence.%04d.exr

  • directory

    • the software will crawl the folder structure to find any media files or sequences


Multiple files

You can pass multiple file paths to the software.


Multiple results

Get the top X predicted categories by using the flag: --top {number}


Python Example

Here is an example code snippet that you could use in your python code.

 

Software info

Get information about the current software version and the categories that can be classified.

key

description

key

description

id

the identifier for the class from Wikidata

human-readable

meaningful readable tag

synonym

a list of different words for this class


Result Format

For each file path you get a list of predictions for tags.

key

description

key

description

value

identifier value - see here for more details

tag

human readable text of this category

description

description text for this category

parents

the parent tags based on the category hierarchy structure

 

Flags for prediction

These are the flags that can be set for the prediction.

flag

description

flag

description

info

Shows information of the software.
List all categories that this version of the model can classify.

predict --top {number}

Get the top X predictions of tags.

predict --model

File path to another model file (.wit)
Each version will be shipped with a model file inside the executable

predict --filmstrip_frames

Set the number of frames of a filmstrip for a sequence of images or movie files.
default value: 36

higher value: takes longer, but this might give you more different tags
lower value: faster, but might return less tags

 

Troubleshooting

issue

solution

issue

solution

MacOS shows unidentified developer for 'ffprobe'

For MacOS you should add the ffprobe to your trusted applications if you want to use the software.

We use the ffmpeg and ffprobe build from MacOS from the following source: https://evermeet.cx/ffmpeg/

Windows startup is quite slow

Unfortunately that is an issue with Window that can not be fixed at the moment.