Bappadala Rohith Kumar Naidu
chore: update github repository links to SafeVixAI
0f6dc04
|
Raw
History Blame Contribute Delete
2.94 kB

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