Library Architecture¶
Glimpse is broken into low-level components that provide fundamental objects
(such as glimpse.models and prototype learning), mid-level code for managing experiments, and the high-level glab API.
Low-Level Code¶
In Glimpse, a backend is an implementation of a set of
low-level filtering operations, such as dot products (convolution) and
radial basis functions (RBFs). Each backend uses a different technique for
implementing these operations, and thus provide different performance
benefits. For example, the base backend implements most operations in compiled C++.
A model implements a full hierarchical network, with layer processing implemented using an arbitrary backend. Functionally, a model provides a transformation from an image to a feature vector given by the activity of the highest layer in the model. In the case of an HMAX-like model, the feature vector may be given by the activity of the C2 layer.
In general, however, this transformation is a mapping between arbitrary states of the network. Thus, given an input state and a description of the desired result, the transformation emits a corresponding output state. Notably, this deals with all (transitive) dependencies needed to compute the output state, provided that these dependencies are eventually satisfied. As an example, this means that a model with three layers (A, B, and C, in that order) can be used to compute layer C from any input state containing either A, B, or both A and B.
A worker pool implements a parallelization strategy for evaluating an arbitrary model on a set of images. Example strategies include multi-core processing on a single host, as well as multi-host processing on a compute cluster.
More information can be found below.
Experiments¶
A central data structure in Glimpse is the ExperimentData class, which records everything needed
to identify how an experiment was conducted and what results were found. The
experimental protocol includes the choice of hierarchical model and its
parameters, the corpus of images, and possibly the training and testing
splits (if chosen manually). The experimental results include the set of S2
prototypes, the features extracted by the model from the images, the
training and testing splits (if chosen automatically), the classifier used,
and its performance on the task.
The glimpse.experiment package implements the ExperimentData data structure, as well as functions
that operate on this structure to conduct an experiment. The
glimpse.glab package provides high-level,
psuedo-declarative interfaces for specifying and running experiments with a
minimum of programming. The rest of the Glimpse library is composed of the
low-level components needed to run an experiment, such as hierarchical model
implementations in glimpse.models, “worker pools” for parallel
computation in glimpse.pools, and prototype learning algorithms in
glimpse.prototypes.
GLAB API¶
The glab API is documented extensively in the user guide, and in the API and
command-line references.