Upload 2 files
Browse files- README.md +76 -0
- sim_driving_mlp.npz +3 -0
README.md
CHANGED
|
@@ -1,3 +1,79 @@
|
|
| 1 |
---
|
| 2 |
license: cc-by-4.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: cc-by-4.0
|
| 3 |
+
tags:
|
| 4 |
+
- robotics
|
| 5 |
+
- mlp
|
| 6 |
+
- numpy
|
| 7 |
+
- obstacle-avoidance
|
| 8 |
+
- simulation
|
| 9 |
+
pretty_name: Sim Driving MLP (NumPy)
|
| 10 |
---
|
| 11 |
+
|
| 12 |
+
# Sim Driving MLP โ 279-parameter obstacle-avoidance policy (NumPy)
|
| 13 |
+
|
| 14 |
+
A deliberately tiny neural network: **4 ultrasonic distances in, one driving command
|
| 15 |
+
out.** 279 parameters, float32, trained and verified entirely inside our robot
|
| 16 |
+
simulation studio. Small enough to read, small enough to run on an MCU-class device.
|
| 17 |
+
|
| 18 |
+
**Trained on simulation data from a virtual map โ no real-world or customer data.**
|
| 19 |
+
|
| 20 |
+
## Architecture
|
| 21 |
+
|
| 22 |
+
```
|
| 23 |
+
input 4 โ dense 16 (ReLU) โ dense 8 (ReLU) โ output 6
|
| 24 |
+
```
|
| 25 |
+
|
| 26 |
+
| part | meaning |
|
| 27 |
+
|------|---------|
|
| 28 |
+
| input (4) | ultrasonic distances: **F**ront, **L**eft, **R**ight, **B**ack (normalized with the included `norm_mean` / `norm_std`) |
|
| 29 |
+
| output (5 + 1) | 5 command logits โ `FWD / LEFT / RIGHT / STOP / BACK` โ plus 1 turning-angle regression head |
|
| 30 |
+
|
| 31 |
+
## Metrics (validation, virtual map)
|
| 32 |
+
|
| 33 |
+
| metric | value |
|
| 34 |
+
|--------|-------|
|
| 35 |
+
| command accuracy | **97.2 %** (best epoch 529 / 572) |
|
| 36 |
+
| turning-angle MAE | ~6.9ยฐ |
|
| 37 |
+
|
| 38 |
+
The `.npz` also embeds `meta_json`: the full 572-epoch training history
|
| 39 |
+
(per-class accuracy, loss, angle MAE per epoch), so the training curve is inspectable.
|
| 40 |
+
|
| 41 |
+
## Load and run (NumPy only, no framework)
|
| 42 |
+
|
| 43 |
+
```python
|
| 44 |
+
import numpy as np
|
| 45 |
+
|
| 46 |
+
d = np.load("sim_driving_mlp.npz")
|
| 47 |
+
x = np.array([[120.0, 45.0, 200.0, 300.0]]) # F, L, R, B distances (mm)
|
| 48 |
+
x = (x - d["norm_mean"]) / d["norm_std"]
|
| 49 |
+
|
| 50 |
+
h = np.maximum(x @ d["W0"] + d["b0"], 0)
|
| 51 |
+
h = np.maximum(h @ d["W1"] + d["b1"], 0)
|
| 52 |
+
y = h @ d["W2"] + d["b2"]
|
| 53 |
+
|
| 54 |
+
cmd = ["FWD", "LEFT", "RIGHT", "STOP", "BACK"][int(np.argmax(y[0, :5]))]
|
| 55 |
+
angle = float(y[0, 5])
|
| 56 |
+
print(cmd, angle)
|
| 57 |
+
```
|
| 58 |
+
|
| 59 |
+
## Where this fits: our 4-layer stack
|
| 60 |
+
|
| 61 |
+
This model is a **layer-2 artifact** of our stack โ an edge neural network verified
|
| 62 |
+
through the 8-stage physics simulation workflow of our robot simulation studio.
|
| 63 |
+
Every stage of that workflow runs self QA/QC (layer 3) and reports through an
|
| 64 |
+
on-premise conversational LLM (layer 4); the record formats those layers produce
|
| 65 |
+
are shown in our companion dataset:
|
| 66 |
+
[NCDTech/human-gated-qaqc-knowledge-example](https://huggingface.co/datasets/NCDTech/human-gated-qaqc-knowledge-example)
|
| 67 |
+
|
| 68 |
+
## ํ๊ตญ์ด
|
| 69 |
+
|
| 70 |
+
**์ด์ํ 4๋ฐฉํฅ ๊ฑฐ๋ฆฌ(์ ยท์ขยท์ฐยทํ)๋ฅผ ๋ฃ์ผ๋ฉด ์ฃผํ ๋ช
๋ น์ด ๋์ค๋ 279 ํ๋ผ๋ฏธํฐ์ง๋ฆฌ ์์
|
| 71 |
+
์ ๊ฒฝ๋ง**์
๋๋ค. ์ ํฌ ๋ก๋ด ์๋ฎฌ๋ ์ด์
์คํ๋์ค์ 8๋จ๊ณ ์ํฌํ๋ก(๋ฐ์ดํฐ ์์ง โ ํ์ต โ
|
| 72 |
+
ํ๊ฐ โ ๋ฌผ๋ฆฌ ์๋ฎฌ๋ ์ด์
๊ฒ์ฆ)๋ฅผ ํต๊ณผํ ๊ณ์ธต 2(์ฃ์ง ์ ๊ฒฝ๋ง) ์ฐ์ถ๋ฌผ์ด๋ฉฐ, **๊ฐ์ ๋งต
|
| 73 |
+
์๋ฎฌ๋ ์ด์
๋ฐ์ดํฐ๋ก๋ง ํ์ต**ํ์ต๋๋ค โ ์ค๋ฐ์ดํฐยท๊ณ ๊ฐ ๋ฐ์ดํฐ ์์.
|
| 74 |
+
|
| 75 |
+
์ถ๋ ฅ์ ์ฃผํ ๋ช
๋ น 5ํด๋์ค(์ ์ง/์ขํ์ /์ฐํ์ /์ ์ง/ํ์ง) + ํ์ ๊ฐ ํ๊ท 1๊ฐ.
|
| 76 |
+
๊ฒ์ฆ ์ ํ๋ 97.2 %, ๊ฐ๋ ์ค์ฐจ ์ฝ 6.9ยฐ. ํ์ผ ์์ ์ ๊ทํ ํต๊ณ์ 572 ์ํฌํฌ ํ์ต
|
| 77 |
+
์ด๋ ฅ ์ ์ฒด๊ฐ ํจ๊ป ๋ค์ด ์์ด ํ์ต ๊ณก์ ์ ๊ทธ๋๋ก ํ์ธํ ์ ์์ต๋๋ค.
|
| 78 |
+
|
| 79 |
+
Learn more: https://huggingface.co/NCDTech ยท https://www.ncdtech.org
|
sim_driving_mlp.npz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3e0bd333cc54f8a86dcac2b977401e38db744a5fd9cd487f43d9a613e0bab468
|
| 3 |
+
size 818894
|