Inspiration

Students and working adults often struggle to stay deeply focused while studying or working. We wanted to create something that helps people recognize when their attention drifts and gently guide them back on track. That’s how Lock In was born a focus-tracking program that uses your webcam to detect when you’re distracted and helps you “lock in” to your work.

What it does

Lock In tracks your focus through the webcam. When it detects that you’re distracted or not looking at the screen, it plays a short “beep” sound as a warning. If the distraction lasts for a longer period (like one minute), it triggers an alarm to remind you to refocus. After the session, it shows you data such as total session time, focused vs distracted time, and your longest focus streak.

How we built it

We used Python, OpenCV, and MediaPipe to process webcam input and track head and eye movement. When the system detects distraction, it sends an alert sound using PyGame and PyAutoGUI. We also built a data tracking system that logs focus sessions, calculates stats, and summarizes them at the end.

Challenges we ran into

The biggest challenge was making the eye-tracking system sync smoothly with real-time alerts. Sometimes the detection was slightly delayed or not perfectly accurate depending on lighting or webcam angle. We also faced some difficulties setting up dependencies and testing across different environments.

Accomplishments that we're proud of

Even though the project isn’t perfect yet, we’re proud of the idea behind it helping people improve their focus and productivity through technology. We successfully built a working prototype that can detect distractions, play alerts, and summarize focus sessions.

What we learned

We learned how to collaborate effectively as a team, combine our skills in coding and design, and use AI-powered tools to build something meaningful. It also taught us about real-world challenges in computer vision and user experience.

What's next for Lock In

We plan to improve accuracy, add more advanced tracking (like blink and posture detection), and design a better user interface. Our goal is to make Lock In a reliable and user-friendly productivity companion that helps people achieve deeper focus every day.

Built With

Share this project:

Updates