Views
No views yet
resnet18_temporal)| file | shape | runs on |
|---|---|---|
backbone.onnx | [1, 12, 112, 112] → [1, 512] | NPU (INT8 RKNN) |
temporal_head.onnx | [1, 16, 512] → [1] | CPU |
rockchip.meta.json | — | inference config |
0.95, 3 consecutive windows| metric | value |
|---|---|
| detection rate | 34.8 % |
| false-alarm rate | 15.0 % |
| mean localization error | 0.34 s |
| operating threshold | 0.95 |
1from huggingface_hub import hf_hub_download
2import onnxruntime as ort, numpy as np, json
3
4repo = "akhra92/dashcam-collision-rockchip-resnet18-motion"
5bb = ort.InferenceSession(hf_hub_download(repo, "backbone.onnx"))
6head = ort.InferenceSession(hf_hub_download(repo, "temporal_head.onnx"))
7meta = json.load(open(hf_hub_download(repo, "rockchip.meta.json")))
8
9T, C = meta["window_frames"], meta["feat_dim"]
10feats = np.zeros((1, T, C), np.float32) # fill from per-frame backbone
11frame = np.random.randn(*meta["frame_shape"]).astype("float32")
12feats[0, -1] = bb.run(["feat"], {"frame": frame})[0][0]
13logit = head.run(["logit"], {"feats": feats})[0]deploy/rockchip/ (convert_rknn.py, infer_rknn.py) in the source repo for the
INT8 conversion and streaming inference.