SafeVixAI/SafeVixAI-Dataset-Hub
Updated β’ 2.74k β’ 1
A lightweight 22 KB ONNX GradientBoostingClassifier predicting high-risk road segment conditions in real time (zero server round-trip in browser via onnxruntime-web or Python onnxruntime).
| Property | Value |
|---|---|
| Algorithm | sklearn.ensemble.GradientBoostingClassifier(n_estimators=50, max_depth=4) |
| ONNX Exporter | skl2onnx (FloatTensorType([None, 5])) |
| Input Tensor | features (float32, shape [N, 5]) |
| Outputs | output_label (int64, 0 or 1), output_probability (seq(map(int64, float32))) |
| Model Size | 22,021 bytes (~21.5 KiB) |
[road_type, hour, is_rain, speed_limit, prev_accidents])
| Index | Feature | Valid Values / Encoding |
|---|---|---|
0 |
road_type |
0: National Highway (NH), 1: State Highway (SH), 2: Major District Road (MDR), 3: Village Road (VR) |
1 |
hour |
Integer hour 0..23 |
2 |
is_rain |
0: Dry / clear, 1: Raining |
3 |
speed_limit |
Posted speed limit in km/h (40, 60, 80, 100) |
4 |
prev_accidents |
Historical segment accident count (>= 0) |
onnxruntime)
import numpy as np
import onnxruntime as ort
from huggingface_hub import hf_hub_download
model_path = hf_hub_download("SafeVixAI/road-risk-scorer-onnx", "risk_model.onnx")
session = ort.InferenceSession(model_path)
# Night (23:00), National Highway (0), Raining (1), 100 km/h, 4 previous accidents
features = np.array([[0, 23, 1, 100, 4]], dtype=np.float32)
label, probs = session.run(None, {"features": features})
print("Predicted high_risk:", int(label[0]), "Probabilities:", probs[0])
5,000 synthetic road-sensor records generated to model high-risk night (22:00β04:00) + wet weather + National/State Highway heuristics (Risk_Model_ONNX_Training notebook in SafeVixAI-Dataset-Hub).high_risk) is rule-synthesized rather than calibrated against real-time traffic telemetry, outputs should be used as heuristic risk indicators alongside verified blackspot datasets (blackspot_seed.csv), not as sole safety-critical dispatch decisions.