A smart computer vision tool that minimizes your active window when you tilt your head down.
Head-Tracking Window Minimizer uses your webcam to detect head pitch angle using MediaPipe’s FaceMesh.
When you look down for a certain amount of time (default: 0.3 seconds), the tool automatically minimizes your active window.
Perfect for:
- Students secretly watching series in class 😂
- Quick minimizing during work
- Privacy-conscious users
- Productivity setups
- Uses MediaPipe FaceMesh for accurate head pose
- Calculates pitch angle in real time
- Smooth motion using moving average
- Auto minimize currently active window
- Works on Windows, macOS, Linux
You can choose to:
- 🟢 Minimize ALL windows
- 🟡 Whitelist only specific apps
- 🔴 Blacklist apps you never want minimized
- Live pitch angle
- Status display
- FPS counter
- Circular angle gauge
- Total minimize count
| Key | Action |
|---|---|
| Q | Quit program |
| P | Pause / Resume tracking |
| C | Calibrate neutral head position |
| + / - | Increase or decrease sensitivity |
This project is tested and works only on Python 3.11.
Make sure you install exactly:
- Python 3.11.x (recommended: 3.11)
- Webcam
- OS Support:
- Windows ✔
- macOS ✔
- Linux ✔
Need a webcam to monitor
All dependencies compatible with Python 3.11:
git clone https://github.com/yourusername/headtrack-minimizer
cd headtrack-minimizer
pip install opencv-python mediapipe numpy pygetwindow pyautogui
python -c "import cv2; import mediapipe; import pygetwindow; print('All packages installed successfully!')"
headtrack_env\Scripts\activate
python -u headtrack.pyMIT License
Copyright (c) 2025 QuoRith
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.