Project Info
Inspiration
We, and many of our peers are constantly afflicted by our generation's diminishing attention span and growing reliance on social media. We came up with Locked.AI to remedy the poor focus that we may face when it comes to long periods of lectures and studying.
What it does
Locked.AI utilizes an artificial intelligence software that tracks eye and head movements to distinguish focused moments from unfocused ones, promptly alerting the user through their mobile device to get them back on track. After a studying session or lecture, Locked will give users a feedback report of how focused they were.
How we built it
We built Locked.AI using Python's OpenCV, mediapipe and Flask libraries for the backend and HTML/CSS for the frontend.
Challenges we ran into
One challenge we faced was being able to properly align the AI models with our goals. For instance, it was difficult perceiving depth with tracking sleepiness. We also ran into trouble detecting focus states as the thresholds required were extremely precise. Another difficulty was communicating between our Flask backend and HTML/CSS frontend. It took some time to figure out how to display our video recording with Javascript.
Accomplishments we're proud of
We are proud of making a finished product with technologies we are new to.
What we learned
We learned new Python technology and how to efficiently collaborate in a team.
What's next
Locked.AI plans to improve their face and eye detection accuracy and host its service on a server.
This repository has no readme, or GitHub could not be reached.
Analysis
View
Metric
- 1
Figures cover GitHub contributors during the hackathon window. A co-authored commit counts in full for each author, so per-member totals add up to more than the whole-team figures.
Technology
- CSSIn code
- FlaskIn code
- HTMLIn code
- JavaScriptIn code
- PythonIn code
5 of 5 appear in the indexed code.
AI coding agents
No AI coding agent signals were found in this repository.
Detected from committed agent config files and commit authorship. Absence of a signal is not proof an agent was unused.
Codebase size
Source size
270 KB
Source files
7
Counts recognized source files only; vendored directories, binaries and lockfiles are excluded, so this is smaller than the repository on disk.
Repository
kesavanramakrishnan/lockedai
25 files · 2.0 MB · @ 59cfee3
Structure
Interface
3 files · 12%Screens, components and styles rendered to the user.
Application logic
3 files · 12%Domain rules, services and shared utilities.
Supporting
Layers are inferred from where files sit in the tree, not from reading the code. A project that names its directories unconventionally will read oddly here — open the file browser to check anything the diagram implies.
Languages
- CSS89%
- Python5%
- HTML4%
- JavaScript2%
Share of indexed source by file size. Binary and vendored files are excluded.
Dependencies
requirements.txt
pypi · 6- flask
- flask_cors
- mediapipe
- numpy
- opencv-python
- pushover_complete
website/package.json
npm · 1- bootstrap
Declared in the repository’s manifests at the indexed commit. A declared package is not proof it is used, and runtime dependencies are listed first.
Feature verification
Built with OpenCV, mediapipe, Flask (Python) and HTML/CSS (frontend)Verified
Built using Python's OpenCV, mediapipe and Flask libraries for backend, HTML/CSS for frontend
Claimed on Devposthigh confidencerequirements.txt:1— Lists opencv-python, mediapipe, flask as dependenciesapp.py:1— Imports Flask, cv2, mediapipe in the backendtemplates/index.html:1— HTML/CSS frontend template rendered by Flask
Eye/head movement tracking for focus detectionVerified
AI tracks eye and head movements to distinguish focused from unfocused moments
Claimed on Devposthigh confidenceapp.py:161— focusTrack block computes hori_c/vert_c distances from face landmarks and compares to thresholds (0.77, 0.687) of calibrated baseline to classify Focused/Unfocusedapp.py:98— mediapipe FaceMesh landmarks used for forehead/chin/cheek points feeding the focus calculation
Live webcam video stream in browser (Flask backend to HTML/CSS/JS frontend)Verified
Flask backend and HTML/CSS frontend communicate to display video recording with Javascript
Claimed on Devposthigh confidenceapp.py:199— /video_feed route streams generate_frames() as multipart JPEG responsestatic/scripts.js:83— videoStream.src set to the /video_feed endpoint URL to display the stream in an img tag
Post-session feedback reportVerified
After a studying session or lecture, Locked gives users a feedback report of how focused they were
Claimed on Devposthigh confidenceapp.py:205— /pause_stream endpoint tallies zero/one counts from sleep_data and returns them as a summarystatic/scripts.js:115— showModal/renderChart displays a Chart.js doughnut chart of Focused vs Unfocused time using the pause_stream response
Sleep/eye-closure detectionVerified
Distinguishes focused vs unfocused moments including detecting dozing off (fatigue) via eye closure
Claimed on Devposthigh confidenceapp.py:148— normalized_eye_distance compared to baseline_eye_distance*0.70 to detect closed eyes, incrementing closed_eye_counterapp.py:156— closed_eye_counter >= sleep_threshold triggers sleeping counter and notification
Mobile device alert via PushoverCode-supported
Promptly alerts the user through their mobile device to get them back on track
Claimed on Devpostmedium confidenceapp.py:26— send_notification_to_iphone uses PushoverAPI to send a message, called on sleep_threshold trip (line 158)app.py:28— Pushover api_token is hardcoded and user_key is only set via /receive_data; no notification call exists for the 'unfocused' branch, only for sleep, so mobile alerting for unfocused moments specifically is not wired up
Session start/stop controls with focus/sleep tracking optionsCode-supported
Implied by 'studying session' and 'lecture' focus tracking workflow
Claimed on Devpostmedium confidencetemplates/index.html:177— sessionForm has trackFocus/trackSleep checkboxes and emailInput submitted to backendapp.py:187— /receive_data reads data['focus'] and data['sleep'], but line 195 assigns focusTrack from data['sleep'] instead of sleepTrack, a bug that means the sleep toggle doesn't actually control sleepTrack
Diminishing attention span / social media distraction motivationClaimed only
Inspiration narrative about attention span and social media
Claimed on Devposthigh confidenceHosting the service on a server (future plan)Claimed only
What's next: host its service on a server
Claimed on Devposthigh confidence
An AI agent derived these features from the project’s Devpost page and readme, then searched the code for each one. Verified features are backed by cited code; claimed-only features had no supporting code, which is not by itself proof a feature is missing.
Export this project's context (description, README, evidence, key source files) to chat with an AI agent elsewhere.