Edit me

Tasks

A task is a unit of processing, applied to one or more inputs, and producing derived outputs.

Note:

  • Some tasks produce no outputs, only messages in the console.
  • Tasks often produce outputs independently for each corresponding input e.g. scaling each image to a different size.
  • However, tasks can also produce outputs by aggregating many inputs e.g. a montage image of all inputs.

If you are familar with the map-reduce processing paradigm, these can be considered like a map step or a reduce step.

Predefined tasks

Several predefined tasks are bundled with the Anchor distribution - intended to be easily executed from the command line.

The /config/tasks/ directory.

The predefined tasks are specified by BeanXML in the /config/tasks/ subdirectory in an Anchor distribution.

Users are free to add (or remove) tasks to this directory.

Any task in this directory can be referred in the Anchor command-line application by only its name, with neither a full path nor an .xml extension. These statements both refer to the same task, and achieve the same effect:

anchor -i *.png -t features/hog
anchor -i *.png -t /path/to/anchorDistribution/config/tasks/features/hog.xml

Understanding each task

  • An overview of all the predefined tasks is found in Example Usage.
  • Each task also includes a more detailed description as a comment in its BeanXML.

Building a new task

New tasks can be specified in BeanXML using classes that inherit from Task.