How abhimahto/ai-powered-rockfall-prediction-and-alert-system-for-open-pit-mines- works
RockGuard AI is a mine-safety dashboard with a Flask prediction backend. Safety managers sign in, review mine and environmental risk, submit images or webcam frames for analysis, and view predictions and alerts. The README documents an ONNX detector with an OpenCV fallback, sensor-based safety calculations, mitigation plans, and SMS/WhatsApp alerts. The available backend excerpt confirms detection and SQLite logging, but not every described calculation or integration; those connections are therefore limited to documented capabilities and are marked optional where appropriate.
Main entry points: App.jsx App and routes · app.py Flask API · AuthContext.jsx Auth context · ImageUploadAnalysis.jsx Image analysis
Components 21
Access and dashboard
- App and routes
frontend/src/App.jsx - Auth context
frontend/src/contexts/AuthContext.jsx - Login
frontend/src/components/Login.jsx - Risk dashboard
frontend/src/components/Dashboard.jsx - India mine dashboard
frontend/src/components/IndianRockfallDashboard.jsx - Risk map
frontend/src/components/RiskMap.jsx - Mine risk data
frontend/src/data/indianMinesData.js
Monitoring and analysis
- Image analysis
frontend/src/components/ImageUploadAnalysis.jsx - Live webcam
frontend/src/components/LiveWebcam.jsx - Environmental monitor
frontend/src/components/EnvironmentalMonitor.jsx - Safety prediction
frontend/src/components/PredictionModel.jsx
Risk response
- Alert system
frontend/src/components/AlertSystem.jsx - Pit-hole alarm
frontend/src/components/PitHoleAlarm.jsx - SMS and WhatsApp
frontend/src/components/SMSWhatsAppAlerts.jsx - Report generator
frontend/src/components/ReportGenerator.jsx
Prediction backend
- Flask API
backend/app.py - Visual risk detector
backend/app.py - SQLite logs
backend/app.py
Other components
- Safety manager
- Camera or webcam
- Mine sensors
Connections 30
- Safety manager → App and routes: uses
- App and routes → Auth context: provides auth
- App and routes → Login: routes to
- App and routes → Risk dashboard: routes to
- App and routes → India mine dashboard: routes to
- App and routes → Risk map: routes to
- App and routes → Image analysis: routes to
- App and routes → Live webcam: routes to
- App and routes → Safety prediction: routes to
- App and routes → Environmental monitor: routes to
- App and routes → Pit-hole alarm: routes to
- App and routes → SMS and WhatsApp: routes to
- Login → Auth context: authenticates via
- Auth context → Safety manager: persists session
- India mine dashboard → Mine risk data: reads
- Camera or webcam → Live webcam: streams frames
- Camera or webcam → Image analysis: provides image
- Live webcam → Flask API: posts frame
- Image analysis → Flask API: posts image
- Flask API → Visual risk detector: invokes detection
- Visual risk detector → Flask API: returns detections
- Flask API → SQLite logs: logs alerts and sensors
- Mine sensors → SQLite logs: telemetry logs
- Safety prediction → Flask API: requests prediction
- Environmental monitor → Flask API: fetches monitoring data
- Risk dashboard → Risk map: presents mine risk
- Alert system → SQLite logs: reads alert records
- Pit-hole alarm → Alert system: surfaces warnings
- SMS and WhatsApp → Safety manager: delivers alerts
- Report generator → Safety manager: presents reports