Neural network visual processing packages in Go, including standard Gabor filtering
Go to file
2024-07-16 00:30:17 -07:00
colorspace go mod update 2024-05-03 00:37:05 -07:00
dog update to core rename of ShouldShow to ShouldDisplay 2024-07-09 10:55:06 -07:00
examples update to new core 2024-07-16 00:20:16 -07:00
fffb updated to latest core 2024-06-14 17:20:09 -07:00
gabor update to core rename of ShouldShow to ShouldDisplay 2024-07-09 10:55:06 -07:00
kwta updated to latest core 2024-06-14 17:20:09 -07:00
nproc nproc number of processors -- looks at SLURM_CPUS_PER_TASK and runtime.NumCPUs -- cap paralleism at that max 2019-07-21 12:27:30 -07:00
nxx1 updated to latest core 2024-06-14 17:20:09 -07:00
v1complex go mod update 2024-05-01 17:43:52 -07:00
vfilter go mod update 2024-05-01 17:43:52 -07:00
vxform first pass on update to core 0.1.2 2024-05-01 17:43:52 -07:00
.gitignore Initial commit 2019-07-07 00:08:52 -07:00
.travis.yml travis update 2020-12-03 02:01:11 -08:00
doc.go first pass on update to core 0.1.2 2024-05-01 17:43:52 -07:00
go.mod update to latest emer 2024-07-16 00:30:17 -07:00
go.sum update to latest emer 2024-07-16 00:30:17 -07:00
LICENSE Initial commit 2019-07-07 00:08:52 -07:00
Makefile gofmt -s 2020-06-30 01:25:08 -07:00
README.md first pass on update to core 0.1.2 2024-05-01 17:43:52 -07:00

vision

This repository contains visual processing packages in Go (golang), focused mainly on providing efficient V1 (primary visual cortex) level filtering of images, with the output then suitable as input for neural networks.

Two main types of filters are supported:

  • Gabor filters simulate V1 simple-cell responses in terms of an oriented sine wave times a gaussian envelope that localizes the filter in space. This produces an edge detector that detects oriented contrast transitions between light and dark. In general, the main principle of primary visual filtering is to focus on spatial (and temporal) changes, while filtering out static, uniform areas.

  • DoG (difference of gaussian) filters simulate retinal On-center vs. Off-center contrast coding cells -- unlike gabor filters, these do not have orientation tuning. Mathematically, they are a difference between a narrow (center) vs wide (surround) gaussian, of opposite signs, balanced so that a uniform input generates offsetting values that sum to zero. In the visual system, orientation tuning is constructed from aligned DoG-like inputs, but it is more efficient to just use the Gabor filters directly. However, DoG filters capture the "blob" cells that encode color contrasts.

The vfilter package contains general-purpose filtering code that applies (convolves) any given filter with a visual input. It also supports converting an image.Image into a tensor.Float32 tensor which is the main data type used in this framework. It also supports max-pooling for efficiently reducing the dimensionality of inputs.

The kwta package provides an implementation of the feedforward and feedback (FFFB) inhibition dynamics (and noisy X-over-X-plus-1 activation function) from the Leabra algorithm to produce a k-Winners-Take-All processing of visual filter outputs -- this increases the contrast and simplifies the representations, and is a good model of the dynamics in primary visual cortex.