Aller au contenu
ModelPrésentéExterne
Browse files

Dashcam Collision Rockchip Mnv3s

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...

TypeOtherVersionBackboneBClasse

Source du modèle

Type
Other
Taille du fichier
2,44–3,56 MB
Version
vBackbone
Mis à jour
10 oct. 2026
Source
Hugging Face

Description de la source

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):

fileshaperuns on
backbone.onnx[1, 3, 112, 112] → [1, 576]NPU (INT8 RKNN)
temporal_head.onnx[1, 16, 576] → [1]CPU
rockchip.meta.json—inference config
  • Input: RGB only (3 channels), 16-frame window
  • Decision rule: threshold 0.73, 3 consecutive 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/ (convert_rknn.py, infer_rknn.py) in the source repo for the INT8 conversion and streaming inference.

Sources

1 source
Hugging FacePrincipalVersion 67c3595e1336dcf77cca3cd72c0ad23a540235f7
huggingface.co/akhra92/dashcam-collision-rockchip-mnv3s/tree/67c3595e1336dcf77cca3cd72c0ad23a540235f7

Vérifié 10 oct.

Download files

Artefacts du modèle

2 artefacts

backbone.onnx

onnx · 3,56 MB · SHA-256 f328fd9feb21…fcb9 · Hugging Face

Download file

temporal_head.onnx

onnx · 2,44 MB · SHA-256 0064dc6067eb…9019 · Hugging Face

Download file

Extraits de sources

2 extraits

--- library_name: onnx pipeline_tag: video-classification tags: - onnx - video-classification - accident-detection - dashcam - rockchip - rk3588 license: mit --- # 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): | file | shape | runs on | |---|---|---| | `backbone.onnx` | `[1, 3, 112, 112]` → `[1, 576]` | NPU (INT8 RKNN) | | `temporal_head.onnx` | `[1, 16, 576]` → `[1]` | CPU | | `rockchip.meta.json` | — | inference config | - **Input:** RGB only (3 channels), 16-frame window - **Decision rule:** threshold `0.73`, `3` consecutive windows ## Usage ```python 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/` (convert_rknn.py, infer_rknn.py) in the source repo for the INT8 conversion and streaming inference.

Source context: 0 downloads · 0 likes · Pipeline video-classification · Library onnx · Repo akhra92/dashcam-collision-rockchip-mnv3s