Upload 5 files
Browse files- .gitattributes +2 -0
- README.md +103 -0
- assets/01_architecture.png +0 -0
- assets/02_real_robot.jpg +3 -0
- assets/03_robot_in_action.png +3 -0
- real_robot_mlp.npz +3 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
assets/02_real_robot.jpg filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
assets/03_robot_in_action.png filter=lfs diff=lfs merge=lfs -text
|
README.md
CHANGED
|
@@ -1,3 +1,106 @@
|
|
| 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 |
+
- real-robot
|
| 9 |
+
pretty_name: Real-Robot Driving MLP (NumPy)
|
| 10 |
---
|
| 11 |
+
|
| 12 |
+
# Real-Robot Driving MLP โ the 116-parameter policy that drove our robot on video
|
| 13 |
+
|
| 14 |
+
This is the smaller, older sibling of
|
| 15 |
+
[NCDTech/sim-driving-mlp-numpy](https://huggingface.co/NCDTech/sim-driving-mlp-numpy):
|
| 16 |
+
a 116-parameter MLP trained not in simulation but on **real driving sessions** of our
|
| 17 |
+
tracked test robot, collected on the test floor through our desktop studio.
|
| 18 |
+
|
| 19 |
+
**This exact file is the one loaded and driving in the video below.** We traced it
|
| 20 |
+
frame by frame: the load dialog in the recording shows this very filename.
|
| 21 |
+
|
| 22 |
+
โถ **[Watch it drive (3:18, Korean)](https://youtu.be/6DJX0T6qrtM)** โ synthetic data
|
| 23 |
+
check, analysis, training, weight transfer to the robot, and neural-network driving,
|
| 24 |
+
end to end.
|
| 25 |
+
|
| 26 |
+
## Architecture
|
| 27 |
+
|
| 28 |
+

|
| 29 |
+
|
| 30 |
+
| part | meaning |
|
| 31 |
+
|------|---------|
|
| 32 |
+
| input (6) | ultrasonic distances **F**ront / **L**eft / **R**ight, plus their frame-to-frame **deltas** (ฮF, ฮL, ฮR) โ distance tells "how far", delta tells "getting closer or not" |
|
| 33 |
+
| hidden (8) | one dense layer, leaky ReLU (ฮฑ = 0.01) |
|
| 34 |
+
| output (5) | command logits: `FWD / LEFT / RIGHT / STOP / BACK` |
|
| 35 |
+
|
| 36 |
+
Normalization statistics (`norm_center`, `norm_scale`) are included in the file.
|
| 37 |
+
|
| 38 |
+
## Metrics โ an honest early scorecard
|
| 39 |
+
|
| 40 |
+
| command | accuracy |
|
| 41 |
+
|---------|----------|
|
| 42 |
+
| FORWARD | 76 % |
|
| 43 |
+
| LEFT | 85 % |
|
| 44 |
+
| RIGHT | 83 % |
|
| 45 |
+
| STOP / BACK | **0 %** |
|
| 46 |
+
| overall | 49 % |
|
| 47 |
+
|
| 48 |
+
We publish these numbers as they are. The driving commands (F/L/R) worked well
|
| 49 |
+
enough to drive the robot in the video; STOP and BACK scored zero because the
|
| 50 |
+
training sessions barely contained those actions (class imbalance in a few minutes
|
| 51 |
+
of real driving data). Fixing exactly this kind of gap is why our current systems
|
| 52 |
+
run self QA/QC on every stage โ the class-distribution check that would have
|
| 53 |
+
flagged this dataset is now built in.
|
| 54 |
+
|
| 55 |
+
## Load and run (NumPy only)
|
| 56 |
+
|
| 57 |
+
```python
|
| 58 |
+
import numpy as np
|
| 59 |
+
|
| 60 |
+
d = np.load("real_robot_mlp.npz")
|
| 61 |
+
x = np.array([[300.0, 150.0, 400.0, -5.0, -20.0, 0.0]]) # F, L, R, dF, dL, dR
|
| 62 |
+
x = (x - d["norm_center"]) / d["norm_scale"]
|
| 63 |
+
|
| 64 |
+
h = x @ d["W0"] + d["b0"]
|
| 65 |
+
h = np.where(h > 0, h, 0.01 * h) # leaky ReLU
|
| 66 |
+
y = h @ d["W1"] + d["b1"]
|
| 67 |
+
|
| 68 |
+
print(["FWD", "LEFT", "RIGHT", "STOP", "BACK"][int(np.argmax(y))])
|
| 69 |
+
```
|
| 70 |
+
|
| 71 |
+
The whole file is 2.4 KB. It runs on anything that runs NumPy, and the original
|
| 72 |
+
target was an MCU-class robot controller.
|
| 73 |
+
|
| 74 |
+
## The robot it drove
|
| 75 |
+
|
| 76 |
+

|
| 77 |
+
|
| 78 |
+

|
| 79 |
+
|
| 80 |
+
## Sim and real, side by side
|
| 81 |
+
|
| 82 |
+
| | this model | [sim-driving-mlp-numpy](https://huggingface.co/NCDTech/sim-driving-mlp-numpy) |
|
| 83 |
+
|---|---|---|
|
| 84 |
+
| trained on | real driving sessions (test floor) | virtual-map simulation |
|
| 85 |
+
| inputs | 3 distances + 3 deltas | 4 distances (F/L/R/B) |
|
| 86 |
+
| size | 6โ8โ5, 116 params | 4โ16โ8โ6, 279 params |
|
| 87 |
+
| extra head | none | turning-angle regression |
|
| 88 |
+
| date | 2026-04 | 2026-05 |
|
| 89 |
+
|
| 90 |
+
Together they show the path we actually took: drive the real robot first, feel the
|
| 91 |
+
data problems, then build the simulation studio with self QA/QC wired into every
|
| 92 |
+
stage.
|
| 93 |
+
|
| 94 |
+
## ํ๊ตญ์ด
|
| 95 |
+
|
| 96 |
+
**์์ ์์์ ์ค์ ๋ก ๋ก๋ด์ ๋ชฐ๋ ๋ฐ๋ก ๊ทธ ๊ฐ์ค์น ํ์ผ**์
๋๋ค (์์์ ํ์ผ ์ด๊ธฐ
|
| 97 |
+
์ฅ๋ฉด์์ ํ์ผ๋ช
์ ์ถ์ ํด ํ์ธ). ์๋ฎฌ ๋ชจ๋ธ์ ํ๋ป๋ก, ๊ฐ์ ๋งต์ด ์๋๋ผ **์ค์ ์ฃผํ
|
| 98 |
+
๋ฐ์ดํฐ**๋ก ํ์ตํ์ต๋๋ค: ์ด์ํ 3๋ฐฉ ๊ฑฐ๋ฆฌ + ๋ณํ๋ 3๊ฐ๋ฅผ ๋ฃ์ผ๋ฉด ์ฃผํ ๋ช
๋ น 5์ข
์ด
|
| 99 |
+
๋์ค๋ 116 ํ๋ผ๋ฏธํฐ ์ ๊ฒฝ๋ง(2.4 KB)์
๋๋ค.
|
| 100 |
+
|
| 101 |
+
์ฑ์ ํ๋ ์๋ ๊ทธ๋๋ก ๊ณต๊ฐํฉ๋๋ค: ์ฃผํ ๋ช
๋ น(์ ์ง 76%ยท์ข 85%ยท์ฐ 83%)์ ์์์ฒ๋ผ
|
| 102 |
+
์ค์ฃผํ์ด ๋์ง๋ง, **์ ์ง/ํ์ง์ 0%** โ ๋ช ๋ถ์ง๋ฆฌ ์ค์ฃผํ ๋ฐ์ดํฐ์ ๊ทธ ๋์์ด ๊ฑฐ์
|
| 103 |
+
์์๊ธฐ ๋๋ฌธ์
๋๋ค(ํด๋์ค ๋ถ๊ท ํ). ๋ฐ๋ก ์ด๋ฐ ๊ตฌ๋ฉ์ ์ก์ผ๋ ค๊ณ ์ง๊ธ์ ์ ํฌ ์์คํ
์
|
| 104 |
+
๋ชจ๋ ๋จ๊ณ์ ์
ํ QA/QC(ํด๋์ค ๋ถํฌ ๊ฒ์ฌ ํฌํจ)๋ฅผ ์ฌ์์ต๋๋ค.
|
| 105 |
+
|
| 106 |
+
Learn more: https://huggingface.co/NCDTech ยท https://www.ncdtech.org ยท ์ฃผํ ์์: https://youtu.be/6DJX0T6qrtM
|
assets/01_architecture.png
ADDED
|
assets/02_real_robot.jpg
ADDED
|
Git LFS Details
|
assets/03_robot_in_action.png
ADDED
|
Git LFS Details
|
real_robot_mlp.npz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:697a394419f2cbb4e98de4edfa1c2c902efa94c4a3aa4cf7e4413a57807c5305
|
| 3 |
+
size 2448
|