Datasets:
Bappadala Rohith Kumar Naidu commited on
Commit Β·
6a0c11d
1
Parent(s): d710a81
docs: add comprehensive Dataset Card with scripts pipeline documentation
Browse files- Added HuggingFace metadata tags (license, task, language, size)
- Full data contents table with sources and sizes
- Scripts/ folder structure documented with origin paths
- Quickstart commands for running each data acquisition script
- Notes on Pro vs basic fetcher versions
README.md
CHANGED
|
@@ -1,3 +1,157 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: apache-2.0
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
task_categories:
|
| 4 |
+
- object-detection
|
| 5 |
+
- question-answering
|
| 6 |
+
language:
|
| 7 |
+
- en
|
| 8 |
+
- hi
|
| 9 |
+
tags:
|
| 10 |
+
- road-safety
|
| 11 |
+
- india
|
| 12 |
+
- emergency-services
|
| 13 |
+
- traffic-law
|
| 14 |
+
- geospatial
|
| 15 |
+
- rag
|
| 16 |
+
pretty_name: SafeVisionAI Dataset Hub
|
| 17 |
+
size_categories:
|
| 18 |
+
- 1B<n<10B
|
| 19 |
+
---
|
| 20 |
+
|
| 21 |
+
# SafeVisionAI Dataset Hub π‘οΈ
|
| 22 |
+
|
| 23 |
+
> The **Intelligence Layer** for the SafeVisionAI platform β IIT Madras Road Safety Hackathon 2026
|
| 24 |
+
|
| 25 |
+
This repository hosts all datasets, pre-trained models, notebooks, and **reproducible data acquisition scripts** that power the SafeVisionAI application. It is designed to be cloned directly into Google Colab or any research environment.
|
| 26 |
+
|
| 27 |
+
**Main Application Repo:** [SafeVision-AI/SafeVision-AI](https://github.com/SafeVision-AI/SafeVision-AI)
|
| 28 |
+
|
| 29 |
+
---
|
| 30 |
+
|
| 31 |
+
## β‘ Quickstart (Google Colab)
|
| 32 |
+
|
| 33 |
+
```python
|
| 34 |
+
# Clone the entire intelligence layer
|
| 35 |
+
!git clone https://huggingface.co/datasets/rohith083/SafeVisionAI-Dataset-Hub /content/data
|
| 36 |
+
|
| 37 |
+
# Symlink into the app structure
|
| 38 |
+
import os
|
| 39 |
+
os.makedirs("/content/SafeVisionAI/chatbot_service", exist_ok=True)
|
| 40 |
+
!ln -sfn /content/data/data/chatbot_service/data /content/SafeVisionAI/chatbot_service/data
|
| 41 |
+
```
|
| 42 |
+
|
| 43 |
+
---
|
| 44 |
+
|
| 45 |
+
## π¦ Repository Structure
|
| 46 |
+
|
| 47 |
+
```
|
| 48 |
+
SafeVisionAI-Dataset-Hub/
|
| 49 |
+
βββ data/ β 3.6 GB of raw intelligence data
|
| 50 |
+
β βββ chatbot_service/data/ β Legal PDFs, GIS CSVs, accident data, models
|
| 51 |
+
β βββ backend/datasets/ β Challan rules, road infrastructure
|
| 52 |
+
β
|
| 53 |
+
βββ scripts/ β Reproducible data acquisition pipeline
|
| 54 |
+
β βββ scripts/data/ β Root-level data scripts (fetchers, extractors)
|
| 55 |
+
β βββ backend/data/ β Backend data transforms (pure Python)
|
| 56 |
+
β βββ chatbot_service/data/ β Pro Overpass GIS fetchers
|
| 57 |
+
β
|
| 58 |
+
βββ notebooks/ β Research notebooks and analysis
|
| 59 |
+
```
|
| 60 |
+
|
| 61 |
+
---
|
| 62 |
+
|
| 63 |
+
## ποΈ Data Contents
|
| 64 |
+
|
| 65 |
+
| Category | Files | Size | Source |
|
| 66 |
+
|---|---|---|---|
|
| 67 |
+
| Emergency Services GIS | `hospitals.csv`, `police_stations.csv`, `fire_stations.csv`, `ambulance.csv` | ~150 MB | OpenStreetMap Overpass API |
|
| 68 |
+
| Legal Documents | `motor_vehicles_act_1988.pdf`, `mv_amendment_act_2019.pdf` | ~30 MB | MoRTH / Indian Kanoon |
|
| 69 |
+
| Accident Statistics | `kaggle_india_accidents.csv`, `morth_2022/*.csv` | ~250 MB | MoRTH / Kaggle |
|
| 70 |
+
| Road Infrastructure | `pmgsy_roads.geojson`, `toll_plazas.csv` | ~900 MB | PMGSY GeoSadak / NHAI |
|
| 71 |
+
| Hospital Directory | `hospital_directory.csv`, `nin_facilities.csv` | ~1.2 GB | NHP / NIN |
|
| 72 |
+
| Traffic Violations | `violations_seed.csv`, `state_overrides.csv` | ~5 MB | MVA 2019 |
|
| 73 |
+
| Road Damage Model | `road_damage_2025/` | ~800 MB | ONNX + Training Data |
|
| 74 |
+
| QA Pairs | `qa_pairs/` | ~50 MB | Custom RAG Training |
|
| 75 |
+
|
| 76 |
+
---
|
| 77 |
+
|
| 78 |
+
## π¬ Scripts β Reproducible Data Pipeline
|
| 79 |
+
|
| 80 |
+
The `scripts/` folder mirrors the main application's data acquisition pipeline.
|
| 81 |
+
All scripts here are **pure Python** β they run without any database or backend stack.
|
| 82 |
+
|
| 83 |
+
### Structure
|
| 84 |
+
|
| 85 |
+
```
|
| 86 |
+
scripts/
|
| 87 |
+
βββ scripts/data/ β from SafeVisionAI/scripts/data/
|
| 88 |
+
β βββ _overpass_utils.py β Core GIS utility (basic version)
|
| 89 |
+
β βββ fetch_hospitals.py β Hospital data from OpenStreetMap
|
| 90 |
+
β βββ fetch_police.py β Police station data
|
| 91 |
+
β βββ fetch_ambulance.py β Ambulance service data
|
| 92 |
+
β βββ fetch_blood_banks.py β Blood bank data
|
| 93 |
+
β βββ fetch_fire.py β Fire station data
|
| 94 |
+
β βββ download_legal_pdfs.py β MV Act PDF downloader
|
| 95 |
+
β βββ extract_morth2022_tables.py β PDF β CSV extractor
|
| 96 |
+
β βββ seed_blackspots.py β Accident blackspot normalizer
|
| 97 |
+
β βββ bootstrap_local_data.py β Master data orchestrator
|
| 98 |
+
β βββ verify_data.py β Data integrity checker
|
| 99 |
+
β βββ inspect_zips.py β Dataset zip validator
|
| 100 |
+
β βββ audit_env.py β Environment configuration checker
|
| 101 |
+
β βββ check_all_scripts.py β Script syntax validator
|
| 102 |
+
β βββ setup_kaggle.ps1 β Kaggle API auth setup
|
| 103 |
+
β
|
| 104 |
+
βββ backend/data/ β from SafeVisionAI/backend/scripts/data/
|
| 105 |
+
β βββ seed_violations.py β Traffic fine normalizer (MVA 2019)
|
| 106 |
+
β βββ prepare_road_sources.py β CSV/GeoJSON β LineString converter
|
| 107 |
+
β βββ sample_pmgsy.py β PMGSY 867K roads sampler
|
| 108 |
+
β βββ road_sources.example.json β Manifest template
|
| 109 |
+
β βββ road_sources.json β Active road source manifest
|
| 110 |
+
β
|
| 111 |
+
βββ chatbot_service/data/ β from SafeVisionAI/chatbot_service/scripts/data/
|
| 112 |
+
βββ _overpass_utils.py β Pro GIS utility (with retries + backoff)
|
| 113 |
+
βββ fetch_hospitals.py β Pro hospital fetcher
|
| 114 |
+
βββ fetch_police.py β Pro police fetcher
|
| 115 |
+
βββ fetch_ambulance.py β Pro ambulance fetcher
|
| 116 |
+
βββ fetch_blood_banks.py β Pro blood bank fetcher
|
| 117 |
+
βββ fetch_fire.py β Pro fire station fetcher
|
| 118 |
+
```
|
| 119 |
+
|
| 120 |
+
### Running the Scripts
|
| 121 |
+
|
| 122 |
+
```bash
|
| 123 |
+
# 1. Setup Kaggle auth (one-time)
|
| 124 |
+
pwsh scripts/scripts/data/setup_kaggle.ps1
|
| 125 |
+
|
| 126 |
+
# 2. Fetch all emergency service GIS data (Pro versions recommended)
|
| 127 |
+
python scripts/chatbot_service/data/fetch_hospitals.py
|
| 128 |
+
python scripts/chatbot_service/data/fetch_police.py
|
| 129 |
+
python scripts/chatbot_service/data/fetch_ambulance.py
|
| 130 |
+
python scripts/chatbot_service/data/fetch_blood_banks.py
|
| 131 |
+
python scripts/chatbot_service/data/fetch_fire.py
|
| 132 |
+
|
| 133 |
+
# 3. Download legal documents
|
| 134 |
+
python scripts/scripts/data/download_legal_pdfs.py
|
| 135 |
+
|
| 136 |
+
# 4. Extract MoRTH accident tables
|
| 137 |
+
python scripts/scripts/data/extract_morth2022_tables.py
|
| 138 |
+
|
| 139 |
+
# 5. Verify everything
|
| 140 |
+
python scripts/scripts/data/verify_data.py
|
| 141 |
+
```
|
| 142 |
+
|
| 143 |
+
> **Note:** `chatbot_service/data/` versions of the fetchers are the **Pro versions** β they include retry logic, exponential backoff, and more precise Indian GIS selectors.
|
| 144 |
+
|
| 145 |
+
---
|
| 146 |
+
|
| 147 |
+
## π Notebooks
|
| 148 |
+
|
| 149 |
+
See `notebooks/README.md` for the full Colab quickstart guide.
|
| 150 |
+
|
| 151 |
+
---
|
| 152 |
+
|
| 153 |
+
## π License
|
| 154 |
+
|
| 155 |
+
Apache 2.0 β See [LICENSE](LICENSE)
|
| 156 |
+
|
| 157 |
+
Data sourced from OpenStreetMap (ODbL), MoRTH (Government of India Open Data), Kaggle, PMGSY GeoSadak, and National Health Portal.
|