v1complex

package
v2.0.0-dev0.0.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 15, 2024 License: BSD-3-Clause Imports: 4 Imported by: 1

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

View Source
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}
)
View Source
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

func EndStop4(act, lsum, estop *etensor.Float32)

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)

func LenSum4

func LenSum4(act, lsum *etensor.Float32)

LenSum4 computes summed line activations. If lsum is not same shape as act, it will be made so (most efficient to re-use same structure). 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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL