This is an FPGA imlementation of Spiking Neural Network Algorithm that supports simple image classification example.
-
Python version 3.9.0 >
https://www.python.org/
-
Virtualenv
https://pypi.org/project/virtualenv/
-
Clone the repository
git clone https://github.com/USTC-SSE-practice/SNN_FPGA.git
-
Create Virtual Environment
virtualenv venv
OR
python -m venv venv
-
Activate Virtual Environment
source venv\scripts\activate ~ on~windows
source venv/bin/. activate ~ on~mac
-
Install Dependencies
pip install -r requirements.txt
- cd into the root where the project is cloned
- run src/inference.py
- this command will use pregenerated weights and output the results of classifying the test images
- to reconstruct the weights, run src/train.py
- this command will generate new or update the model_weights.pth file to be used for prediction in the inference.py
- in /hls folder only snn_tp.cpp and host2.cpp are required to upload to Vitis IDE