akhra92/dashcam-collision-rockchip-mnv3s
0
Dashcam Collision Detector — Rockchip RK3588 (mnv3s_temporal)
Causal sliding-window crash detector for the RK3588 NPU. Because the NPU has no 3D convolutions, this is a per-frame 2D-CNN + a small temporal head, deployed as two ONNX graphs (convert the backbone to INT8 RKNN; run the head on the CPU):
- Input: RGB only (3 channels), 16-frame window
- Decision rule: threshold
0.73,3consecutive windows
Usage
from huggingface_hub import hf_hub_download
import onnxruntime as ort, numpy as np, json
repo = "akhra92/dashcam-collision-rockchip-mnv3s"
bb = ort.InferenceSession(hf_hub_download(repo, "backbone.onnx"))
head = ort.InferenceSession(hf_hub_download(repo, "temporal_head.onnx"))
meta = json.load(open(hf_hub_download(repo, "rockchip.meta.json")))
T, C = meta["window_frames"], meta["feat_dim"]
feats = np.zeros((1, T, C), np.float32) # fill from per-frame backbone
frame = np.random.randn(*meta["frame_shape"]).astype("float32")
feats[0, -1] = bb.run(["feat"], {"frame": frame})[0][0]
logit = head.run(["logit"], {"feats": feats})[0]See deploy/rockchip/ (convertrknn.py, inferrknn.py) in the source repo for the INT8 conversion and streaming inference.
