--- library_name: onnx pipeline_tag: video-classification tags: - onnx - video-classification - accident-detection - dashcam - jetson - rockchip license: mit --- # Dashcam Collision Detector (videomae_base, ONNX) Causal sliding-window crash detector exported to ONNX. The model scores a short temporal window of dashcam frames and a downstream rule (`consec` consecutive detections above `detect_threshold`) decides *when* a collision occurs. - **Architecture:** `videomae_base` - **Input:** float32 `[1, 3, 16, 224, 224]` (NCTHW), RGB, ImageNet mean/std normalized - **Sampling:** 16-frame window at 16 fps - **Decision rule:** threshold `0.97`, `3` consecutive windows ## Inference metadata ```json { "input_shape": [ 1, 3, 16, 224, 224 ], "detect_threshold": 0.97, "consec": 3, "target_fps": 16, "window_frames": 16, "stride": 3, "tolerance_s": 1.0, "mean": [ 0.485, 0.456, 0.406 ], "std": [ 0.229, 0.224, 0.225 ], "arch": "videomae_base" } ``` ## Usage ```python from huggingface_hub import hf_hub_download import onnxruntime as ort, numpy as np path = hf_hub_download(repo_id="akhra92/dashcam-collision-jetson-videomae-hnm", filename="model.onnx") sess = ort.InferenceSession(path, providers=["CPUExecutionProvider"]) x = np.random.randn(*[1, 3, 16, 224, 224]).astype("float32") logit = sess.run(["logit"], {"input": x})[0] ``` On-device, the ONNX graph is compiled to a TensorRT engine (Jetson) or an `.rknn` model (Rockchip). See `deploy/` in the source repo.