Datasets:
Update README.md: fix 11 languages, file counts, structure, and model/Space cross-links
Browse files
README.md
CHANGED
|
@@ -6,6 +6,15 @@ task_categories:
|
|
| 6 |
language:
|
| 7 |
- en
|
| 8 |
- hi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
tags:
|
| 10 |
- road-safety
|
| 11 |
- india
|
|
@@ -13,159 +22,139 @@ tags:
|
|
| 13 |
- traffic-law
|
| 14 |
- geospatial
|
| 15 |
- rag
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
pretty_name: SafeVixAI Dataset Hub
|
| 17 |
size_categories:
|
| 18 |
-
-
|
| 19 |
---
|
| 20 |
|
| 21 |
-
# SafeVixAI Dataset Hub
|
| 22 |
|
| 23 |
> The **Intelligence Layer** for the SafeVixAI platform — IIT Madras Road Safety Hackathon 2026
|
| 24 |
|
| 25 |
-
This repository hosts
|
| 26 |
|
| 27 |
-
**Main Application Repo:** [SafeVixAI/SafeVixAI](https://github.com/SafeVixAI/SafeVixAI)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
|
| 29 |
---
|
| 30 |
|
| 31 |
-
##
|
| 32 |
|
| 33 |
```python
|
| 34 |
-
# Clone the
|
| 35 |
!git clone https://huggingface.co/datasets/SafeVixAI/SafeVixAI-Dataset-Hub /content/data
|
| 36 |
|
| 37 |
-
# Symlink into the app
|
| 38 |
import os
|
| 39 |
os.makedirs("/content/SafeVixAI/chatbot_service", exist_ok=True)
|
| 40 |
!ln -sfn /content/data/data/chatbot_service/data /content/SafeVixAI/chatbot_service/data
|
| 41 |
```
|
| 42 |
|
| 43 |
-
|
| 44 |
|
| 45 |
-
|
|
|
|
| 46 |
|
| 47 |
-
|
| 48 |
-
SafeVixAI-Dataset-Hub
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
│ │ └── datasets/ ← Raw database assets (blackspots, violations CSVs)
|
| 53 |
-
│ ├── chatbot_service/data/ ← Chatbot reference directories & built vector stores
|
| 54 |
-
│ └── frontend/offline-data/ ← Regional translation matrices & offline PWA bundles
|
| 55 |
-
│
|
| 56 |
-
└── scripts/ ← Complete data acquisition & processing pipelines
|
| 57 |
-
├── backend/ ← Core backend and database migration scripts
|
| 58 |
-
├── chatbot_service/ ← Chatbot agent and QA validation scripts
|
| 59 |
-
└── scripts/ ← Legacy scrapers, downloaders, and seeders
|
| 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 |
-
scripts/
|
| 89 |
-
├── scripts/data/ ← from SafeVixAI/scripts/data/
|
| 90 |
-
│ ├── _overpass_utils.py ← Core GIS utility (basic version)
|
| 91 |
-
│ ├── fetch_hospitals.py ← Hospital data from OpenStreetMap
|
| 92 |
-
│ ├── fetch_police.py ← Police station data
|
| 93 |
-
│ ├── fetch_ambulance.py ← Ambulance service data
|
| 94 |
-
│ ├── fetch_blood_banks.py ← Blood bank data
|
| 95 |
-
│ ├── fetch_fire.py ← Fire station data
|
| 96 |
-
│ ├── download_legal_pdfs.py ← MV Act PDF downloader
|
| 97 |
-
│ ├── extract_morth2022_tables.py ← PDF → CSV extractor
|
| 98 |
-
│ ├── seed_blackspots.py ← Accident blackspot normalizer
|
| 99 |
-
│ ├── bootstrap_local_data.py ← Master data orchestrator
|
| 100 |
-
│ ├── verify_data.py ← Data integrity checker
|
| 101 |
-
│ ├── inspect_zips.py ← Dataset zip validator
|
| 102 |
-
│ ├── audit_env.py ← Environment configuration checker
|
| 103 |
-
│ ├── check_all_scripts.py ← Script syntax validator
|
| 104 |
-
│ └── setup_kaggle.ps1 ← Kaggle API auth setup
|
| 105 |
-
│
|
| 106 |
-
├── backend/data/ ← from SafeVixAI/backend/scripts/data/
|
| 107 |
-
│ ├── seed_violations.py ← Traffic fine normalizer (MVA 2019)
|
| 108 |
-
│ ├── prepare_road_sources.py ← CSV/GeoJSON → LineString converter
|
| 109 |
-
│ ├── sample_pmgsy.py ← PMGSY 867K roads sampler
|
| 110 |
-
│ ├── road_sources.example.json ← Manifest template
|
| 111 |
-
│ └── road_sources.json ← Active road source manifest
|
| 112 |
-
│
|
| 113 |
-
└── chatbot_service/data/ ← from SafeVixAI/chatbot_service/scripts/data/
|
| 114 |
-
├── _overpass_utils.py ← Pro GIS utility (with retries + backoff)
|
| 115 |
-
├── fetch_hospitals.py ← Pro hospital fetcher
|
| 116 |
-
├── fetch_police.py ← Pro police fetcher
|
| 117 |
-
├── fetch_ambulance.py ← Pro ambulance fetcher
|
| 118 |
-
├── fetch_blood_banks.py ← Pro blood bank fetcher
|
| 119 |
-
└── fetch_fire.py ← Pro fire station fetcher
|
| 120 |
-
```
|
| 121 |
|
| 122 |
-
##
|
| 123 |
|
| 124 |
```bash
|
| 125 |
# 1. Setup Kaggle auth (one-time)
|
| 126 |
pwsh scripts/scripts/data/setup_kaggle.ps1
|
| 127 |
|
| 128 |
-
# 2. Fetch
|
| 129 |
python scripts/chatbot_service/data/fetch_hospitals.py
|
| 130 |
python scripts/chatbot_service/data/fetch_police.py
|
| 131 |
python scripts/chatbot_service/data/fetch_ambulance.py
|
| 132 |
python scripts/chatbot_service/data/fetch_blood_banks.py
|
| 133 |
python scripts/chatbot_service/data/fetch_fire.py
|
| 134 |
|
| 135 |
-
# 3. Download legal
|
| 136 |
python scripts/scripts/data/download_legal_pdfs.py
|
| 137 |
-
|
| 138 |
-
# 4. Extract MoRTH accident tables
|
| 139 |
python scripts/scripts/data/extract_morth2022_tables.py
|
| 140 |
|
| 141 |
-
#
|
| 142 |
python scripts/scripts/data/verify_data.py
|
| 143 |
```
|
| 144 |
|
| 145 |
-
> **Note:** `chatbot_service/data/` versions of the fetchers are the **Pro versions** — they include retry logic, exponential backoff, and more precise Indian GIS selectors.
|
| 146 |
-
|
| 147 |
---
|
| 148 |
|
| 149 |
-
##
|
| 150 |
|
| 151 |
-
|
| 152 |
-
|
| 153 |
-
|
|
| 154 |
-
|
|
| 155 |
-
|
|
| 156 |
-
|
|
| 157 |
-
|
|
| 158 |
-
| 4 | **Roads Data Processing** | Sampled PMGSY GeoJSON | [](https://colab.research.google.com/drive/10_WfTlbbxW9A7ceQBZGaKF5UkydlUDin#scrollTo=z4XxGZmx0ymX) |
|
| 159 |
-
| 5 | **Risk Model ONNX Training** | Risk scoring ONNX model | [](https://colab.research.google.com/drive/16IH-rn3CedYtfIpJP4iLa_KUjvfy8hAY) |
|
| 160 |
|
| 161 |
**Recommended run order:** `1 → 2 → 3 → 4 → 5`
|
| 162 |
|
| 163 |
-
> Each notebook auto-clones this Hub at the start — no manual data setup needed.
|
| 164 |
-
|
| 165 |
---
|
| 166 |
|
| 167 |
-
##
|
| 168 |
|
| 169 |
-
Apache 2.0 —
|
| 170 |
|
| 171 |
-
|
|
|
|
| 6 |
language:
|
| 7 |
- en
|
| 8 |
- hi
|
| 9 |
+
- bn
|
| 10 |
+
- gu
|
| 11 |
+
- kn
|
| 12 |
+
- ml
|
| 13 |
+
- mr
|
| 14 |
+
- pa
|
| 15 |
+
- ta
|
| 16 |
+
- te
|
| 17 |
+
- ur
|
| 18 |
tags:
|
| 19 |
- road-safety
|
| 20 |
- india
|
|
|
|
| 22 |
- traffic-law
|
| 23 |
- geospatial
|
| 24 |
- rag
|
| 25 |
+
- yolov8
|
| 26 |
+
- onnx
|
| 27 |
+
- chromadb
|
| 28 |
+
- morth
|
| 29 |
+
- indian-roads
|
| 30 |
pretty_name: SafeVixAI Dataset Hub
|
| 31 |
size_categories:
|
| 32 |
+
- 10K<n<100K
|
| 33 |
---
|
| 34 |
|
| 35 |
+
# SafeVixAI Dataset Hub
|
| 36 |
|
| 37 |
> The **Intelligence Layer** for the SafeVixAI platform — IIT Madras Road Safety Hackathon 2026
|
| 38 |
|
| 39 |
+
This repository hosts the curated datasets, pre-trained ONNX exports, reproducible data pipelines, and Google Colab notebooks powering SafeVixAI across **11,098 repository files** (~4.45 GB uncompressed).
|
| 40 |
|
| 41 |
+
- **Main Application Repo:** [SafeVixAI/SafeVixAI (GitHub)](https://github.com/SafeVixAI/SafeVixAI)
|
| 42 |
+
- **Standalone Model Cards:**
|
| 43 |
+
- [SafeVixAI/pothole-detector-yolov8n](https://huggingface.co/SafeVixAI/pothole-detector-yolov8n) (`pothole.pt` + `pothole.onnx` road damage detector)
|
| 44 |
+
- [SafeVixAI/road-risk-scorer-onnx](https://huggingface.co/SafeVixAI/road-risk-scorer-onnx) (`risk_model.onnx` segment risk scorer)
|
| 45 |
+
- **Interactive Demo Space:** [SafeVixAI/safevixai-road-safety-demo](https://huggingface.co/spaces/SafeVixAI/safevixai-road-safety-demo)
|
| 46 |
|
| 47 |
---
|
| 48 |
|
| 49 |
+
## Quickstart (Google Colab / Python)
|
| 50 |
|
| 51 |
```python
|
| 52 |
+
# Clone the full dataset hub
|
| 53 |
!git clone https://huggingface.co/datasets/SafeVixAI/SafeVixAI-Dataset-Hub /content/data
|
| 54 |
|
| 55 |
+
# Symlink chatbot knowledge assets into the app workspace
|
| 56 |
import os
|
| 57 |
os.makedirs("/content/SafeVixAI/chatbot_service", exist_ok=True)
|
| 58 |
!ln -sfn /content/data/data/chatbot_service/data /content/SafeVixAI/chatbot_service/data
|
| 59 |
```
|
| 60 |
|
| 61 |
+
Or download individual files selectively via `huggingface_hub`:
|
| 62 |
|
| 63 |
+
```python
|
| 64 |
+
from huggingface_hub import hf_hub_download
|
| 65 |
|
| 66 |
+
blackspots = hf_hub_download(
|
| 67 |
+
repo_id="SafeVixAI/SafeVixAI-Dataset-Hub",
|
| 68 |
+
filename="data/frontend/offline-data/blackspot_seed.csv",
|
| 69 |
+
repo_type="dataset",
|
| 70 |
+
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 71 |
```
|
| 72 |
|
| 73 |
---
|
| 74 |
|
| 75 |
+
## Repository Structure (`11,098` Files · `4.45 GB`)
|
| 76 |
|
| 77 |
+
```text
|
| 78 |
+
SafeVixAI-Dataset-Hub/
|
| 79 |
+
├── README.md, LICENSE, requirements.txt
|
| 80 |
+
├── notebooks/ ← 5 reproducible Colab training/processing notebooks + README.md
|
| 81 |
+
├── data/ ← 11,000 intelligence & dataset files (~4.44 GB)
|
| 82 |
+
│ ├── backend/
|
| 83 |
+
│ │ ├── data/civic_intel/ ← Civic infrastructure, OSM road segments & boundary metadata
|
| 84 |
+
│ │ └── datasets/ ← AccidentsBig.csv, india_road_accident_coords.csv, city road CSVs
|
| 85 |
+
│ ├── chatbot_service/ ← 10,511 files: pothole_training, PMGSY roads, legal PDFs, ChromaDB, QA pairs
|
| 86 |
+
│ └── frontend/
|
| 87 |
+
│ ├── offline-data/ ← PWA bundles, blackspots & 11 Indian language translation JSONs
|
| 88 |
+
│ └── public/
|
| 89 |
+
│ ├── models/ ← Edge ONNX exports (pothole.onnx, risk_model.onnx)
|
| 90 |
+
│ └── offline-data/ ← Static PWA offline bundles
|
| 91 |
+
└── scripts/ ← 88 reproducible data, backend & QA validation scripts
|
| 92 |
+
├── backend/
|
| 93 |
+
│ ├── app/ ← DB seeding, RLS audit, vectorstore & offline bundle scripts
|
| 94 |
+
│ └── data/ ← Road source manifests, PMGSY sampler & MVA 2019 violation seeders
|
| 95 |
+
├── chatbot_service/
|
| 96 |
+
│ ├── app/ ← Emergency service seeding helpers
|
| 97 |
+
│ └── data/ ← Retrying Overpass GIS fetchers (hospitals, police, ambulance, fire)
|
| 98 |
+
└── scripts/
|
| 99 |
+
├── app/, data/, docs/ ← Master data bootstrapper, MoRTH PDF extractors & verification scripts
|
| 100 |
+
└── chatbot_service/data/ ← Reference Motor Vehicles Act & WHO Trauma Care PDFs
|
| 101 |
+
```
|
| 102 |
|
| 103 |
---
|
| 104 |
|
| 105 |
+
## Data Contents
|
| 106 |
|
| 107 |
+
| Category | Key Paths | Scale | Primary Sources |
|
| 108 |
+
| --- | --- | --- | --- |
|
| 109 |
+
| Pothole Vision Training | `data/chatbot_service/pothole_training/` | 9,928 files (~1.65 GB) | Roboflow Pothole v3 + Kaggle RDD2022 |
|
| 110 |
+
| Road Infrastructure | `data/chatbot_service/data/roads/` (`pmgsy_roads.geojson`, `pmgsy-geosadak-master.zip`) | ~1.98 GB | PMGSY GeoSadak / NHAI |
|
| 111 |
+
| Legal & RAG Corpus | `data/chatbot_service/legal/`, `scripts/scripts/chatbot_service/data/legal/`, `qa_pairs/`, `chroma_db/` | ~483 MB | Motor Vehicles Act 1988 & Amendment 2019, MoRTH, WHO Trauma Care |
|
| 112 |
+
| Accident & Blackspots | `data/backend/datasets/`, `data/chatbot_service/accidents/`, `data/frontend/offline-data/` | ~256 MB | MoRTH / Kaggle India Road Accidents |
|
| 113 |
+
| Emergency Services GIS | `data/chatbot_service/hospitals/`, `emergency_services/`, `emergency/` | ~42 MB | OpenStreetMap Overpass API, NHP / NIN |
|
| 114 |
+
| PWA Multilingual Bundles | `data/frontend/offline-data/translations/*.json` (11 languages: `bn, en, gu, hi, kn, ml, mr, pa, ta, te, ur`) | ~26 MB | SafeVixAI PWA Localization |
|
| 115 |
+
| Edge ONNX Exports | `data/frontend/public/models/pothole.onnx`, `risk_model.onnx` | ~12.3 MB | Exported from SafeVixAI Colab pipelines |
|
| 116 |
|
| 117 |
+
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 118 |
|
| 119 |
+
## Reproducible Data Pipelines (`scripts/`)
|
| 120 |
|
| 121 |
```bash
|
| 122 |
# 1. Setup Kaggle auth (one-time)
|
| 123 |
pwsh scripts/scripts/data/setup_kaggle.ps1
|
| 124 |
|
| 125 |
+
# 2. Fetch emergency service GIS data (with retries + backoff)
|
| 126 |
python scripts/chatbot_service/data/fetch_hospitals.py
|
| 127 |
python scripts/chatbot_service/data/fetch_police.py
|
| 128 |
python scripts/chatbot_service/data/fetch_ambulance.py
|
| 129 |
python scripts/chatbot_service/data/fetch_blood_banks.py
|
| 130 |
python scripts/chatbot_service/data/fetch_fire.py
|
| 131 |
|
| 132 |
+
# 3. Download legal PDFs & extract MoRTH tables
|
| 133 |
python scripts/scripts/data/download_legal_pdfs.py
|
|
|
|
|
|
|
| 134 |
python scripts/scripts/data/extract_morth2022_tables.py
|
| 135 |
|
| 136 |
+
# 4. Verify dataset integrity
|
| 137 |
python scripts/scripts/data/verify_data.py
|
| 138 |
```
|
| 139 |
|
|
|
|
|
|
|
| 140 |
---
|
| 141 |
|
| 142 |
+
## Research Notebooks (`notebooks/`)
|
| 143 |
|
| 144 |
+
| # | Notebook | Output | Open in Colab |
|
| 145 |
+
| --- | --- | --- | --- |
|
| 146 |
+
| 1 | **YOLOv8 Pothole Detector Training** | ONNX + PyTorch road damage detector | [](https://colab.research.google.com/drive/1oe4Gk899lFB_vbRMUuOh4dqpsa3bbycI) |
|
| 147 |
+
| 2 | **ChromaDB RAG Vectorstore Build** | ChromaDB index for legal & first-aid RAG | [](https://colab.research.google.com/drive/1AzPdN9xjcjW20ko0shTYn0mvbxTUw57Q) |
|
| 148 |
+
| 3 | **Accident EDA & Hotspot Generator** | Blackspot seed CSV + hotspot summaries | [](https://colab.research.google.com/drive/1xh_lwv_B_jc0_83dvuNppWQRtVhqExTS) |
|
| 149 |
+
| 4 | **Roads Data Processing** | Sampled PMGSY road network GeoJSON | [](https://colab.research.google.com/drive/10_WfTlbbxW9A7ceQBZGaKF5UkydlUDin#scrollTo=z4XxGZmx0ymX) |
|
| 150 |
+
| 5 | **Risk Model ONNX Training** | GradientBoosting ONNX segment risk scorer | [](https://colab.research.google.com/drive/16IH-rn3CedYtfIpJP4iLa_KUjvfy8hAY) |
|
|
|
|
|
|
|
| 151 |
|
| 152 |
**Recommended run order:** `1 → 2 → 3 → 4 → 5`
|
| 153 |
|
|
|
|
|
|
|
| 154 |
---
|
| 155 |
|
| 156 |
+
## License & Attribution
|
| 157 |
|
| 158 |
+
Licensed under **Apache 2.0** — see [LICENSE](LICENSE).
|
| 159 |
|
| 160 |
+
Third-party upstream data incorporates OpenStreetMap (ODbL), MoRTH / Government of India Open Data, PMGSY GeoSadak, National Health Portal, WHO Trauma Care Guidelines, and Kaggle / Roboflow road damage benchmarks under their respective upstream terms.
|