SCTracker.H

Go to the documentation of this file.
00001 /*!@file ModelNeuron/SCTracker.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/SCTracker.H $
00036 
00037 #ifndef MODELNEURON_SCTRACKER_H_DEFINED
00038 #define MODELNEURON_SCTRACKER_H_DEFINED
00039 
00040 #include "Util/SimTime.H"
00041 #include "ModelNeuron/SC.H"
00042 #include "ModelNeuron/CompLayer.H"
00043 #include "ModelNeuron/LowpassNeuron.H"
00044 
00045 //######################################################################
00046 // A tracker based on the SC, the superficial layer serves as a sensory 
00047 // saliency map consisting of two layers, while the deeper layers acts
00048 // as and N-bump or 1-bump stable solution. 
00049 //######################################################################
00050 struct SCTracker : public SCInterface
00051 {
00052   SCTracker(const BorderPolicy bp, const SimTime& timestep, const uint width, const uint height, 
00053             const std::string name = "SCTracker", const std::string units = "") : 
00054     SCInterface(timestep, width, height, name, units)
00055   {
00056     /*setup the sgs: The sgs is a single lamina network containing
00057       interacting excitatory and inhhibitory units where the
00058       excitatory layer (input layer) has local recurrent
00059       excitation. Each unit in the exciatory layer connects directly
00060       to a single unit in the inhibitory layer. The inhibitory units
00061       connect in a gaussian pattern back to the excitatory network.
00062       
00063       The input layer units are LowpassNeuron's, which is an abstract
00064       neural model where positive and negative inputs are split to
00065       different first order lowpass filter (synapses) which then drive
00066       a third first order lowpass system with rectified output. A
00067       variety of lowpass, bandpass and shunting behavior can be
00068       achieved.  The inhibitory layer is a simple rectified lowpass
00069       filter.
00070     */
00071 
00072     //for our SCs excitatory neuron    
00073     const double taue = 10;    //excite tau
00074     const double taues = 150;    //excite tau slow
00075     const double taui = 15;    //inhibit tau
00076     const double tauis = 150;    //inhibit tau slow
00077     const double taus = 15;    //system tau
00078     const double gain = 1.0;   //< 1 will produce tonic activity
00079     const double h = -0.5;     //resting state
00080     const double thresh = 0.0; //rectify at 0.0
00081     LowpassNeuronRectify e(taue, taues, taui, tauis, taus, gain, h, thresh, timestep);
00082     
00083     const double inhtau = 10;  //inhibitory neuron tau
00084     const double hinh = -0.5;   //resting state
00085     LowPassRectify i(inhtau, hinh, thresh, timestep);
00086     
00087     //for our SCs excitatory / inhibitory competitive layer
00088     const double estd = 0.0;
00089     const double istd = 0.0;
00090     const double ew = 0.0; 
00091     const double ffwd = 1.0; 
00092     const double fdbck = 1000.0;   
00093     CompLayer<LowpassNeuronRectify, LowPassRectify> sgs(estd, istd, ew, ffwd, fdbck, 
00094                                                         bp, timestep, width, height, name, units);
00095     sgs.setModules(e,i);
00096     addSub(sgs);
00097   }
00098 
00099   //modules interact
00100   void interact()
00101   {
00102     //sgs -> sgi  : uniform weights
00103     //Image<double> sgs = getSub(0).getOutput();
00104     //input(sgs, 1);
00105   }
00106   
00107   //set bottom-up input
00108   void input_sgs(const Image<double>& inp) 
00109   { input(inp, 0); }
00110   
00111   //set top-down input
00112   void input_sgi(const Image<double>& inp)
00113   { input(inp, 1); }
00114   
00115   //clone the object
00116   SCTracker* clone() const
00117   { return new SCTracker(*this); }
00118 };
00119 
00120 // ######################################################################
00121 // register the neural field SC
00122 // ######################################################################
00123 namespace 
00124 {
00125   typedef SimStructure::Factory SCTRFactory;
00126   typedef SimStructure::Creator SCTRCreator;
00127   
00128   //define creation functions
00129   struct RegisterSCTracker
00130   {
00131     RegisterSCTracker() 
00132     {
00133       const SimTime time = SimTime::MSECS(1.0);   //default simulation time
00134       const uint w(100), h(100);                  //default dimensions
00135       
00136       //an SC model were the sgs is modeled as NFNbumpDoG and the SCi as a NFNbumpCS which can turn to an NF1bumpCS
00137       //######################################################################
00138       SCTRFactory::instance().add("SCTracker",SCTRCreator::make<SCTracker>(NONE, time, w, h));
00139     }
00140   };
00141   static RegisterSCTracker registersctr;  
00142 }
00143 
00144 #endif
00145 // ######################################################################
00146 /* So things look consistent in everyone's emacs... */
00147 /* Local Variables: */
00148 /* indent-tabs-mode: nil */
00149 /* End: */
00150 
00151 
00152     //LowpassCompLayer SCs(tau, -0.05, -0.05, 1.5, 3.0, 0.25, 1.0, -0.75, bp, timestep, width, height);
00153     // set up SCs - local excitation and long range (but not global), in a two layer structure, 
00154     // allowing for adaptation. 
00155     //LowpassCompLayer SCs(tau, -0.05, -0.05, 1.5, 3.0, 0.25, 1.0, -0.75, bp, timestep, width, height);
00156     //IZCompLayer SCs(1.0, 3.0, 1.0, 5.0, -1.0, NONE, timestep, width, height);
00157     //FSNeuron fs;
00158     //fs.setDecoderPost(AlphaDecoder(timestep, SimTime::MSECS(15.0)));
00159     //SCs.setModules(fs, fs);
00160     //SCs.setName("SCs");  
00161     //addSub(SCs); 
00162 
00163     //set up SCi, an n-bump solution which can be switch to an 1-bump solution
00164     //NeuralFieldCS SCi(tau,-0.05, 1.5,.3, bp, timestep, width, height);    
00165     //SCi.setName("SCi");
00166     //addSub(SCi); the problem is in the SC module
Generated on Sun May 8 08:41:01 2011 for iLab Neuromorphic Vision Toolkit by  doxygen 1.6.3