Vision models¶
|
Describes a random generator for Gabor filters. |
|
Describes a sparse receptive-field mask for encoders. |
|
Computed Input Weights (CIW) method for encoders from data. |
Constrained difference (CD) method for encoders from data. |
|
Pick biases such that neurons are active for a percentile of inputs. |
-
class
nengo_extras.vision.
Gabor
(theta=Uniform(low=- 3.141592653589793, high=3.141592653589793), freq=Uniform(low=0.2, high=2), phase=Uniform(low=- 3.141592653589793, high=3.141592653589793), sigma_x=Choice(options=array([0.45])), sigma_y=Choice(options=array([0.45])))[source]¶ Describes a random generator for Gabor filters.
-
class
nengo_extras.vision.
Mask
(image_shape)[source]¶ Describes a sparse receptive-field mask for encoders.
- Parameters
- image_shape2- or 3-tuple
Shape of the input image, either (height, width) or (channels, height, width).
-
nengo_extras.vision.
ciw_encoders
(n_encoders, trainX, trainY, rng=numpy.random, normalize_data=True, normalize_encoders=True)[source]¶ Computed Input Weights (CIW) method for encoders from data.
- Parameters
- n_encodersint
Number of encoders to generate.
- trainX(n_samples, n_dimensions) array-like
Training features.
- trainY(n_samples,) array-like
Training labels.
- Returns
- encoders(n_encoders, n_dimensions) array
Generated encoders.
References
- 1
McDonnell, M. D., Tissera, M. D., Vladusich, T., Van Schaik, A., Tapson, J., & Schwenker, F. (2015). Fast, simple and accurate handwritten digit classification by training shallow neural network classifiers with the “Extreme learning machine” algorithm. PLoS ONE, 10(8), 1-20. doi:10.1371/journal.pone.0134254
-
nengo_extras.vision.
cd_encoders_biases
(n_encoders, trainX, trainY, rng=numpy.random, mask=None, norm_min=0.05, norm_tries=10)[source]¶ Constrained difference (CD) method for encoders from data.
- Parameters
- n_encodersint
Number of encoders to generate.
- trainX(n_samples, n_dimensions) array-like
Training features.
- trainY(n_samples,) array-like
Training labels.
- Returns
- encoders(n_encoders, n_dimensions) array
Generated encoders.
- biases(n_encoders,) array
Generated biases. These are biases assuming
f = G[E * X + b]
, and are therefore more like Nengo’sintercepts
.
References
- 1
McDonnell, M. D., Tissera, M. D., Vladusich, T., Van Schaik, A., Tapson, J., & Schwenker, F. (2015). Fast, simple and accurate handwritten digit classification by training shallow neural network classifiers with the “Extreme learning machine” algorithm. PLoS ONE, 10(8), 1-20. doi:10.1371/journal.pone.0134254
-
nengo_extras.vision.
percentile_biases
(encoders, trainX, percentile=50)[source]¶ Pick biases such that neurons are active for a percentile of inputs.
-
class
nengo_extras.convnet.
PresentJitteredImages
(images, presentation_time, output_shape, jitter_std=None, jitter_tau=None, **kwargs)[source]¶
Camera input¶
To use these classes, you will have to install GStreamer and some Python dependencies:
sudo apt install python-gst-1.0
pip install vext vext.gi
|
|
|
|
|