Inspiration
I know how easy it is to lose focus while studying. You sit down with full intention to work, but within five minutes, you find yourself scrolling on your phone or nodding off at your desk. I wanted to build a simple, no-nonsense tool that holds you accountable in real time without needing expensive gadgets.
What it does
Smart Study Monitor acts as a virtual study assistant using your laptop's webcam. It runs in the background during your study session and keeps an eye on two main distractions:
*Phone Detection:- Using object detection, it immediately catches when a mobile phone enters the camera frame.
*Sleep & Drowsiness Detection:-It continuously tracks your face and checks whether your eyes are open or closed.
*instant Alerts:- If it detects a phone or notices your eyes have been closed for too long, it displays a visual warning on screen and plays an audio alarm (alaram.mp3) to snap you back into focus.
How we built it
The project is built entirely in Python using standard computer vision libraries:
*YOLOv8 (yolov8n.pt) handles real-time object detection for identifying mobile devices.
*OpenCV captures the webcam video stream and runs Haar Cascades to detect open eyes.
*pygame Mixer triggers audio playback for immediate sound alerts.
Challenges we ran into
*Filtering Natural Blinks:-Humans naturally blink all the time. To stop the alarm from going off every time you blink, I added a frame-counter threshold so the alert only triggers if your eyes stay closed for several consecutive frames (around 15 frames).
*Environment Setup:-making sure the script runs smoothly without missing files was tricky, so I added code that automatically downloads necessary detection models (haarcascade_eye.xml) if they aren't already present in the folder.
What's next for Smart Study Monitor
In the future, I’d love to add a focus analytics dashboard that tracks total study time versus distracted time, as well as posture detection to warn you if you start slumping over your desk.
Built With
- computer-vision
- machine-learning
- opencv
- pygame
- python
- ultralytics
- yolov8
Log in or sign up for Devpost to join the conversation.