Coding explains development of binocular vision and its failure in Amblyopia (Eckmann et al 2020)

 Download zip file 
Help downloading and running models
Accession:261483
This is the MATLAB code for the Active Efficient Coding model introduced in Eckmann et al 2020. It simulates an agent that self-calibrates vergence and accommodation eye movements in a simple visual environment. All algorithms are explained in detail in the main manuscript and the supplementary material of the paper.
Reference:
1 . Eckmann S, Klimmasch L, Shi BE, Triesch J (2020) Active efficient coding explains the development of binocular vision and its failure in amblyopia. Proc Natl Acad Sci U S A [PubMed]
Citations  Citation Browser
Model Information (Click on a link to find other models with that property)
Model Type: Predictive Coding Network; Connectionist Network;
Brain Region(s)/Organism:
Cell Type(s): Abstract rate-based neuron;
Channel(s):
Gap Junctions:
Receptor(s):
Gene(s):
Transmitter(s):
Simulation Environment: MATLAB;
Model Concept(s): Action Selection/Decision Making; Reinforcement Learning; Unsupervised Learning; Amblyopia;
Implementer(s): Eckmann, Samuel [ec.sam at outlook.com]; Klimmasch, Lukas [klimmasch at fias.uni-frankfurt.de];
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% 
%%% This function produces a numerical approximation to 2D Gabor function.
%%% Parameters:
%%% sigma  = standard deviation of Gaussian envelope, this in-turn controls the
%%%          size of the result (pixels)
%%% orient = orientation of the Gabor clockwise from the vertical (degrees)
%%% wavel  = the wavelength of the sin wave (pixels)
%%% phase  = the phase of the sin wave (degrees)
%%% aspect = aspect ratio of Gaussian envelope (0 = no "width" to envelope, 
%%%          1 = circular symmetric envelope)
%%% pxsize = the size of the filter (optional). If not specified, size is 5*sigma.
%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

function gb=Gabor(sigma,orient,wavel,phase,aspect,pxsize,shift,dispa)

if nargin<6
  pxsize=fix(5*sigma);
end

if mod(pxsize,2)~=0
    [x, y]=meshgrid(-fix(pxsize/2):fix(pxsize/2),-fix(pxsize/2):fix(pxsize/2));
else
    [x, y]=meshgrid(-fix(pxsize/2)+0.5:fix(pxsize/2)-0.5,-fix(pxsize/2)+0.5:fix(pxsize/2)-0.5);
end

x = x+dispa;  % add disparity tuing

orient=-orient*pi/180;  % rotate subfield
x_theta=x*cos(orient)+y*sin(orient);
y_theta=-x*sin(orient)+y*cos(orient);

phase=phase*pi/180;
freq=2*pi./wavel;

shift_x=shift(1);
shift_y=shift(2);

gb=exp(-0.5.*( (((x_theta+shift_x).^2)/(sigma^2)) ...
			 + (((y_theta+shift_y).^2)/((aspect*sigma)^2)) )) ...
   .* (cos(freq*y_theta+phase) - cos(phase).*exp(-0.25.*((sigma*freq).^2)));