Datasets:
SafeVixAI β Research Notebooks π
These notebooks are the research and training layer of SafeVixAI. Each one processes raw data from the Hub and produces a model, index, or processed dataset used by the live application.
β‘ One-Click Colab Setup
Run this at the top of any notebook to mount the full dataset:
# Step 1 β Clone the Hub (only run once per session)
!git clone https://huggingface.co/datasets/SafeVixAI/SafeVixAI-Dataset-Hub /content/hub
# Step 2 β Install dependencies
!pip install -q pdfplumber chromadb sentence-transformers ultralytics onnx
# Step 3 β Confirm data is accessible
import os
print("Data folders:", os.listdir("/content/hub"))
π Notebook Index
| # | Notebook | What it Produces | Input Data |
|---|---|---|---|
| 1 | YOLOv8_Pothole_Detector_Training |
ONNX road damage model | pothole_training/road_damage_2025/ |
| 2 | ChromaDB_RAG_Vectorstore_Build |
ChromaDB index for legal RAG | legal/, medical/ PDFs |
| 3 | Accident_EDA_&_Hotspot_Generator |
Blackspot seed CSV + heatmap | accidents/kaggle_india_accidents.csv |
| 4 | Roads_Data_Processing |
Sampled PMGSY GeoJSON | roads/pmgsy_roads.geojson |
| 5 | Risk_Model_ONNX_Training |
Risk scoring ONNX model | accidents/ + roads/ |
π Data Paths Used by These Notebooks
All notebooks expect data at these paths after cloning the Hub:
/content/hub/
βββ chatbot_service/data/
β βββ accidents/ β Notebooks 3, 5
β βββ legal/ β Notebook 2
β βββ medical/ β Notebook 2
β βββ pothole_training/ β Notebook 1
β βββ roads/ β Notebook 4
βββ backend/datasets/ β Notebook 4, 5
βββ frontend/public/models/ β Output for Notebooks 1, 5
π Running Order
For a full pipeline run, execute notebooks in this order:
1 β Train pothole detector β produces ONNX model
2 β Build RAG vectorstore β produces ChromaDB index
3 β Accident EDA β produces blackspot_seed.csv
4 β Roads processing β produces sampled GeoJSON
5 β Risk model β combines accidents + roads β risk ONNX
πΎ Saving Outputs Back
After training, outputs land in /content/hub/. To persist them:
# Commit outputs back to Hub (requires HF token)
import os
os.environ["HUGGING_FACE_TOKEN"] = "your_token_here"
!cd /content/hub && git config user.email "you@example.com"
!cd /content/hub && git config user.name "SafeVixAI"
!cd /content/hub && git add . && git commit -m "chore: update trained model outputs"
!cd /content/hub && git push https://your_username:$HUGGING_FACE_TOKEN@huggingface.co/datasets/SafeVixAI/SafeVixAI-Dataset-Hub main
Part of the SafeVixAI β IIT Madras Road Safety Hackathon 2026