The Be Focused App is a real-time attention monitoring tool that uses Artificial Intelligence to detect the user's gaze and emit sound alerts when they become distracted. Ideal for students and professionals who want to stay focused during their activities on the computer.
- Gaze Tracking: Uses MediaPipe Face Landmarker to accurately detect where you are looking.
- Distraction Alerts: If you look away for a set time (e.g., 5 seconds), the app emits a sound alert.
- Interactive HUD: An intuitive interface that shows your current state (FOCUSED, ATTENTION..., DISTRACTED!).
- Real-Time Settings Menu:
- Adjust Volume of alerts.
- Adjust Sensitivity of detection.
- Adjust Delay for sound activation.
- Choose between 5 different alert sounds.
- Python 3.12+
- OpenCV for image processing and UI.
- MediaPipe for facial landmark detection.
- Pygame for robust audio management.
- NumPy for mathematical calculations.
- uv for dependency management.
- You can download the executable in the Releases section.
- When launched, the application will open your webcam.
- Keep your face visible and look at the screen. The system will mark your eyes and iris.
- Settings:
- Click the gear icon/top right corner of the window to open the side menu.
- Drag the sliders to adjust Volume, Sensitivity, and Delay.
- Click the sound buttons to test and select your preferred alert.
- Press
ESCor close the window to exit.
be-focused-app/
├── core/ # Main system logic
│ ├── audio_manager.py # Sound management
│ ├── gaze_detector.py # MediaPipe integration
│ ├── gaze_tracking.py # Main loop and business logic
│ ├── ui_components.py # HUD and sliders rendering
│ └── utils.py # Utility functions (file paths)
├── models/ # ML models (face_landmarker.task)
├── sounds/ # Audio files (.wav)
├── main.py # Entry point
├── pyproject.toml # Project configuration and dependencies
└── README.md # You are here!
This project is licensed under the GNU General Public License v3.0. See the LICENSE file for more details.
Made by Luís Felipe Passamani Santos, a student passionate about programming.