An AI-powered Crime Intelligence Platform built for Karnataka State Police Hackathon to visualize crime patterns, detect hotspots, analyze criminal networks, and predict future crime risk using GIS and Machine Learning.
- Interactive Karnataka crime map
- Live crime incident visualization
- PostgreSQL + PostGIS integration
- Synthetic crime data generation
- District-wise filtering
- REST APIs using FastAPI
- Crime Heatmaps
- Station-wise density visualization
- Red Zone Detection using Z-Score
- Day/Night crime filtering
- Weekday vs Weekend analysis
- Modus Operandi (MO) clustering
- Interactive criminal relationship graph
- Force-directed visualization
- Crime pattern discovery
- Cluster-based suspect analysis
- XGBoost-based crime forecasting
- SHAP Explainability
- Station-wise risk scores
- Feature importance visualization
- Ground Truth Recovery Dashboard
- Station Officer View
- SCRB Analyst View
- Role-based dashboard UI
- Improved user experience
- Shared dashboard components
React Frontend
β
ββββββββββββββββββ΄βββββββββββββββββ
β β
FastAPI Backend ML Services
β β
PostgreSQL + PostGIS XGBoost + SHAP
β
Synthetic Crime Generator
- React
- Vite
- Leaflet
- React Force Graph
- Recharts
- Python
- FastAPI
- PostgreSQL
- PostGIS
- Scikit-learn
- XGBoost
- SHAP
- Pandas
- NumPy
KSP-Crime-Intelligence/
β
βββ backend/
βββ frontend/
βββ ml/
βββ docs/
βββ images/
βββ requirements.txt
βββ README.md
git clone <repository-url>
cd KSP-Crime-Intelligencecreatedb ksp_crime
psql -U postgres -d ksp_crime -f backend/schema.sqlcd backend
python -m venv venv
source venv/bin/activate
# Windows
venv\Scripts\activate
pip install -r requirements.txt
python generate_data.py
uvicorn main:app --reloadcd frontend
npm install
npm run devVisit:
http://localhost:5173
- Real-time CCTNS Integration
- Authentication & Authorization
- Live Crime Streaming
- AI-based Anomaly Detection
- Predictive Patrol Route Planning
- Cloud Deployment
Keerthana K
AI & Machine Learning Enthusiast | Full Stack Developer | ML Engineer Aspirant
β If you found this project useful, consider giving it a star!