Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Tip

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

Info

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

...

Code Block
languagebash
# Linux & Mac
das-element-cli /path/to/file.#.exr

# Windows
C:\das-element-cli.exe C:\path\to\file.#.exr

# result:
{"/path/to/file.#.exr": [{"labeltag": "fire", "description": "rapid oxidation of a material", "value": "Q3196"}]}

...

Code Block
languagebash
das-element-cli.exe /path/to/files.#.exr /path/to/another/file.mov

# result:
{"/path/to/files.#.exr": [{"labeltag": "fire", "description": "rapid oxidation of a material", "value": "Q3196"}],
"/path/to/another/file.mov": [{"labeltag": "torch", "description": "stick with a flaming end used as a source of light", "value": "Q327954"}]}

...

Code Block
languagepowershell
das-element-cli.exe -top 3 /path/to/file.mov

# result:
{"/path/to/file.mov": [
      {"labeltag": "torch", "description": "stick with a flaming end used as a source of light", "value": "Q327954"},
      {"labeltag": "fire", "description": "rapid oxidation of a material", "value": "Q3196"},
      {"labeltag": "flame", "description": "visible, gaseous part of a fire", "value": "Q235544"}
]}

...

Code Block
languagepy
# print the top 3 labeltag predictions for a given file path

import json
import subprocess

path = '/path/to/file.mov'
command = ['./das-element-cli.exe', '--top', '3', path]
process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
output, error = process.communicate()

if process.returncode != 0:
    print('Something went wrong: {} - Error: {}'.format(path, error))
else:
    result = json.loads(output)
    for path, predictions in result.items():
        wikidata_ids = [item['value'] for item in  predictions]  # list of IDs from wikidata
        readable_labelstags = [item['labeltag'] for item in predictions]  # list of human readable labelstags
        print('For path: "{}" predicted the labels:tags {}'.format(path, ', '.join(readable_labelstags)))

# result:
# For path: "/path/to/file.mov" predicted the labelstags: torch, flame, fire

Software info

...

key

description

id

the identifier for the class from Wikidata

human-readable

meaningful readable labeltag

synonym

a list of different words for this class

...

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

Info

The result is in JSON format. The default string format is Unicode.
File path gets returned as PosixPath with forwards slash, even for Windows.

Code Block
languagejson
{'/path/to/file.mov': [{
                          'value': 'Q327954',
                          'labeltag': 'torch',
                          'description': 'stick with a flaming end used as a source of light'
                          'parents': "parents": [{'id': 'Q3196', 'name': 'fire'}, {'id': 'Q235544', 'name': 'flame'}]
                        }]}

key

description

value

identifier value - see here for more details

labeltag

human readable text of this category

description

description text for this category

parents

the parent labels tags based on the category hierarchy structure

...

flag

description

--info

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

--top {number}

Get the top X predictions of labelstags.

Info

The first two predictions are probably the most significant ones.

--model

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

--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 labelstags
lower value: faster, but might return less labelstags

Info

Example: for a sequence of 1000 frames only a number of frames get validated. This helps to speed up the process and still gets you a good result.

--debug

debugging mode

...