cl_api.md 9.58 KB

The command line API is a tool to run OpenBR from the command line. The command line is the easiest and fastest way to run OpenBR!

The following is a detailed description of the command line API. The command line API is really just a set of wrappers to call the C API. All of the flags in this API have a corresponding C API call. To help display the examples the following shorthand definitions will be used:

Shortcut Definition
<arg> <> Represent an input argument
{arg} {} Represent an output argument
[arg] [] Represent an optional argument
(arg0 | ... | argN) (... | ...) Represent a choice.

Algorithms

Almost every command line process needs to specify an algorithm to work properly. Algorithms in OpenBR are described in detail here. To specify algorithms to the command line use the -algorithm flag like so:

    -algorithm "AlgorithmString"

Make sure you use the quotes if your algorithm is longer than one plugin because special characters in OpenBR are also special characters (with very different meanings!) in Bash.

Core Commands

-train {: #train }

Train a model

  • arguments:

    -train <gallery> ... <gallery> [{model}]
    
  • wraps: br_train_n

-enroll {: #enroll }

Enroll a Gallery through an algorithm

  • arguments:

    -enroll <input_gallery> ... <input_gallery> {output_gallery}
    
  • wraps: br_enroll or br_enroll_n depending on the input size

-compare {: #compare }

Compare query Templates against a target Gallery

  • arguments:

    -compare <target_gallery> <query_gallery> [{output}]
    
  • wraps: br_compare

-pairwiseCompare {: #pairwisecompare }

DOCUMENT ME

  • arguments:

    -pairwiseCompare <target_gallery> <query_gallery> [{output}]
    
  • wraps: br_pairwise_compare

-eval {: #eval }

Evaluate a similarity matrix

  • arguments:

    -eval <simmat> [<mask>] [{csv}] [{matches}]
    
  • wraps: br_eval

-inplaceEval {: #inplaceeval }

DOCUMENT ME

  • arguments:

    -inplaceEval <simmat> <target> <query> [{output}]
    
  • wraps: br_inplace_eval

-plot {: #inplaceeval}

Plot the results of an evaluation

  • arguments:

           -plot <file> ... <file> {destination}
    
  • wraps: br_plot

Other Commands

-fuse {: #fuse }

Perform score level fusion on similarity matrices.

  • arguments:

    -fuse <simmat> ... <simmat> (None|MinMax|ZScore|WScore) (Min|Max|Sum[W1:W2:...:Wn]|Replace|Difference|None) {simmat}
    
  • wraps: br_fuse

-cluster {: #cluster }

Clusters one or more similarity matrices into a list of subjects

  • arguments:

    -cluster <simmat> ... <simmat> <aggressiveness> {csv}
    
  • wraps: br_cluster

-makeMask {: #makemask }

Constructs a mask from target and query inputs

  • arguments:

    -makeMask <target_gallery> <query_gallery> {mask}
    
  • wraps: br_make_mask

-makePairwiseMask {: #makepairwisemask }

Constructs a mask from target and query inputs considering the target and input sets to be definite pairwise comparisons.

-combineMasks {: #combinemask }

Combines several equal-sized mask matrices. A comparison may not be simultaneously indentified as both a genuine and an imposter by different input masks.

  • arguments:

    -combineMasks <mask> ... <mask> {mask} (And|Or)
    
  • wraps: br_combine_masks

-cat {: #cat }

Concatenates a list of galleries into 1 gallery

  • arguments:

    -cat <gallery> ... <gallery> {gallery}
    
  • wraps: br_cat

-convert {: #convert }

Convert a file to a different type. Files can only be converted to types within the same group. For example formats can only be converted to other formats.

  • arguments:

    -convert (Format|Gallery|Output) <input_file> {output_file}
    
  • wraps: br_convert

-evalClassification {: #evalclassification }

Evaluates and prints classification accuracy to terminal

  • arguments:

    -evalClassification <predicted_gallery> <truth_gallery> <predicted property name> <ground truth property name>
    
  • wraps: br_eval_classification

-evalClustering {: #evalclustering }

Evaluates and prints clustering accuracy to the terminal

-evalDetection {: #evaldetection }

Evaluates and prints detection accuracy to terminal

  • arguments:

    -evalDetection <predicted_gallery> <truth_gallery> [{csv}] [{normalize}] [{minSize}] [{maxSize}]
    
  • wraps: br_eval_detection

-evalLandmarking {: #evallandmarking }

Evaluates and prints landmarking accuracy to terminal

  • arguments:

    -evalLandmarking <predicted_gallery> <truth_gallery> [{csv} [<normalization_index_a> <normalization_index_b>] [sample_index] [total_examples]]
    
  • wraps: br_eval_landmarking

-evalRegression {: #evalregression }

Evaluates regression accuracy to disk

  • arguments:

    -evalRegression <predicted_gallery> <truth_gallery> <predicted property name> <ground truth property name>
    
  • wraps: br_eval_regression

-assertEval {: #asserteval }

Evaluates the similarity matrix using the mask matrix. Function aborts if TAR @ FAR = 0.001 does not meet an expected performance value.

  • arguments:

    -assertEval <simmat> <mask> <accuracy>
    
  • wraps: br_assert_eval

-plotDetection {: #plotdetection }

Renders detection performance figures for a set of .csv files created by -evalDetection.

-plotLandmarking {: #plotlandmarking }

Renders landmarking performance figures for a set of .csv files created by -evalLandmarking

-plotMetadata {: #plotmetadata }

Renders metadata figures for a set of .csv files with specified columns

-project {: #project }

A naive alternative to -enroll

  • arguments:

    -project <input_gallery> {output_gallery}
    
  • wraps: br_project

-getHeader {: #getheader }

Retrieve the target and query inputs in the BEE matrix header

-setHeader {: #setheader }

Update the target and query inputs in the BEE matrix header

  • arguments:

    -setHeader {<matrix>} <target_gallery> <query_gallery>
    
  • wraps: br_set_header

-<key> <value> {: #setproperty }

Appends a provided value to the global metadata using a provided key

Miscellaneous

-help {: #help }

Print command line API documentation to the terminal

  • arguments:

    -help
    
  • wraps: N/A

-gui {: #gui }

If this flag is set OpenBR will enable GUI windows to be launched. It must be the first flag set.

  • arguments:

    br -gui
    
  • wraps: N/A

-objects {: #objects }

Returns names and parameters for the requested objects. Each object is newline separated. Arguments are separated from the object name with a tab. This function uses QRegExp syntax

  • arguments:

    -objects [abstraction [implementation]]
    
  • wraps: br_objects

-about {: #about }

Get a string with the name, version, and copyright of the project. This string is suitable for printing or terminal

-version {: #version }

Get the current OpenBR version

-slave {: #slave }

For internal use via ProcessWrapperTransform

-daemon {: #daemon }

DOCUMENT ME

  • arguments:

    -daemon <daemon_pipe>
    
  • wraps: N/A

-exit

Exit the application

  • arguments:

    -exit
    
  • wraps: N/A