Datasets:
File size: 7,992 Bytes
6a0c11d 93d3cf7 6a0c11d 93d3cf7 6a0c11d 93d3cf7 6a0c11d 93d3cf7 6a0c11d 0f6dc04 6a0c11d 1befa58 6a0c11d 93d3cf7 6a0c11d 93d3cf7 3c7d01d 6a0c11d 3c7d01d 6a0c11d 3c7d01d 6a0c11d 93d3cf7 6a0c11d 93d3cf7 6a0c11d 93d3cf7 6a0c11d 198bb3d 6a0c11d 198bb3d 6a0c11d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 | ---
license: apache-2.0
task_categories:
- object-detection
- question-answering
language:
- en
- hi
tags:
- road-safety
- india
- emergency-services
- traffic-law
- geospatial
- rag
pretty_name: SafeVixAI Dataset Hub
size_categories:
- 1B<n<10B
---
# 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](https://github.com/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
| Category | Files | Size | Source |
|---|---|---|---|
| Emergency Services GIS | `hospitals.csv`, `police_stations.csv`, `fire_stations.csv`, `ambulance.csv` | ~150 MB | OpenStreetMap Overpass API |
| Legal Documents | `motor_vehicles_act_1988.pdf`, `mv_amendment_act_2019.pdf` | ~30 MB | MoRTH / Indian Kanoon |
| Accident Statistics | `kaggle_india_accidents.csv`, `morth_2022/*.csv` | ~250 MB | MoRTH / Kaggle |
| Road Infrastructure | `pmgsy_roads.geojson`, `toll_plazas.csv` | ~900 MB | PMGSY GeoSadak / NHAI |
| Hospital Directory | `hospital_directory.csv`, `nin_facilities.csv` | ~1.2 GB | NHP / NIN |
| Traffic Violations | `violations_seed.csv`, `state_overrides.csv` | ~5 MB | MVA 2019 |
| PWA Translations | `translations/*.json` (11 regional Indian languages) | ~6.4 MB | Automated DeepL/Google Sync |
| Road Damage Model | `road_damage_2025/` | ~800 MB | ONNX + Training Data |
| QA Pairs | `qa_pairs/` | ~50 MB | Custom 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.
| # | Notebook | What It Produces | Open in Colab |
|---|---|---|---|
| 1 | **YOLOv8 Pothole Detector Training** | ONNX road damage model | [](https://colab.research.google.com/drive/1oe4Gk899lFB_vbRMUuOh4dqpsa3bbycI) |
| 2 | **ChromaDB RAG Vectorstore Build** | ChromaDB index for legal RAG | [](https://colab.research.google.com/drive/1AzPdN9xjcjW20ko0shTYn0mvbxTUw57Q) |
| 3 | **Accident EDA & Hotspot Generator** | Blackspot seed CSV + heatmap | [](https://colab.research.google.com/drive/1xh_lwv_B_jc0_83dvuNppWQRtVhqExTS) |
| 4 | **Roads Data Processing** | Sampled PMGSY GeoJSON | [](https://colab.research.google.com/drive/10_WfTlbbxW9A7ceQBZGaKF5UkydlUDin#scrollTo=z4XxGZmx0ymX) |
| 5 | **Risk Model ONNX Training** | Risk scoring ONNX model | [](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](LICENSE)
Data sourced from OpenStreetMap (ODbL), MoRTH (Government of India Open Data), Kaggle, PMGSY GeoSadak, and National Health Portal.
|