Skip to content

ajithhraj/streetsense

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

StreetSense v2.0 — AI Road Hazard Detector

🌍 Live Demo → streetsense.streamlit.app

Standalone Powered by Built with License

AI-powered road hazard detection built specifically for Indian road conditions.
Upload any road photo and get instant analysis — no signup, no installation required.


🚀 Try It Now

streetsense.streamlit.app — fully standalone, works in any browser, no account needed.

Just open the link, upload a road photo, and get a complete hazard report in seconds.


What It Does

StreetSense uses LLaMA 4 Scout (via Groq) to analyze road images and detect hazards common to Indian roads. It returns a severity score, formal civic report, and actionable advice for drivers — all in under 5 seconds.

Detectable Hazards

Icon Hazard Severity Weight
⚠️ Pothole 0.8
🌊 Waterlogging 0.9
🕳️ Missing Manhole 1.0
🛣️ Broken Road 0.7
🪨 Debris 0.6
🚧 Broken Divider 0.5
〰️ Faded Markings 0.4
🚫 Broken Signage 0.5
🏪 Encroachment 0.4
〽️ Unmarked Speed Breaker 0.5

Features

📸 Image Analysis

Upload any road photo or dashcam frame. Get severity score (0–10), hazard tags, road condition label, confidence rating, immediate driver action, and a formal civic report ready to submit to municipal authorities.

📷 Live Camera

Use your webcam or phone camera to capture and analyze road conditions in real time.

🎬 Video Analysis

Upload a dashcam video. StreetSense extracts every Nth frame, analyzes each one, and produces a full timeline report — worst moment, average severity, safe vs critical sections.

🗺️ Crowd Map

Every submitted report is saved and plotted on a live OpenStreetMap heatmap. See hazard density across the city at a glance.

🔌 REST API

Integrate StreetSense into any civic dashboard, mobile app, or data pipeline.

curl -X POST http://localhost:8000/analyze \
  -F "file=@road.jpg" \
  -F "location=MG Road, Bengaluru"

🤖 Telegram Bot

Send any road photo to the bot and receive a full hazard report instantly.


Tech Stack

Layer Technology
Vision + Language LLaMA 4 Scout 17B via Groq API
Web App Streamlit
Maps Folium + OpenStreetMap
Database SQLite
REST API FastAPI + Uvicorn
Bot python-telegram-bot
Image Processing Pillow, OpenCV
GPS Extraction ExifRead

Run Locally

git clone https://github.com/ajithhraj/streetsense.git
cd streetsense
pip install -r requirements.txt
streamlit run app.py

Add your Groq API key in the sidebar (free at console.groq.com).

Run API Server

export GROQ_API_KEY=your_key
uvicorn api:app --reload --port 8000
# Docs at http://localhost:8000/docs

Run Telegram Bot

export GROQ_API_KEY=your_key
export TELEGRAM_TOKEN=your_token
python bot.py

Project Structure

streetsense/
├── app.py                  # Streamlit web app (5 tabs)
├── api.py                  # FastAPI REST server
├── bot.py                  # Telegram bot
├── requirements.txt
└── src/
    ├── analyzer.py         # Groq vision + LLM pipeline
    ├── hazard_taxonomy.py  # 10 Indian road hazard types
    ├── gps_extractor.py    # EXIF GPS metadata reader
    ├── map_builder.py      # Single-report map
    ├── crowdmap.py         # Crowdsourced heatmap
    ├── database.py         # SQLite report storage
    └── video_analyzer.py   # Frame extraction + batch analysis

Part of GSoC Profile

This project is part of a series of AI/ML projects built to demonstrate research-grade engineering:

Project Description Link
🧠 Neural Network from Scratch NumPy-only NN, 97.9% MNIST accuracy github
💬 Sentiment Monitor YouTube comment NLP analyzer github
🔍 Sense AI Chrome extension for YouTube sentiment github
🛣️ StreetSense Road hazard detection · Live streetsense.streamlit.app

Author

Ajith Rajgithub.com/ajithhraj


License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages