|
Download README.md from NCDTech/sim-driving-mlp-numpy: direct link, hf CLI and curl.
- Browser
- Download file 5.44 kB
-
https://huggingface.co/NCDTech/sim-driving-mlp-numpy/resolve/main/README.md
- Command line
-
hf download hf://NCDTech/sim-driving-mlp-numpy/README.md
-
curl -L -o README.md https://huggingface.co/NCDTech/sim-driving-mlp-numpy/resolve/main/README.md
5.44 kB
| license: cc-by-4.0 | |
| tags: | |
| - robotics | |
| - mlp | |
| - numpy | |
| - obstacle-avoidance | |
| - simulation | |
| - edge | |
| - embedded | |
| - industrial | |
| - sensor-data | |
| pretty_name: Sim Driving MLP (NumPy) | |
| # Sim Driving MLP: a 270-parameter obstacle-avoidance policy (NumPy) | |
| **270 learnable parameters · 1.05 KB of weights · 0.0103 ms per inference · 1.95 KB peak inference memory · numpy only, no framework.** | |
| Inference numbers measured on a 12th-gen i7 laptop CPU, average over 100,000 runs. | |
| (An earlier revision of this card said 279 parameters. That count included the file's normalization and metadata arrays. The learnable weight and bias count is 270.) | |
| A deliberately tiny neural network: **4 ultrasonic distances in, one driving command out.** | |
| Small enough to read, small enough to run on an MCU-class device. | |
| **Trained on simulation data from a virtual map. No real-world or customer data.** | |
| ## Architecture | |
|  | |
| | part | meaning | | |
| |------|---------| | |
| | input (4) | ultrasonic distances: **F**ront, **L**eft, **R**ight, **B**ack (normalized with the included `norm_mean` / `norm_std`) | | |
| | output (5 + 1) | 5 command logits (`FWD / LEFT / RIGHT / STOP / BACK`) plus 1 turning-angle regression head | | |
| ## Metrics (validation, virtual map) | |
| | metric | value | | |
| |--------|-------| | |
| | command accuracy | **97.2 %** (best epoch 529 / 572) | | |
| | turning-angle MAE | ~6.9° | | |
| The `.npz` also embeds `meta_json`: the full 572-epoch training history (per-class accuracy, loss, angle MAE per epoch), so the training curve is inspectable. | |
| The plot below is drawn directly from that embedded history: | |
|  | |
| ## Load and run (NumPy only, no framework) | |
| ```python | |
| import numpy as np | |
| d = np.load("sim_driving_mlp.npz") | |
| x = np.array([[120.0, 45.0, 200.0, 300.0]]) # F, L, R, B distances (mm) | |
| x = (x - d["norm_mean"]) / d["norm_std"] | |
| h = np.maximum(x @ d["W0"] + d["b0"], 0) | |
| h = np.maximum(h @ d["W1"] + d["b1"], 0) | |
| y = h @ d["W2"] + d["b2"] | |
| cmd = ["FWD", "LEFT", "RIGHT", "STOP", "BACK"][int(np.argmax(y[0, :5]))] | |
| angle = float(y[0, 5]) | |
| print(cmd, angle) | |
| ``` | |
| ## The simulator and the target robot | |
| The studio stage where the model's four inputs are defined: ultrasonic sensors F/L/R/B with datasheet-based noise models, checked by the built-in self QA/QC checklist. | |
| On the right, the local LLM explains a warning from that checklist, citing the stage report as its basis. | |
| This screen is a frame from our [demo video (22 min, Korean)](https://youtu.be/ftsw_vbfw6E). | |
|  | |
| A driving run on the 8 m × 8 m virtual map used for data collection (green: ultrasonic rays from the robot): | |
|  | |
| And this exact model running in the studio's 3D evaluation stage. | |
| The left panel shows the live inference at the current step: the four sensor inputs (F/L/R/B, mm), the softmax over the five commands with FORWARD selected, and the angle head: | |
|  | |
| The target hardware: a tracked test robot with the ultrasonic sensors mounted on the hand, the same F-channel placement the simulator reproduces. | |
|  | |
| ## Where this fits: our 4-layer stack | |
|  | |
| *(Diagram is in Korean; it is the same figure used on our website, demo video, and companion dataset.)* | |
| This model is a **layer-2 artifact** of our stack: an edge neural network verified through the 8-stage physics simulation workflow of our robot simulation studio. | |
| Every stage of that workflow runs self QA/QC (layer 3) and reports through an on-premise conversational LLM (layer 4). | |
| The record formats those layers produce are shown in our companion dataset: | |
| [NCDTech/human-gated-qaqc-knowledge-example](https://huggingface.co/datasets/NCDTech/human-gated-qaqc-knowledge-example) | |
| We now focus this stack on predictive maintenance (PdM) for aging mechanical equipment. | |
| ## 한국어 | |
| **초음파 4방향 거리(전·좌·우·후)를 넣으면 주행 명령이 나오는 270 파라미터짜리 작은 신경망**입니다. | |
| 추론 1회 0.0103 ms, 추론 메모리 1.95 KB, 의존성은 numpy 하나 (12세대 i7 노트북 CPU에서 10만 회 평균 실측). | |
| (이전 판의 "279 파라미터"는 정규화·메타 배열까지 센 수치였고, 학습 가중치 기준 정확한 수는 270입니다.) | |
| 저희 로봇 시뮬레이션 스튜디오의 8단계 워크플로(데이터 수집 → 학습 → 평가 → 물리 시뮬레이션 검증)를 통과한 계층 2(엣지 신경망) 산출물이며, **가상 맵 시뮬레이션 데이터로만 학습**했습니다 (실데이터·고객 데이터 없음). | |
| 출력은 주행 명령 5클래스(전진/좌회전/우회전/정지/후진) + 회전각 회귀 1개. | |
| 검증 정확도 97.2 %, 각도 오차 약 6.9°. | |
| 파일 안에 정규화 통계와 572 에포크 학습 이력 전체가 함께 들어 있어 학습 곡선을 그대로 확인할 수 있습니다. | |
| 저희는 이 스택을 노후 기계식 설비의 예지보전(PdM)에 집중하고 있습니다. | |
| Learn more: https://huggingface.co/NCDTech · https://ncdtech.org · Demo video: https://youtu.be/ftsw_vbfw6E | |