This project focuses on simulating image processing mechanisms inspired by the primary visual cortex (V1) and investigating interlayer communication in Spiking Neural Networks (SNNs). The project implements filters like Difference of Gaussians (DoG) and Gabor filters to simulate the functionality of V1 neurons, and uses neural coding schemes such as Time to First Spike (TTFS) and Poisson coding. The Spike-Timing-Dependent Plasticity (STDP) learning rule is applied to enhance the learning process in SNNs.
This project aims to simulate the functionality of visual cortex neurons through the application of DoG and Gabor filters on grayscale images, mimicking edge detection processes in biological vision systems. Furthermore, the project explores the encoding of visual information using TTFS and Poisson coding, and analyzes the performance of spiking neural networks with interlayer communication using the STDP learning rule.
- DoG Filter:
- Simulates on-center off-surround and off-center on-surround retinal receptive fields for edge detection.
- Gabor Filter:
- Simulates simple cells in the primary visual cortex (V1), detecting edges at specific orientations and spatial frequencies.
- Neural Coding:
- Time to First Spike (TTFS): Encodes images based on the timing of neuron spikes.
- Poisson Coding: Encodes images using Poisson-distributed spike times.
- Spike-Timing-Dependent Plasticity (STDP):
- STDP learning rule adjusts synaptic weights based on spike timing to optimize the SNN’s performance in recognizing visual patterns.
-
Clone the repository:
git clone https://github.com/MohaZamani/SNN-Visual-Cortex-Simulation.git
-
Install the necessary dependencies:
pip install -r requirements.txt
-
Run the simulation notebooks:
- For DoG and Gabor Filters: Open and run
Filters.ipynb
- For SNN with STDP: Open and run
SNN.ipynb
You can launch the notebooks by executing:
jupyter notebook
- For DoG and Gabor Filters: Open and run
Results from the simulations include:
- Edge Detection: Visualization of the effects of DoG and Gabor filters on input images, showing enhanced edge detection.
- Spike Raster Plots: Visualization of neural activity using TTFS and Poisson coding.
- Weight Changes: Visualization of synaptic weight adjustments using the STDP learning rule.
All simulation results and detailed analysis is provided in the report.
- Gabor Filters: Gabor Filters in Visual Processing
- STDP Learning: Spike-Timing-Dependent Plasticity on Wikipedia
- Primary Visual Cortex (V1): Visual Cortex Overview