Skip to content

Usage

Digital frame grab tool for VARS imaged moments.

Installation

To install dfg-tool, see the installation instructions.

🚀 Quickstart

  1. Specify a collection of imaged moments to capture:

    e.g. imaged_moment_uuids.txt:

    1aafcb26-c5f3-45cd-1f64-ba0c5627c91e
    360b6015-d81c-4028-bd04-b674825024bd
    13410549-eaea-452f-ba48-4fb29bc874e8
    
  2. Run the dfg extract command:

    dfg extract imaged_moment_uuids.txt -o frames/
    Username: <username>
    Password: <password>
    

    The frames will be extracted according to the imaged moments and saved to the frames directory.

  3. Review the extracted frames in the frames directory.

    e.g. 20220220T174855Z--6e3f77d2-1227-412a-b78e-9b7f5cc5ae81.png:

    20220220T174855Z--6e3f77d2-1227-412a-b78e-9b7f5cc5ae81.png

    Any frames that are not desirable can be deleted from the frames directory.

  4. Run the dfg upload command:

    dfg upload frames/
    Username: <username>
    Password: <password>
    

    The frames will be uploaded to the framegrab service and registered within VARS.

⚙️ Commands

The root command for dfg-tool is dfg. To see detailed usage instructions, add -h/--help to any command:

dfg -h

The -v/--verbose flag can be added to any command to enable verbose logging to the console. The -l/--log path/to/logfile.txt option can be added to any command to enable logging to a file. Note that these options must be added before the subcommand.

The following subcommands are available:

extract

Extract frames from imaged moments.

e.g.:

dfg extract imaged_moment_uuids.txt -o frames/

The -o/--output option specifies the output directory for the extracted frames. This must be a valid directory path.

The --raziel-api-url option specifies the URL for the Raziel configuration service. This is optional and defaults to https://m3.shore.mbari.org/config.

The --username and --password options specify the username and password for Raziel. These are optional and default to None. If unspecified, the user will be prompted to enter their username and password. Alternatively, these can be specified using environment variables VARS_USERNAME and VARS_PASSWORD. If values are provided in both the environment variables and the command line, the command line values will take precedence.

upload

Upload frames to the framegrab service.

e.g.:

dfg upload frames/

Similar to the extract command, the --raziel-api-url, --username, and --password options can be specified.