Skip to content

Command Line Interface

IPSO Phen can be used as a CLI.

Using

All command line arguments are optional, but, they must form a understandable blob. Python environment must be activated in order for the CLI to work.

Using a stored state

--stored-state argument with a valid stored state (built in IPSO Phen) is enough to launch the CLI. This is the preferred way to use the CLI as it reduces the number of arguments.

Example:

1
(env) foo@bar:~$> ipso_cli --stored-state my_stored_state.json

Using separated arguments

The CLI also accepts a list of arguments to build the equivalent to a stored state. These arguments must at least have:

  • A script: --script, path to a pipeline/script built with IPSO Phen
  • A source: this can be:
  • An image: --image, path to a source image
  • A list of images: --image-list, a text file containing a list of images
  • An output folder: --output-folder, path to an output folder for the extracted data
  • A file name for the final CSV file: --csv-file-name, a file name where the final output will be written, the path will be the output folder.

If --image and --image-list are both present, all images available will be processed.

Example:

1
(env) foo@bar:~$/> ipso_cli --image my_image.tiff --script my_script.json --output-folder a_folder --csv-file-name my_csv_file_name.csv

Overrides

When using a stored state, all parameters used for separate arguments can be used as overrides.

Other overrides include that can also be used as separated parameters :

  • Thread count override: --thread-count, number of concurrent analysis. The default value is set to 1. Avoid setting this value over the available threads of your computer.
  • Overwrite: --overwrite, overwrite existing partial analysis, set by default to false. When analyzing images, IPSO Phen writes every image's analysis result to a different partial file, this way if the analysis must be interrupted almost nothing is lost.
  • Build annotation ready CSV: --build-annotation-csv", if present a CSV file for disease index annotation will be generated.
  • Generate series id, group plants by close timestamp: --generate-series-id", if present each row of the final csv will be annotated to tag all photos of each plant taking in an amount of time. When every plant is captured multiple times each time -for example, multiple angles- every image corresponding to the group will have the same tag.
  • Series id delta: --series-id-delta", Images of an item taken within minutes of time delta will have the same series id".

Advanced features

If you've linked IPSO Phen to a database (contact me for help on how to link IPSO Phen to a database) the following arguments can be used:

  • Target database: --database, name of the database where the images are located.
  • Target experiment: --experiment, name of the experiment to analyse, must exist within the selected database.

Example:

1
(env) foo@bar:~$/>ipso_cli --database mydatabase --experiment myexperiment --output-folder ./myoutputfolder --script .\myscript.json

Final notes

  • if --generate-series-id is used only one partial CSV file will be generated by group.
  • Even if there's only one plant to process, partial results will be generated.