{"id":19647477,"url":"https://github.com/mohazamani/snn-visual-cortex-simulation","last_synced_at":"2026-06-09T02:35:31.552Z","repository":{"id":258179265,"uuid":"874062713","full_name":"MohaZamani/SNN-Visual-Cortex-Simulation","owner":"MohaZamani","description":"Simulates image processing in the visual cortex using Gabor and DoG filters in spiking neural networks.","archived":false,"fork":false,"pushed_at":"2024-10-17T13:01:17.000Z","size":18863,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-09T22:19:22.677Z","etag":null,"topics":["computational-neuroscience","computational-vision","dog-filter","gabor-filter","neural-coding","neural-networks","neuroscience","primary-visual-cortex","spiking-neural-networks","ttfs","vision-neuroscience"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MohaZamani.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-17T07:32:55.000Z","updated_at":"2024-10-17T14:43:51.000Z","dependencies_parsed_at":"2024-10-17T23:35:06.740Z","dependency_job_id":null,"html_url":"https://github.com/MohaZamani/SNN-Visual-Cortex-Simulation","commit_stats":null,"previous_names":["mohazamani/snn-visual-cortex-simulation"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MohaZamani%2FSNN-Visual-Cortex-Simulation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MohaZamani%2FSNN-Visual-Cortex-Simulation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MohaZamani%2FSNN-Visual-Cortex-Simulation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MohaZamani%2FSNN-Visual-Cortex-Simulation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MohaZamani","download_url":"https://codeload.github.com/MohaZamani/SNN-Visual-Cortex-Simulation/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240954378,"owners_count":19884177,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["computational-neuroscience","computational-vision","dog-filter","gabor-filter","neural-coding","neural-networks","neuroscience","primary-visual-cortex","spiking-neural-networks","ttfs","vision-neuroscience"],"created_at":"2024-11-11T14:44:17.080Z","updated_at":"2026-06-09T02:35:26.533Z","avatar_url":"https://github.com/MohaZamani.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Processing in Primary Visual Cortex and Interlayer Communication in Spiking Neural Networks\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./Report/Figs/hubel.jpg\" alt=\"description\" width=\"500\"/\u003e\n\u003c/p\u003e\n\nThis 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.\n\n## Table of Contents\n- [Project Overview](#project-overview)\n- [Implemented Features](#implemented-features)\n- [How to Run](#how-to-run)\n- [Results](#results)\n- [References](#references)\n\n## Project Overview\nThis 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**.\n\n## Implemented Features\n1. **DoG Filter**:\n   - Simulates on-center off-surround and off-center on-surround retinal receptive fields for edge detection.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./Report/Figs/cdog.png\" alt=\"description\" width=\"600\"/\u003e\n\u003c/p\u003e\n\n2. **Gabor Filter**:\n   - Simulates simple cells in the primary visual cortex (V1), detecting edges at specific orientations and spatial frequencies.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./Report/Figs/gaborres.png\" alt=\"description\" width=\"600\"/\u003e\n\u003c/p\u003e\n\n3. **Neural Coding**:\n   - **Time to First Spike (TTFS)**: Encodes images based on the timing of neuron spikes.\n   - **Poisson Coding**: Encodes images using Poisson-distributed spike times.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./Report/Figs/ttfs_bird.png\" alt=\"description\" width=\"400\"/\u003e\n\u003c/p\u003e\n\n\n4. **Spike-Timing-Dependent Plasticity (STDP)**:\n   - STDP learning rule adjusts synaptic weights based on spike timing to optimize the SNN’s performance in recognizing visual patterns.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./Report/Figs/STDP.jpg\" alt=\"description\" width=\"400\"/\u003e\n\u003c/p\u003e\n\n## How to Run\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/MohaZamani/SNN-Visual-Cortex-Simulation.git\n2. Install the necessary dependencies:\n   ```bash\n   pip install -r requirements.txt\n3. Run the simulation notebooks:\n   - **For DoG and Gabor Filters**: Open and run `Filters.ipynb`\n   - **For SNN with STDP**: Open and run `SNN.ipynb`\n\n   You can launch the notebooks by executing:\n   ```bash\n   jupyter notebook\n## Results\nResults from the simulations include:\n- **Edge Detection**: Visualization of the effects of DoG and Gabor filters on input images, showing enhanced edge detection.\n- **Spike Raster Plots**: Visualization of neural activity using TTFS and Poisson coding.\n- **Weight Changes**: Visualization of synaptic weight adjustments using the STDP learning rule.\n\nAll simulation results and detailed analysis is provided in the [report](./Report/Report-P5.pdf).\n\n## References\n- **Gabor Filters**: [Gabor Filters in Visual Processing](https://en.wikipedia.org/wiki/Gabor_filter)\n- **STDP Learning**: [Spike-Timing-Dependent Plasticity on Wikipedia](https://en.wikipedia.org/wiki/Spike-timing-dependent_plasticity)\n- **Primary Visual Cortex (V1)**: [Visual Cortex Overview](https://en.wikipedia.org/wiki/Visual_cortex)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohazamani%2Fsnn-visual-cortex-simulation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmohazamani%2Fsnn-visual-cortex-simulation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohazamani%2Fsnn-visual-cortex-simulation/lists"}