Workflow

This documents a step-by-step example of a typical video analysis workflow.

Recording

The user records the video. We need to take extra care to make sure the recording continues even in spite of temporary disturbances (e.g. EM interference messing up the USB device connection).

Todo

(Idea: notify the user (email/SMS?) in case the recording has stopped, or lost connection with recording computer. Some experiments can have very long and expensive preparations.)

Importing config from previous experiment (optional step)

An important feature is the ability to either import or share region information between experiments. Experimenters will often take care to not move the camera/setup, then take a large number of videos with different animals and conditions but with identically defined regions, and very likely identical reports to produce.

Todo

I believe there’s an important (unsolved) question here about the relationship between files that have the same regions and/or report settings. If the user decides to change some region or setting, they would have to manually re-do every analysis. how2fix?

See also

Relationships between similar files
In-depth discussion of this issue.

Active area selection

The user is asked to select the active area (what part of the video we actually care about; everything else will be ignored).

Foreground separation

The user is asked to assist the software in identifying which parts of the video are foreground and what is background.

See also

Foreground separation workflow
More detail on foreground separation.

Classification

The software identifies the foreground and reduces it to geometric information. For example, the picture of a rat should be reduced to its position, its orientation, and the approximate positions of its body parts.

The user must of course tell the software which classifiers to use. A classifier may have parameters that the user must fill in, and a classifier may also take the outputs of other classifiers as inputs.

Note

The user should be able to define and add additional classifiers; for example, keeping track of which animal is which by looking for a colored dot on their head.

Note

Keep track of dependencies between computed quantities to avoid redoing expensive computations.

Report production

The user selects a predefined report; a typical example would be “what fraction of the time the rat spends in this region”. The user is asked to fill in the report parameters:

  1. The name of the report.
  2. The region of interest (which they are asked to define in the Region selection window).
  3. The type and parameters of time averaging (for example, binning into 5 and 30 minute intervals).

If no report exists that does what the user wants, the user can instead define their own by writing some Python code that takes the classification information as an input (and potentially uses other report production code) and produces whatever quantity they want.

Note

There’s really no difference between a classification and a report production method. It’s merely a conceptual difference to help the users.