CoolFace
Datasetpublic

SafeVixAI/SafeVixAI-Dataset-Hub

SafeVixAI Dataset Hub πŸ›‘οΈ The Intelligence Layer for the SafeVixAI platform β€” IIT Madras Road Safety Hackathon 2026 This repository hosts all datasets, pre-trained models, notebooks, and reproducible data acquisition scripts that power the SafeVixAI application. It is designed to be cloned directly into Google Colab or any research environment. Main Application Repo: SafeVixAI/SafeVixAI ⚑ Quickstart (Google Colab) # Clone the entire intelligence layer !git… See the full description on the dataset page: https://huggingface.co/datasets/SafeVixAI/SafeVixAI-Dataset-Hub.

sourceHugging Faceapache-2.0updated 4mo agoView on Hugging Face
1likes147downloads
Dataset Card

SafeVixAI Dataset Hub πŸ›‘οΈ

The Intelligence Layer for the SafeVixAI platform β€” IIT Madras Road Safety Hackathon 2026

This repository hosts all datasets, pre-trained models, notebooks, and reproducible data acquisition scripts that power the SafeVixAI application. It is designed to be cloned directly into Google Colab or any research environment.

Main Application Repo: SafeVixAI/SafeVixAI


⚑ Quickstart (Google Colab)

python
# Clone the entire intelligence layer
!git clone https://huggingface.co/datasets/SafeVixAI/SafeVixAI-Dataset-Hub /content/data

# Symlink into the app structure
import os
os.makedirs("/content/SafeVixAI/chatbot_service", exist_ok=True)
!ln -sfn /content/data/data/chatbot_service/data /content/SafeVixAI/chatbot_service/data

πŸ“¦ Repository Structure

SafeVixAI-Dataset-Hub/
β”œβ”€β”€ data/                         ← 4.2 GB of raw intelligence data (11,008 files)
β”‚   β”œβ”€β”€ backend/
β”‚   β”‚   β”œβ”€β”€ data/                 ← Civic intel (OSM data, toll plazas, ward boundaries)
β”‚   β”‚   └── datasets/             ← Raw database assets (blackspots, violations CSVs)
β”‚   β”œβ”€β”€ chatbot_service/data/     ← Chatbot reference directories & built vector stores
β”‚   └── frontend/offline-data/    ← Regional translation matrices & offline PWA bundles
β”‚
└── scripts/                      ← Complete data acquisition & processing pipelines
    β”œβ”€β”€ backend/                  ← Core backend and database migration scripts
    β”œβ”€β”€ chatbot_service/          ← Chatbot agent and QA validation scripts
    └── scripts/                  ← Legacy scrapers, downloaders, and seeders

πŸ—‚οΈ Data Contents

CategoryFilesSizeSource
Emergency Services GIShospitals.csv, police_stations.csv, fire_stations.csv, ambulance.csv~150 MBOpenStreetMap Overpass API
Legal Documentsmotor_vehicles_act_1988.pdf, mv_amendment_act_2019.pdf~30 MBMoRTH / Indian Kanoon
Accident Statisticskaggle_india_accidents.csv, morth_2022/*.csv~250 MBMoRTH / Kaggle
Road Infrastructurepmgsy_roads.geojson, toll_plazas.csv~900 MBPMGSY GeoSadak / NHAI
Hospital Directoryhospital_directory.csv, nin_facilities.csv~1.2 GBNHP / NIN
Traffic Violationsviolations_seed.csv, state_overrides.csv~5 MBMVA 2019
PWA Translationstranslations/*.json (11 regional Indian languages)~6.4 MBAutomated DeepL/Google Sync
Road Damage Modelroad_damage_2025/~800 MBONNX + Training Data
QA Pairsqa_pairs/~50 MBCustom RAG Training

πŸ”¬ Scripts β€” Reproducible Data Pipeline

The scripts/ folder mirrors the main application's data acquisition pipeline. All scripts here are pure Python β€” they run without any database or backend stack.

Structure

scripts/
β”œβ”€β”€ scripts/data/             ← from SafeVixAI/scripts/data/
β”‚   β”œβ”€β”€ _overpass_utils.py    ← Core GIS utility (basic version)
β”‚   β”œβ”€β”€ fetch_hospitals.py    ← Hospital data from OpenStreetMap
β”‚   β”œβ”€β”€ fetch_police.py       ← Police station data
β”‚   β”œβ”€β”€ fetch_ambulance.py    ← Ambulance service data
β”‚   β”œβ”€β”€ fetch_blood_banks.py  ← Blood bank data
β”‚   β”œβ”€β”€ fetch_fire.py         ← Fire station data
β”‚   β”œβ”€β”€ download_legal_pdfs.py ← MV Act PDF downloader
β”‚   β”œβ”€β”€ extract_morth2022_tables.py ← PDF β†’ CSV extractor
β”‚   β”œβ”€β”€ seed_blackspots.py    ← Accident blackspot normalizer
β”‚   β”œβ”€β”€ bootstrap_local_data.py ← Master data orchestrator
β”‚   β”œβ”€β”€ verify_data.py        ← Data integrity checker
β”‚   β”œβ”€β”€ inspect_zips.py       ← Dataset zip validator
β”‚   β”œβ”€β”€ audit_env.py          ← Environment configuration checker
β”‚   β”œβ”€β”€ check_all_scripts.py  ← Script syntax validator
β”‚   └── setup_kaggle.ps1      ← Kaggle API auth setup
β”‚
β”œβ”€β”€ backend/data/             ← from SafeVixAI/backend/scripts/data/
β”‚   β”œβ”€β”€ seed_violations.py    ← Traffic fine normalizer (MVA 2019)
β”‚   β”œβ”€β”€ prepare_road_sources.py ← CSV/GeoJSON β†’ LineString converter
β”‚   β”œβ”€β”€ sample_pmgsy.py       ← PMGSY 867K roads sampler
β”‚   β”œβ”€β”€ road_sources.example.json ← Manifest template
β”‚   └── road_sources.json     ← Active road source manifest
β”‚
└── chatbot_service/data/     ← from SafeVixAI/chatbot_service/scripts/data/
    β”œβ”€β”€ _overpass_utils.py    ← Pro GIS utility (with retries + backoff)
    β”œβ”€β”€ fetch_hospitals.py    ← Pro hospital fetcher
    β”œβ”€β”€ fetch_police.py       ← Pro police fetcher
    β”œβ”€β”€ fetch_ambulance.py    ← Pro ambulance fetcher
    β”œβ”€β”€ fetch_blood_banks.py  ← Pro blood bank fetcher
    └── fetch_fire.py         ← Pro fire station fetcher

Running the Scripts

bash
# 1. Setup Kaggle auth (one-time)
pwsh scripts/scripts/data/setup_kaggle.ps1

# 2. Fetch all emergency service GIS data (Pro versions recommended)
python scripts/chatbot_service/data/fetch_hospitals.py
python scripts/chatbot_service/data/fetch_police.py
python scripts/chatbot_service/data/fetch_ambulance.py
python scripts/chatbot_service/data/fetch_blood_banks.py
python scripts/chatbot_service/data/fetch_fire.py

# 3. Download legal documents
python scripts/scripts/data/download_legal_pdfs.py

# 4. Extract MoRTH accident tables
python scripts/scripts/data/extract_morth2022_tables.py

# 5. Verify everything
python scripts/scripts/data/verify_data.py
Note: chatbot_service/data/ versions of the fetchers are the Pro versions β€” they include retry logic, exponential backoff, and more precise Indian GIS selectors.

πŸ““ Research Notebooks β€” Open in Colab

We advise running all notebooks through Google Colab for the easiest setup. Colab gives you a free T4 GPU with 16 GB of VRAM. All notebooks were built and tested on Colab, so it is the most stable platform. Any other cloud provider should work too.
#NotebookWhat It ProducesOpen in Colab
1YOLOv8 Pothole Detector TrainingONNX road damage model![Open In Colab](https://colab.research.google.com/drive/1oe4Gk899lFB_vbRMUuOh4dqpsa3bbycI)
2ChromaDB RAG Vectorstore BuildChromaDB index for legal RAG![Open In Colab](https://colab.research.google.com/drive/1AzPdN9xjcjW20ko0shTYn0mvbxTUw57Q)
3Accident EDA & Hotspot GeneratorBlackspot seed CSV + heatmap![Open In Colab](https://colab.research.google.com/drive/1xhlwvBjc083dvuNppWQRtVhqExTS)
4Roads Data ProcessingSampled PMGSY GeoJSON![Open In Colab](https://colab.research.google.com/drive/10_WfTlbbxW9A7ceQBZGaKF5UkydlUDin#scrollTo=z4XxGZmx0ymX)
5Risk Model ONNX TrainingRisk scoring ONNX model![Open In Colab](https://colab.research.google.com/drive/16IH-rn3CedYtfIpJP4iLa_KUjvfy8hAY)

Recommended run order: 1 β†’ 2 β†’ 3 β†’ 4 β†’ 5

Each notebook auto-clones this Hub at the start β€” no manual data setup needed.

πŸ“œ License

Apache 2.0 β€” See LICENSE

Data sourced from OpenStreetMap (ODbL), MoRTH (Government of India Open Data), Kaggle, PMGSY GeoSadak, and National Health Portal.

SafeVixAI/SafeVixAI-Dataset-Hub Β· CoolFace