-
-
Calibration screen — the patient enters their name and selects which eye is weak before a session begins.
-
Live gameplay: the true target and two decoys rendered as a red-blue anaglyph
-
End-of-session summary — 30 trials completed at 63.3% accuracy, automatically saved to MySQL.
-
Progress dashboard — session history across multiple patients and dates, with an accuracy trend chart pulling live from database
-
The adaptive algorithm visualized — strong eye gain steps up from 0.50 to 0.55 partway through the session
-
Behind the UI: real relational data in MySQL — patients, sessions
-
trial-level logs, confirming the full stack is genuinely connected end to end, not simulated.
Inspiration
This Project comes from my childhood , i grew up with a friend who had amblyopia, and she had to cover her working eye to force the lazy eye to work, she always complained because it was bothering her and she wasn't feeling comfortable , after i grew my skills in tech one day i sat and remembered how she struggled and i thought what if i invent something fun and enjoyable like a game which will help children and others with amblyopia like something which will give results but still fun where young children can do it beacuse are the one who are likely to have it. And According to research amblyopia affects roughly 2-3% of children and the standard treatment so patching the strong eye was the known solution But many children hate it and patient don't complete the treatment I wanted to explore something underlying clinical idea behind modern diphoptic therapy ( used in tools like vivid vision ) could be built as an accessible , low cost prototype using nothing more than a browser and a $1 pair of red glasses. I wasn't trying to make a gaome about amblyopia , I was trying to make a therapy experience that didn't feel like therapy.
What it does
FocusEye uses the red-blue glasses trick (already existed ) where each eye sees something different. You play a game with balls , where only the weak eye sees the correct balls. the red lens shows the red channel and the blue lens shows the blue channel. The system tracks how the person is playing, so it can make the game easier or more difficult. first, the system ask for your name , then asks you which eye is weak and you select that and start playing . you get either 30 Trials or 5 minutes and afterwards the system shows you correct and incorrect results. the data is saved in database, and if the same person logs in again the systerm recognizes them. You can also view a dashboard which shows accuracy and charts. In between Instead of blocking the strong eye completely the app reduce strong eye contrast and keeps the weak eye at full strength forrcing the brain to actually fuse input from both eyes instead of suppressing one.
The core Task: a ball moves around the screen visible clearly through the weak eye channel , the strong eye sees the real ball plus decoy balls all visually identical The patient has to to click the true target something only reliably solvable by combinig both eyes input. finally an adaptive algorithm tracks accuracy in real time and automatically rebalance the constrast doing well raises the difficulty (strong eye gets brighter , more competitive) struggling eases it back off every trial correct or incorrect gain values , response time is logged to a database and dashboard visualizez accuracy trends accross sessions and the contrast adjustment curve within a session.
FocusEye is currently a prototype and is not intended to diagnose or treat amblyopia. The project is an exploration of how dichoptic therapy concepts could be turned into an accessible , engaging digital experience. Any future testing with patients woul need to be conducted with appropriate clinical supervision and validation.
How we built it
First I used VS Code, then installed Python, then the Python libraries — NumPy, Pygame, and OpenCV. For the backend I used Flask, and MySQL for the database.
I started by building the therapy logic in Pygame. First I split the balls and made them move, and I used the W and S keys on my keyboard to increase and decrease the brightness for my weak eye, and the up and down arrow keys to do the same for the strong eye.
After that, instead of using keyboard controls, I changed it so the system would adjust the brightness automatically based on how the person was playing. Every click on a ball gets counted and saved as a trial in MySQL, by connecting the database to my code through Flask — I created the tables in my database so that as soon as the connection is established, the data gets saved.
On the dashboard, I have a table which shows patient data, and charts for accuracy and trials, built using Chart.js.
-Prototyping: Python, OpenCV and Pygame to work out the core anaglyph and adaptive constrast logic first.
-Web app: Html5 Canvas and JavaScript it runs in any browser no installation needed
-Backed: Flask REST API handling patient records , sessions and pre-trial logging
-Database: MySQL with three table session (Patients, sessions, Trial logs) for patient History
-Dashboard: Chart.jswhich shows accuracy trends across sessions and live contrast gain adjustemts within a session pulling directly from database.
Challenges we ran into
While setting up my stack, I ran into some errors. I installed Python 3.14 without knowing it doesn't support Pygame, and it took a lot of time trying to fix it without knowing where the error was coming from. I later discovered I had to use Python 3.12 instead. Another challenge was that I accidentally deleted one folder, and the code stopped running without me knowing where the error was but I later found it and fixed it.
Accomplishments that we're proud of
I am really happy and proud of this project because it's my first project that combines everything I have learned in college, like Python and MySQL database — it's really a milestone for me to see it all come together into something like this. Another thing I'm proud of is turning my childhood story into something big like this, and I would like to show my friend.
What we learned
The first thing I learned is time management — how to manage 48 hours and turn an idea into something real. The second thing I learned is debugging tips and patience with errors. I also learned how wide Python is and how it can be used to develop something great like this. Another thing I learned is how to push different files to GitHub and edit them — I didn't know how to do that before. --How to design adaptive difficulty system that responds to real user performance data
What's next for FocusEye — Dichoptic Vision Therapy
My next steps for FocusEye are hosting it so I can share the live link, building a mobile version, and using it to test with real patients to see their progress. -More stimulus variey (shapes, letters) to avoid pattern memorization
AI tools used
I used Claude Sonnet 5 (Anthropic) throughout this project on the FREE tier, mainly for code generation, debugging help, and guidance on structuring the Flask/MySQL backend.
Best Use of AI — Detailed Report
Model used: Claude Sonnet 5 (Anthropic), accessed via claude.ai Tier: FREE
I used Claude throughout the full development process, not just for one part of the project:
- Planning: Broke the project into 48 hours build plan, going from a Python/Pygame prototype through to a full web app with Flask, MySQL, and a dashboard
- Code generation:Wrote the anaglyph rendering logic, the adaptive contrast algorithm, Flask API routes, and the Chart.js dashboard code
- Debugging: Helped me diagnose and fix a broken Python virtual environment caused by uninstalling Anaconda, and guided me through switching to Python 3.12 for Pygame compatibility
- Design iteration: Helped me redesign the UI from a dark theme to a calmer light purple/blue theme, and adjust game difficulty (ball speed) based on my feedback
- Bug fixing: Identified and helped fix a flaw in my early game logic where the correct target was visually guessable even without red-blue glasses, due to a color-mixing issue between channels
Example prompts I used:
- "Help me build a project which deals with vision therapy for amblyopia using dichoptic therapy with red-blue filter..."
- "Can we start building the project from scratch in 48 hours"
- "This is so dark I want it somehow light, just make something which looks nice"
- "Hey it is showing me python 3.14.2" (during debugging)
Log in or sign up for Devpost to join the conversation.