Chaukas
Always on Always watching
The problem Chaukas solves
The Problem It Solves
Modern transportation faces a serious safety challenge:
driver drowsiness is one of the leading causes of road accidents, especially during long-haul and night driving. Existing systems fail because:
Traditional alert systems are not real-time, inaccurate, or easily ignored.
Companies have no reliable way to monitor drivers or verify their alertness during trips.
There is no transparent and tamper-proof record of driver behavior.
Families and fleet managers receive no immediate notification during dangerous situations.
Chaukas solves all of these problems with one unified system.
What People Can Use It For
- Real-time Accident Prevention
Chaukas continuously monitors:
Eye closure
Yawning
Head tilt
When drowsiness is detected, the system instantly alerts the driver with voice alarms and pop-ups.
This prevents drowsiness-related accidents before they happen.
- Family & Emergency Contact Safety
If the driver fails to respond to alerts:
The system automatically sends an email notification
Includes time, alert type, and driver details
Helps family members or managers take immediate action
This provides reassurance that drivers are never alone during dangerous moments.
- Company-Level Monitoring
Logistics/fleet companies can use Chaukas to:
Track driver alertness
Ensure safe goods transportation
Identify best and worst performing drivers
Reduce accident claims & insurance cost
Promote safer driving habits
- Immutable Blockchain Logging
All alerts are stored on an Ethereum blockchain so that:
Records cannot be altered or deleted
Companies get a tamper-proof history of driver behavior
Drivers are accountable yet protected from false accusations
Real-time updates appear on the company dashboard
This solves the biggest issue in fleet safety:
trust and transparency.
- Real-time Visual Analytics
Chaukas provides:
Live bar graph updates of alerts
Real-time counters
Driver-wise statistics
Helps companies make data-driven safety decisions.
How It Makes Tasks Easier & Safer
Drivers get instant alerts, avoiding accidents.
Families get notified when danger is detected.
Companies get 100% transparent, immutable logs.
Fleet managers can reward safe drivers and monitor risky ones.
Fits into real-time transport operations without any complex hardware.
In One Line:
Chaukas makes roads safer by detecting driver drowsiness in real-time and recording every alert on blockchain to ensure trust, transparency, and accident prevention.
Challenges I ran into
Challenges I Ran Into
Building Chaukas: Real-time Driver Drowsiness Detection + Blockchain Logging involved several major technical and architectural challenges. Each hurdle helped us refine and strengthen the system.
- Real-Time Face Detection Accuracy
Challenge:
Mediapipe + OpenCV sometimes misclassified normal blinks as drowsiness or failed under low lighting.
How I solved it:
Tuned EAR (Eye Aspect Ratio) thresholds
Added head-tilt + yawn classification for multi-signal validation
Added a 5-frame rolling buffer to avoid false positives
This made the detection far more stable and reliable.
- Keeping the Frontend UI and Backend Detection in Sync
Challenge:
Live camera detection was running locally while React frontend needed continuous updates (counts, graphs, alert status).
Fix:
Implemented a clean Flask route system
Used fetch() polling + state hooks in React
Ensured consistent JSON structure
Now the bar graph & real-time counters sync perfectly.
- Database Race Conditions
Challenge:
Multiple alert events fired rapidly, causing inconsistent alert counts inside SQLite.
Solution:
Implemented atomic insert/update logic
Created separate alert table with timestamps
Added cooldown to prevent rapid duplicate inserts
Result: clean, structured historical data.
- Blockchain Logging Issues
Challenge:
Initially, blockchain logs always showed Alert Count = 0 because the detection logic reset alert counters on threshold.
Fix:
Separated Frontend Counters (visual) from
Backend Actual Alert Count (for blockchain).
Ensured backend always sends the true threshold count (e.g., 5) to smart contract.
Added structured payload to push data to company dashboard.
Now blockchain entries are accurate and match real events.
- Company Dashboard Live Updates
Challenge:
The company dashboard was not updating when blockchain received a new event.
Solution:
Sent a POST request from backend to dashboard API endpoint
Updated dashboard with real-time logs and hashed IDs
Now managers see every alert within milliseconds.
- Email Notification Cooldown
Challenge:
Without cooldown, SMTP flooded inboxes with emails for every detection frame.
Fix:
Added a 30-second cooldown
Cached last email send-time
Ensured only one email is sent per threshold event
This made notifications practical, not spammy.
- Local Hardhat Node + Flask Integration
Challenge:
Web3.py kept failing because of network mismatch & contract deployment changes.
How it was solved:
Fixed RPC URL
Updated ABI after every contract change
Implemented structured try–except to handle blockchain errors gracefully.
Now all blockchain events are logged reliably.
Despite these challenges, each one improved the final quality of Chaukas, resulting in a polished, stable, and hackathon-ready submission.
