Dashcam Collision Detector (r2plus1d_18, 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:
r2plus1d_18 - Input: float32
[1, 3, 16, 112, 112](NCTHW), RGB, ImageNet mean/std normalized - Sampling: 16-frame window at 16 fps
- Decision rule: threshold
0.68,3consecutive windows
Inference metadata
{
"input_shape": [
1,
3,
16,
112,
112
],
"detect_threshold": 0.68,
"consec": 3,
"target_fps": 16,
"window_frames": 16,
"stride": 3,
"tolerance_s": 1.0,
"mean": [
0.43216,
0.394666,
0.37645
],
"std": [
0.22803,
0.22145,
0.216989
],
"arch": "r2plus1d_18"
}
Usage
from huggingface_hub import hf_hub_download
import onnxruntime as ort, numpy as np
path = hf_hub_download(repo_id="akhra92/dashcam-collision-jetson-r2plus1d18", filename="model.onnx")
sess = ort.InferenceSession(path, providers=["CPUExecutionProvider"])
x = np.random.randn(*[1, 3, 16, 112, 112]).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.
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support