Default model layer to use for evaluation.
Choose model parameters using a graphical interface.
This presents a display similar to that shown in Figure 1.
Get the current experiment object.
This is an advanced function. In general, the user should not modify the experiment object directly.
Set the verbosity of log output.
Parameters: | flag (bool) – Whether to enable verbose logging. |
---|
Get the Glimpse model used for this experiment.
This is an advanced function. In general, the user should not need to interact with the model directly.
Read images from the corpus directory.
This function assumes that each sub-directory contains images for exactly one object class, with a different object class for each sub-directory. Training and testing subsets are chosen automatically.
Parameters: |
|
---|
See also
Read images from per-class corpus sub-directories.
This function assumes that each sub-directory contains images for exactly one object class, with a different object class for each sub-directory. Training and testing subsets are chosen automatically.
Parameters: |
|
---|
See also
Read images and training information from the corpus directory.
This function assumes that the train_dir and test_dir have the same set of sub-directories. Each sub-directory shoudl contain images for exactly one object class, with a different object class for each sub-directory.
Parameters: |
|
---|
See also
Use a sample image corpus for this experiment.
Parameters: | name (str) – Corpus name. One of ‘easy’, ‘moderate’, or ‘hard’. |
---|
This provides access to a small set of images for demonstration purposes, which are composed of simple shapes on various background patterns.
Manually specify the set of S2 prototypes.
Parameters: | prototypes (str or list of array of float) – Path to prototypes on disk, or prototypes array to set. |
---|---|
Return type: | list of array of float |
Returns: | Set of model prototypes. |
Create a set of S2 prototypes by “imprinting” from training images.
Patches are drawn from all classes of the training data.
Parameters: | num_prototypes (int) – Number of prototypes to create. |
---|
Create a set of random S2 prototypes drawn from the uniform distribution.
Each element of every prototype is drawn independently from an uniform distribution with the same parameters.
Parameters: |
|
---|
Create a set of “imprinted” S2 prototypes that have been shuffled.
Each prototype has its contents randomly permuted across location and orientation band.
Parameters: | num_prototypes (int) – Number of prototypes to create. |
---|
Create a set of S2 prototypes drawn from a 1D histogram of C1 activity.
The set is created by drawing elements from a distribution that is estimated from a set of imprinted prototypes. Each entry is drawn independently of the others.
Parameters: | num_prototypes (int) – Number of prototypes to create. |
---|
Create a set of random S2 prototypes drawn from the normal distribution.
Each element of every prototype is drawn independently from a normal distribution with the same parameters.
Parameters: | num_prototypes (int) – Number of prototypes to create. |
---|
Create a set of S2 prototypes by clustering C1 samples with k-Means.
Parameters: |
|
---|
Compute the model activity for all images in the experiment.
Parameters: |
|
---|
Apply a classifier to the image features in the experiment.
Parameters: |
|
---|---|
Return type: | ExperimentData |
Returns: | Results of evaluation. |
Return the number of S2 prototypes in the model.
Parameters: | kwidth (int) – Index of kernel shape. |
---|
Return an S2 prototype from the experiment.
Parameters: |
|
---|
Return the image location from which a prototype was imprinted.
This requires that the prototypes were learned by imprinting.
Parameters: |
|
---|---|
Returns: | Location information in the format (image index, scale, y-offset, x-offset), where scale and y- and x-offsets identify the S2 unit from which the prototype was “imprinted”. |
Return type: | 4 element array of int |
Returns the model layers from which features were extracted.
Parameters: | evaluation (int) – Index of the evaluation record to use. |
---|---|
Return type: | list of str |
Returns: | Names of layers used for evaluation. |
Returns the results of a model evaluation.
Parameters: | evaluation (int) – Index of the evaluation record to use. |
---|---|
Return type: | glimpse.util.data.Data |
Returns: | Result data, with attributes that depend on the method of evaluation. In general, the feature_builder, score, score_func attributes will be available. |
Get information about classifier predictions.
Parameters: |
|
---|---|
Return type: | list of 3-tuple of str |
Returns: | filename, true label, and predicted label for each image in the set |
Plot the S2 activity for a given image.
Parameters: |
|
---|
Plot the prototype activation.
There is one plot for each orientation band.
Parameters: |
|
---|
Plot the image region used to construct a given imprinted prototype.
This shows the image in the background, with a red box over the imprinted region.
Parameters: |
|
---|
Plot the S2 activity and image data for a given image.
This shows the image in the background, with the S2 activity on top.
Parameters: |
|
---|
Plot the C1 activation for a given image.
This shows the image in the background, with the activation plotted on top. There is one plot for each orientation band.
Parameters: |
|
---|
Plot the S1 activation for a given image.
This shows the image in the background, with the activation plotted on top. There is one plot for each orientation band.
Parameters: |
|
---|