Documentation
¶
Overview ¶
Package v1complex implements V1 (primary visual cortex) complex-cell filters, which operate on the output of V1 simple-cell (gabor) filters. Tests indicate that these filters significantly improve object recognition performance, beyond what is available from simple-cell output only, and they are well-established biologically.
Typically the AngleOnly version of V1 simple cell inputs are used: MaxReduce over the two (On vs. Off) polarities of gabor filters.
* Length Sum (LenSum) integrates multiple simple-cells along orientation direction, producing larger-scale features.
* End Stop computes the difference between a length sum input minus a set of same-orientation stopping features at the end of the line. Thus, it responds maximally where a line ends. The length sum is one to the "left" of the current position and the off features are one to the "right".
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // end-stop off coordinates for 4 angles, also uses negated versions // these go with the negative versions of Line4X (i.e., are in same dir) // -- | = (1,1), (1,0), (1,-1) (X,Y) // --| // / = (0,1), (1,1), (1,0) // --- // | = (-1,1), (0,1), (1,1) // \ = (0,-1), (1,-1), (1,0) // --| // 3 coords per angle EndStopOff4X = []int{ 1, 1, 1, 0, 1, 1, -1, 0, 1, 0, 1, 1} EndStopOff4Y = []int{ 1, 0, -1, 1, 1, 0, 1, 1, 1, -1, -1, 0} )
var ( // linear neighbor coordinates for 4 angles, also uses negated version // -- = (1,0) (X,Y) // / = (1,1) // | = (0,1) // \ = (1,-1) Line4X = []int{1, 1, 0, 1} Line4Y = []int{0, 1, 1, -1} )
Functions ¶
func EndStop4 ¶
EndStop4 computes end-stop activations: es := lsum - max(off) lsum is the length-sum activation to the "left" of feature and max(off) is the max of the off inhibitory region to the "right" of feature. Both directions are computed, as two rows by angles. Act must be a 4D tensor with features as inner 2D. 4 version ONLY works with 4 angles (inner-most feature dimension)
Types ¶
This section is empty.