beleata74 commited on
Commit
c2ec9f4
·
verified ·
1 Parent(s): 8f317d4

Delete README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +0 -48
README.md DELETED
@@ -1,48 +0,0 @@
1
- # SaraNet Pico: The "Mirror-Neuron" Audio AI
2
-
3
- SaraNet is a revolutionary, highly-optimized Neural Network running directly on a Raspberry Pi Pico (RP2040) designed specifically for 16-word Keyword Spotting (KWS).
4
-
5
- What makes SaraNet unique is its **Activation-Free Architecture** known as the "Mirror-Neuron" Topology, entirely bypassing classical activation functions (like ReLU or GELU). Instead, non-linearity is achieved through strict signal routing and physical hardware-like gating.
6
-
7
- ## 🧠 The Mirror-Neuron Architecture
8
- Inspired by hardware electronics and signal routing, SaraNet operates on the following principles:
9
- 1. **The Dispatcher (Input Layer):** Receives the input signal (Mel-Spectrogram), applies weights and biases, and fans out the signal.
10
- 2. **The Mirror Neurons (Hidden Layer):** Instead of using a mathematical non-linear function, the hidden layer consists of "Mirror Pairs" (Positive and Negative neurons).
11
- - **Positive Neurons** have a strict physical valve at their input: `clamp(min=0.0)`. They only allow positive signals to enter.
12
- - **Negative Neurons** have an inverse valve: `clamp(max=0.0)`. They only allow negative signals to enter.
13
- - *Crucial Rule:* Every neuron receives the exact same broadcasted signal from the dispatcher. The split happens *at the gates* of the neurons, not before. After the gate, each neuron applies its own unique learned weights and bias.
14
- 3. **The Judge (Output Layer):** Collects the fully-connected output of all Positive and Negative mirror neurons and decides the final classification.
15
-
16
- This architecture has been mathematically proven to solve non-linear problems (like XOR) while avoiding classical complex activation functions, making it perfect for hyper-fast `INT8` quantization on microcontrollers.
17
-
18
- ## ⚡ Dual-Core Audio Frontend & Optimization
19
- The RP2040 lacks a hardware FPU (Floating-Point Unit), making standard Audio FFT operations extremely slow (taking ~3.8 seconds with soft-float emulation).
20
-
21
- To achieve **Real-Time Execution** (< 1 second latency), we developed a custom C++ Audio Frontend:
22
- 1. **Ultra-Fast Integer DFT:** We eliminated software floating-point math inside the innermost Discrete Fourier Transform loops (2.5 million iterations). Instead, we use a custom 64-bit integer (`int64_t`) accumulation engine with scaled lookup tables, reducing execution time by 5x!
23
- 2. **Dual-Core Processing:** The RP2040 features two ARM Cortex-M0+ cores. We divided the 32 audio frames equally:
24
- - **Core 0** processes frames 0 to 15.
25
- - **Core 1** simultaneously processes frames 16 to 31.
26
-
27
- ## 📊 Performance & Hardware Resources
28
- The system captures 1 second of raw `16-bit PCM` audio (16 kHz) and runs the entire pipeline on the Pico.
29
-
30
- * **Audio Processing (DFT + Mel + Log2):** ~411 ms
31
- * **Neural Network Inference:** ~385 ms
32
- * **Total Latency:** ~0.84 seconds
33
- * **RAM Usage:** ~108 KB
34
- * **Flash Usage:** ~208 KB
35
- * **CPU:** Raspberry Pi Pico (RP2040) Overclocked to 266 MHz
36
-
37
- Because the total execution time (0.84s) is less than the duration of the audio itself (1.0s), **SaraNet runs officially in Real-Time**, leaving enough CPU headroom to capture the next continuous second of audio without dropping frames!
38
-
39
- ## 🎯 Accuracy
40
- Tested against real-world 16-bit PCM audio samples, SaraNet achieves **~89.9% accuracy**. It successfully recognizes command words like `"stop"`, `"left"`, `"off"`, and `"marvin"`, while correctly rejecting Out-Of-Vocabulary (OOV) words (e.g. "learn", "bird", "house") by classifying them as `UNKNOWN/NOISE`.
41
-
42
- ## 📂 Contents
43
- * `SaraNet_Pico/` - The Arduino IDE sketch containing the Dual-Core C++ code, optimized Neural Net, and Audio Frontend.
44
- * `export_audio_frontend.py` - Script used to extract and quantize the PyTorch Audio properties into C++ headers.
45
- * `pico_raw_audio_test.py` - USB Serial test script that streams raw `.wav` files from your PC to the Pico to benchmark accuracy and speed.
46
-
47
- ---
48
- *Developed by Nasko & Sara (July 2026).*