This project provides an interactive dashboard for loading neural models, running inference on both SNN and ANN architectures, monitoring energy consumption, and streaming simulated sensor data. It's designed to showcase the benefits and trade-offs between traditional neural networks and neuromorphic computing approaches.
- Neural Model Comparison: Run and compare inference between SNN and ANN models
- Real-time Energy Monitoring: Track energy consumption during model execution
- Sensor Data Simulation: Stream simulated sensor readings for testing
- Interactive Web Dashboard: Control experiments through an easy-to-use interface
- Parallel Execution: Run ANN and SNN inference simultaneously for direct comparison
- Python 3.7+
- Flask
- Samna (neuromorphic computing library)
- Access to Xylo IMU hardware for energy monitoring
-
Clone this repository:
git clone https://github.com/yourusername/SNN-Conversion-Demonstrator.git cd SNN-Conversion-Demonstrator
-
Install dependencies:
pip install -r requirements.txt
-
Ensure you have the necessary models in the
models/
directory.
-
Start the application:
python app.py
-
Access the web interface at
http://localhost:5004
-
Using the interface:
- Load a model with your chosen parameters
- Run inference to compare SNN vs ANN performance
- Monitor energy consumption during execution
- View simulated sensor data
The application is structured around several key components:
- NeuralMonitorApp: Main Flask application that coordinates all components
- NeuralModel: Handles loading and running both SNN and ANN models
- EnergyMonitor: Tracks power consumption on neuromorphic hardware
- SensorMonitor: Provides simulated sensor data for testing
GET /
: Main dashboard interfaceGET /energy
: Get current energy readingsGET /sensor_data
: Get next sensor readingPOST /load_model
: Load a neural model with specified parametersPOST /start_inference
: Run inference on both ANN and SNN modelsPOST /start_baseline
: Trigger baseline energy measurementGET /get_baseline
: Retrieve stored baseline energy value
The application supports different neural network models:
- Training Mode: Uses
models/SynNet_kaggle_{timesteps}timesteps_20epochs.json
- Inference Mode: Uses
models/converted_rp_model_20epochs_{timesteps}timesteps_kaggle.json
For full functionality, you'll need access to:
- Xylo IMU TestBoard for accurate energy measurements
- Sufficient compute resources for neural network inference
Contributions are welcome! Please feel free to submit a Pull Request.
MIT License