Skip to content

CLI reference

deeperfly: multi-camera 3D pose labeling and estimation.

Usage:

$ deeperfly [OPTIONS] COMMAND [ARGS]...

Options:

  • --version: Show the version and exit.
  • --help: Show this message and exit.

Commands:

  • gui: Launch the browser GUI: set up projects,...
  • train: Train a 2D detector on projects' labels...
  • run: Apply a run config to each project, stage...
  • doctor: Report the state of the deeperfly...
  • models: The released detectors and locators: list,...
  • cache: The directory deeperfly keeps its...

deeperfly gui

Launch the browser GUI: set up projects, calibrate, label.

One project opens straight in its workspace; several, or a directory whose children are projects, open together as a collection. A directory of videos with no project yet opens the setup form over it. The paths are checked here first. A server already running opens them in a new tab instead.

Usage:

$ deeperfly gui [OPTIONS] [paths]...

Arguments:

  • paths...: Projects to open: each a project folder, a directory holding a deeperfly/ project, or a directory of projects. None opens the launcher; one directory of videos opens the setup form over it.

Options:

  • --host <str>: Interface to bind. [default: 127.0.0.1]
  • --port <int>: Port to serve on. Default: 8000, or the next free port.
  • --no-browser: Do not open a browser.
  • --stop: Stop your running GUI server, and exit.
  • -v, --verbose: Debug messages, and a traceback on errors.
  • --help: Show this message and exit.

deeperfly train

Train a 2D detector on projects' labels and score it on held-out projects.

The output directory gets the trained detector, its report, and the config as trained: --set keys and the projects given here written in. [compute] keys, like --device, are left out of it.

Usage:

$ deeperfly train [OPTIONS] [paths]...

Arguments:

  • paths...: Projects to train on, each a project or a directory of them; they replace the config's [data] projects.

Options:

  • -c, --config <path>: The training config, a TOML file (see docs/config-schema.md). [required]
  • --set KEY=VALUE: Override one config key by its dotted path, table.key=value; repeatable. The value is read as TOML (a list may drop its brackets), none restores the default, and a relative path is relative to the current directory.
  • -o, --out <path>: Output directory (default: [train] out, else <config dir>/<stem>/).
  • --steps <int>: Override the config's train steps, for a quick run.
  • --device <str>: Override the config's compute device.
  • --workers <int>: Override the config's compute workers.
  • -v, --verbose: Debug messages, and a traceback on errors.
  • --help: Show this message and exit.

deeperfly run

Apply a run config to each project, stage by stage, over a frame set.

Each path is resolved to a project: a project folder as it is, else its deeperfly/, else, for a directory of video files, the default project deeperfly/ is created in it (one view per video file, fly38, one animal).

A run is <project>/results/<name>.h5 with its config copied to <name>.toml beside it, and its videos under <project>/renders/<name>/. The name is the config's name, else the time of the invocation. A run of that name with the same config is continued: only the frames it does not cover are computed. Another config under the name is refused unless --force, which also recomputes every frame asked for and replaces a results file written for other video.

--set keys count as part of the config, and the copy beside the results has them written in; [compute] keys, like --device, do not. --name and --frames stand in for the config's name and frames, which may differ between invocations of one run. --dry-run checks every project and prints the coverage plan. A failed project is reported, the rest continue, and the command exits non-zero.

The live view's URL is printed first: opening it shows the detections as they are made, the stages and the log, and can stop the run as Ctrl-C would, which exits 130.

Usage:

$ deeperfly run [OPTIONS] {paths}...

Arguments:

  • paths...: Projects: each a project folder, a directory holding a deeperfly/ project, or a directory of video files, which gets the default project deeperfly/ on its first run. [required]

Options:

  • -c, --config <path>: The run config, a TOML file (see docs/config-schema.md). [required]
  • --set KEY=VALUE: Override one config key by its dotted path, table.key=value; repeatable. The value is read as TOML (a list may drop its brackets), none restores the default, and a relative path is relative to the current directory.
  • --only <str>: Run just these stages.
  • --skip <str>: Leave these stages out.
  • -o, --out <path>: Output root: <out>/<project>/<name>.h5 (default: <project>/results/<name>.h5).
  • --force: Recompute every frame asked for, let another config take over a run of this name, and replace a results file written for other video.
  • --dry-run: Validate and print the plan; run nothing, create no project.
  • --device <str>: Override [compute] device.
  • --name <str>: The run's name (default: the config's, else the time).
  • --frames <str>: Frames to cover, comma-separated slices and indices, e.g. 0:1000:2,5000,6000::10 (default: the config's, else every frame).
  • --batch <int>: Override [compute] batch: frames per pass. [x>=1]
  • --precision <str>: Override [compute] precision: auto, float32, float16, bfloat16.
  • --compile / --no-compile: Override [compute] compile: torch.compile the pose net.
  • --accumulate <str>: Override [compute] accumulate: float32, or float16 with --precision float16.
  • --live: Watch from the first batch and open the live view now; without it the view is idle until its printed URL is opened.
  • --no-live: Serve no live view.
  • --port <int>: Port of the live view (default: 8100, or the next free one). [1<=x<=65535]
  • -v, --verbose: Debug messages, and a traceback on errors.
  • --help: Show this message and exit.

deeperfly doctor

Report the state of the deeperfly installation and its optional pieces.

Exits 1 when a piece is broken (with --check, also when one needs a look), so it can gate a script.

Usage:

$ deeperfly doctor [OPTIONS]

Options:

  • --json: Print the report as JSON, for a script.
  • --check: Exit non-zero on warnings too, not only errors.
  • -v, --verbose: Debug messages, and a traceback on errors.
  • --help: Show this message and exit.

deeperfly models

The released detectors and locators: list, download or remove them.

Usage:

$ deeperfly models [OPTIONS] COMMAND [ARGS]...

Options:

  • --help: Show this message and exit.

Commands:

  • list: List the released detectors and locators,...
  • download: Download the released models named, or all...
  • remove: Remove the downloaded models named from...

deeperfly models list

List the released detectors and locators, and whether each is downloaded.

A model is named in a run config where a path would go: [pose2d] weights = ["NAME"], and locator = "NAME" for a rig that needs one.

Usage:

$ deeperfly models list [OPTIONS]

Options:

  • --json: Print the list as JSON, for a script.
  • -v, --verbose: Debug messages, and a traceback on errors.
  • --help: Show this message and exit.

deeperfly models download

Download the released models named, or all of them with --all.

The first run that names a model downloads it, so this is for fetching ahead of time, as for a machine that will run without a network. A model already in the cache is checked against its SHA-256 and not fetched again.

Usage:

$ deeperfly models download [OPTIONS] [names]...

Arguments:

  • names...: Released models, by name.

Options:

  • --all: Download every released model.
  • -v, --verbose: Debug messages, and a traceback on errors.
  • --help: Show this message and exit.

deeperfly models remove

Remove the downloaded models named from the cache.

Removing costs only time: the next run that names a model downloads it again. A models directory that is a link to a shared copy is left alone. deeperfly cache clear deletes every model at once, with the rest of the cache.

Usage:

$ deeperfly models remove [OPTIONS] {names}...

Arguments:

  • names...: Released models, by name. [required]

Options:

  • -v, --verbose: Debug messages, and a traceback on errors.
  • --help: Show this message and exit.

deeperfly cache

The directory deeperfly keeps its downloads in: show it or clear it.

Usage:

$ deeperfly cache [OPTIONS] COMMAND [ARGS]...

Options:

  • --help: Show this message and exit.

Commands:

  • info: Show the cache directory and what it holds.
  • clear: Delete everything in the cache: every...

deeperfly cache info

Show the cache directory and what it holds.

The cache holds the released models deeperfly downloaded and the kernels the GUI compiled. $DEEPERFLY_CACHE_DIR moves the directory.

Usage:

$ deeperfly cache info [OPTIONS]

Options:

  • --json: Print the report as JSON, for a script.
  • -v, --verbose: Debug messages, and a traceback on errors.
  • --help: Show this message and exit.

deeperfly cache clear

Delete everything in the cache: every model and every kernel.

Clearing costs only time: a model is downloaded again, a kernel compiled again. A models directory that is a link to a shared copy loses the link only. deeperfly models remove deletes the models named and leaves the rest.

Usage:

$ deeperfly cache clear [OPTIONS]

Options:

  • -v, --verbose: Debug messages, and a traceback on errors.
  • --help: Show this message and exit.