Datasets:
Update README.md: fix 11 languages, file counts, structure, and model/Space cross-links
Browse files5 unmodified lines678910111 unmodified line1314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701715 unmodified lineslanguage:- en- hitags:- road-safety- india1 unmodified line- traffic-law- geospatial- ragpretty_name: SafeVixAI Dataset Hubsize_categories:- 1B<n<10B---# SafeVixAI Dataset Hub 🛡️> The **Intelligence Layer** for the SafeVixAI platform — IIT Madras Road Safety Hackathon 2026This 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 structureimport osos.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 PipelineThe `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.pypython scripts/chatbot_service/data/fetch_police.pypython scripts/chatbot_service/data/fetch_ambulance.pypython scripts/chatbot_service/data/fetch_blood_banks.pypython scripts/chatbot_service/data/fetch_fire.py# 3. Download legal documentspython scripts/scripts/data/download_legal_pdfs.py# 4. Extract MoRTH accident tablespython scripts/scripts/data/extract_morth2022_tables.py# 5. Verify everythingpython 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.---## 📜 LicenseApache 2.0 — See [LICENSE](LICENSE)Data sourced from OpenStreetMap (ODbL), MoRTH (Government of India Open Data), Kaggle, PMGSY GeoSadak, and National Health Portal.5 unmodified lines678910111213141516171819201 unmodified line2223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591605 unmodified lineslanguage:- en- hi- bn- gu- kn- ml- mr- pa- ta- te- urtags:- road-safety- india1 unmodified line- traffic-law- geospatial- rag- yolov8- onnx- chromadb- morth- indian-roadspretty_name: SafeVixAI Dataset Hubsize_categories:- 10K<n<100K---# SafeVixAI Dataset Hub> The **Intelligence Layer** for the SafeVixAI platform — IIT Madras Road Safety Hackathon 2026This 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).- **Main Application Repo:** [SafeVixAI/SafeVixAI (GitHub)](https://github.com/SafeVixAI/SafeVixAI)- **Standalone Model Cards:**- [SafeVixAI/pothole-detector-yolov8n](https://huggingface.co/SafeVixAI/pothole-detector-yolov8n) (`pothole.pt` + `pothole.onnx` road damage detector)- [SafeVixAI/road-risk-scorer-onnx](https://huggingface.co/SafeVixAI/road-risk-scorer-onnx) (`risk_model.onnx` segment risk scorer)- **Interactive Demo Space:** [SafeVixAI/safevixai-road-safety-demo](https://huggingface.co/spaces/SafeVixAI/safevixai-road-safety-demo)---## Quickstart (Google Colab / Python)```python# Clone the full dataset hub!git clone https://huggingface.co/datasets/SafeVixAI/SafeVixAI-Dataset-Hub /content/data# Symlink chatbot knowledge assets into the app workspaceimport osos.makedirs("/content/SafeVixAI/chatbot_service", exist_ok=True)!ln -sfn /content/data/data/chatbot_service/data /content/SafeVixAI/chatbot_service/data```Or download individual files selectively via `huggingface_hub`:```pythonfrom huggingface_hub import hf_hub_downloadblackspots = hf_hub_download(repo_id="SafeVixAI/SafeVixAI-Dataset-Hub",filename="data/frontend/offline-data/blackspot_seed.csv",repo_type="dataset",)```---## Repository Structure (`11,098` Files · `4.45 GB`)```textSafeVixAI-Dataset-Hub/├── README.md, LICENSE, requirements.txt├── notebooks/ ← 5 reproducible Colab training/processing notebooks + README.md├── data/ ← 11,000 intelligence & dataset files (~4.44 GB)│ ├── backend/│ │ ├── data/civic_intel/ ← Civic infrastructure, OSM road segments & boundary metadata│ │ └── datasets/ ← AccidentsBig.csv, india_road_accident_coords.csv, city road CSVs│ ├── chatbot_service/ ← 10,511 files: pothole_training, PMGSY roads, legal PDFs, ChromaDB, QA pairs│ └── frontend/│ ├── offline-data/ ← PWA bundles, blackspots & 11 Indian language translation JSONs│ └── public/│ ├── models/ ← Edge ONNX exports (pothole.onnx, risk_model.onnx)│ └── offline-data/ ← Static PWA offline bundles└── scripts/ ← 88 reproducible data, backend & QA validation scripts├── backend/│ ├── app/ ← DB seeding, RLS audit, vectorstore & offline bundle scripts│ └── data/ ← Road source manifests, PMGSY sampler & MVA 2019 violation seeders├── chatbot_service/│ ├── app/ ← Emergency service seeding helpers│ └── data/ ← Retrying Overpass GIS fetchers (hospitals, police, ambulance, fire)└── scripts/├── app/, data/, docs/ ← Master data bootstrapper, MoRTH PDF extractors & verification scripts└── chatbot_service/data/ ← Reference Motor Vehicles Act & WHO Trauma Care PDFs```---## Data Contents| Category | Key Paths | Scale | Primary Sources || --- | --- | --- | --- || Pothole Vision Training | `data/chatbot_service/pothole_training/` | 9,928 files (~1.65 GB) | Roboflow Pothole v3 + Kaggle RDD2022 || Road Infrastructure | `data/chatbot_service/data/roads/` (`pmgsy_roads.geojson`, `pmgsy-geosadak-master.zip`) | ~1.98 GB | PMGSY GeoSadak / NHAI || 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 || Accident & Blackspots | `data/backend/datasets/`, `data/chatbot_service/accidents/`, `data/frontend/offline-data/` | ~256 MB | MoRTH / Kaggle India Road Accidents || Emergency Services GIS | `data/chatbot_service/hospitals/`, `emergency_services/`, `emergency/` | ~42 MB | OpenStreetMap Overpass API, NHP / NIN || 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 || Edge ONNX Exports | `data/frontend/public/models/pothole.onnx`, `risk_model.onnx` | ~12.3 MB | Exported from SafeVixAI Colab pipelines |---## Reproducible Data Pipelines (`scripts/`)```bash# 1. Setup Kaggle auth (one-time)pwsh scripts/scripts/data/setup_kaggle.ps1# 2. Fetch emergency service GIS data (with retries + backoff)python scripts/chatbot_service/data/fetch_hospitals.pypython scripts/chatbot_service/data/fetch_police.pypython scripts/chatbot_service/data/fetch_ambulance.pypython scripts/chatbot_service/data/fetch_blood_banks.pypython scripts/chatbot_service/data/fetch_fire.py# 3. Download legal PDFs & extract MoRTH tablespython scripts/scripts/data/download_legal_pdfs.pypython scripts/scripts/data/extract_morth2022_tables.py# 4. Verify dataset integritypython scripts/scripts/data/verify_data.py```---## Research Notebooks (`notebooks/`)| # | Notebook | Output | Open in Colab || --- | --- | --- | --- || 1 | **YOLOv8 Pothole Detector Training** | ONNX + PyTorch road damage detector | [](https://colab.research.google.com/drive/1oe4Gk899lFB_vbRMUuOh4dqpsa3bbycI) || 2 | **ChromaDB RAG Vectorstore Build** | ChromaDB index for legal & first-aid RAG | [](https://colab.research.google.com/drive/1AzPdN9xjcjW20ko0shTYn0mvbxTUw57Q) || 3 | **Accident EDA & Hotspot Generator** | Blackspot seed CSV + hotspot summaries | [](https://colab.research.google.com/drive/1xh_lwv_B_jc0_83dvuNppWQRtVhqExTS) || 4 | **Roads Data Processing** | Sampled PMGSY road network GeoJSON | [](https://colab.research.google.com/drive/10_WfTlbbxW9A7ceQBZGaKF5UkydlUDin#scrollTo=z4XxGZmx0ymX) || 5 | **Risk Model ONNX Training** | GradientBoosting ONNX segment risk scorer | [](https://colab.research.google.com/drive/16IH-rn3CedYtfIpJP4iLa_KUjvfy8hAY) |**Recommended run order:** `1 → 2 → 3 → 4 → 5`---## License & AttributionLicensed under **Apache 2.0** — see [LICENSE](LICENSE).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.
README.md+85-96