NeuralFieldSC.H

Go to the documentation of this file.
00001 /*!@file ModelNeuron/NeuralFieldSC.H Class declarations for various
00002    simulation structures */
00003 
00004 // //////////////////////////////////////////////////////////////////// //
00005 // The iLab Neuromorphic Vision C++ Toolkit - Copyright (C) 2001 by the //
00006 // University of Southern California (USC) and the iLab at USC.         //
00007 // See http://iLab.usc.edu for information about this project.          //
00008 // //////////////////////////////////////////////////////////////////// //
00009 // Major portions of the iLab Neuromorphic Vision Toolkvit are protected //
00010 // under the U.S. patent ``Computation of Intrinsic Perceptual Saliency //
00011 // in Visual Environments, and Applications'' by Christof Koch and      //
00012 // Laurent Itti, California Institute of Technology, 2001 (patent       //
00013 // pending; application number 09/912,225 filed July 23, 2001; see      //
00014 // http://pair.uspto.gov/cgi-bin/final/home.pl for current status).     //
00015 // //////////////////////////////////////////////////////////////////// //
00016 // This file is part of the iLab Neuromorphic Vision C++ Toolkit.       //
00017 //                                                                      //
00018 // The iLab Neuromorphic Vision C++ Toolkit is free software; you can   //
00019 // redistribute it and/or modify it under the terms of the GNU General  //
00020 // Public License as published by the Free Software Foundation; either  //
00021 // version 2 of the License, or (at your option) any later version.     //
00022 //                                                                      //
00023 // The iLab Neuromorphic Vision C++ Toolkit is distributed in the hope  //
00024 // that it will be useful, but WITHOUT ANY WARRANTY; without even the   //
00025 // implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      //
00026 // PURPOSE.  See the GNU General Public License for more details.       //
00027 //                                                                      //
00028 // You should have received a copy of the GNU General Public License    //
00029 // along with the iLab Neuromorphic Vision C++ Toolkit; if not, write   //
00030 // to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,   //
00031 // Boston, MA 02111-1307 USA.                                           //
00032 // //////////////////////////////////////////////////////////////////// //
00033 //
00034 // Primary maintainer for this file: David Berg <dberg@usc.edu>
00035 // $HeadURL: svn://isvn.usc.edu:/software/invt/trunk/saliency/src/ModelNeuron/NeuralFieldSC.H $
00036 
00037 #ifndef MODELNEURON_NEURALFIELDSC_H_DEFINED
00038 #define MODELNEURON_NEURALFIELDSC_H_DEFINED
00039 
00040 #include "Util/SimTime.H"
00041 #include "ModelNeuron/SimStructures.H"
00042 #include "ModelNeuron/SC.H"
00043 
00044 //######################################################################
00045 // A neural field model which aims to mimmick the types of computations
00046 // which take place in the mammalian supperior colliculus. The basic 
00047 // idea is that the superficial layers (SCs) represent a spatial map
00048 // where very early sensory components merge, and compete or coorporate
00049 // for representation through strong local excitation and long-range 
00050 // (but not global) inhibition. The field does not stabalize, and so
00051 // is only avtive when input is present. We call this a N-bump 
00052 // degenerative solution. 
00053 //
00054 // The intermediate layers (SCi) represent a spatial map of priority
00055 // for the next sensor movement, which incorporates activity from the 
00056 // SCs with external spatial signals. This layers is modeled with a 
00057 // neural field with local excitation and global inhibition. This profile
00058 // is to represent the combination of local inhbition in the SCi, as well 
00059 // as a basal ganglia SCi loop which we hypothesize alters SC activity
00060 // dynamically by increasing inhibition with more SCi activity. The
00061 // gain of the loop can be controlled by external (top-down)
00062 // input or from a measure of confidence on the sensor input (even a 
00063 // measure on the SCs map itself). The effect is an layer which can 
00064 // be dynamically switch from a stable N-bump solution to a stable
00065 // 1-bump solution (winner-take-all). 
00066 //
00067 // we need to fledge this out a bit, but I am beginning to like this model for 
00068 // signal processing purposes
00069 //######################################################################
00070 struct NeuralFieldSC : public SCInterface
00071 {
00072   NeuralFieldSC(const double tau, 
00073                 const double& SCs_SCi, const double& SCi_PreM, const double& PreM_SCi, const double& SCi_SCs,
00074                 const BorderPolicy bp, const SimTime& timestep, const uint width, const uint height, 
00075                 const std::string name = "NeuralFieldSC", const std::string units = "") : 
00076     SCInterface(timestep, width, height, name, units), 
00077     itsS_I(SCs_SCi), itsI_M(SCi_PreM), itsM_I(PreM_SCi), itsI_S(SCi_SCs)
00078     
00079   {
00080     //set up SCs - local excitation and long range (but not global) inhibition
00081     //unstable solution purposely chosen so that the network only outputs when 
00082     //input is present
00083     NeuralFieldDoG SCs(tau, -0.05, 2.0, 3.0, 1.25, bp, timestep, width, height);
00084     SCs.setName("SCs");                                        
00085     
00086     //set up SCi
00087     NeuralFieldCS SCi(tau,-0.05, 1.5,.3, bp, timestep, width, height);    
00088     SCi.setName("SCi");
00089 
00090     //setup premotor layer
00091     Layer<LowPassSigmoid, WeightsEmpty> premotor(timestep, width, height, "Premotor","");
00092     premotor.setModule(LowPassSigmoid(tau, 0.0, 0.55, 12.0, timestep));
00093 
00094     addSub(SCs); addSub(SCi); addSub(premotor);
00095   }
00096 
00097   //modules interact
00098   void interact()
00099   {
00100     //sgs -> sgi  : uniform weights
00101     Image<double> sgs = getSub(0).getOutput();
00102     sgs *= itsS_I;
00103     input(sgs, 1);
00104     
00105     //sgi -> motor layer : uniform weights
00106     Image<double> sgi = getSub(1).getOutput();
00107     sgi *= itsI_M;
00108     input(sgi, 2);
00109     
00110     //pre-motor nurons to inhibitory of sgs : 
00111     Image<double> prem = getSub(2).getOutput();
00112     input(itsM_I.compute(prem), 0);
00113     input(itsI_S.compute(prem), 1);
00114   }
00115 
00116   //set bottom-up input
00117   void input_sgs(const Image<double>& inp) 
00118   { input(inp, 0); }
00119 
00120   //set top-down input
00121   void input_sgi(const Image<double>& inp)
00122   { input(inp, 1); }
00123   
00124   //clone the object
00125   NeuralFieldSC* clone() const
00126   { return new NeuralFieldSC(*this); }
00127 
00128 private:
00129   //our weights
00130   const double itsS_I, itsI_M;
00131   WeightsAll itsM_I, itsI_S;
00132 };
00133 
00134 // ######################################################################
00135 // register the neural field SC
00136 // ######################################################################
00137 namespace 
00138 {
00139   typedef SimStructure::Factory NFSCFactory;
00140   typedef SimStructure::Creator NFSCCreator;
00141   
00142   //define creation functions
00143   struct RegisterNeuralFieldSC
00144   {
00145     RegisterNeuralFieldSC() 
00146     {
00147       const double tau = 25.0;                    //decay constant for low pass modules
00148       const SimTime time = SimTime::MSECS(5.0);   //default simulation time
00149       const uint w(100), h(100);                  //default dimensions
00150 
00151       //an SC model were the sgs is modeled as NFNbumpDoG and the SCi as a NFNbumpCS which can turn to an NF1bumpCS
00152       //######################################################################
00153       NFSCFactory::instance().add("NeuralFieldSC",NFSCCreator::make<NeuralFieldSC>(tau, 1.0, 1.0, -0.1, -0.25, NONE,
00154                                                                                time,w,h));
00155     }
00156   };
00157   static RegisterNeuralFieldSC registernfsc;  
00158 }
00159 
00160 #endif
00161 // ######################################################################
00162 /* So things look consistent in everyone's emacs... */
00163 /* Local Variables: */
00164 /* indent-tabs-mode: nil */
00165 /* End: */
Generated on Sun May 8 08:05:21 2011 for iLab Neuromorphic Vision Toolkit by  doxygen 1.6.3