Skip to content

Privacy-focused desktop tool that hides your screen content when you're not looking. Simple head tracking detects when you look down and automatically minimizes specified windows. Built with OpenCV + MediaPipe for fast, accurate head pose estimation.

Notifications You must be signed in to change notification settings

sudeshkumars/Head--Tracking-Window-Minimizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

🧠 Head-Tracking Window Minimizer

A smart computer vision tool that minimizes your active window when you tilt your head down.



Python OpenCV MediaPipe Platform

🚀 Overview

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
Discord bots (1)

Demo

https://youtu.be/6Go971NKeHk

✨ Features

🎯 Smart Head Tracking

  • Uses MediaPipe FaceMesh for accurate head pose
  • Calculates pitch angle in real time
  • Smooth motion using moving average

🖥️ Window Control

  • Auto minimize currently active window
  • Works on Windows, macOS, Linux

⚙️ Filter Modes

You can choose to:

  • 🟢 Minimize ALL windows
  • 🟡 Whitelist only specific apps
  • 🔴 Blacklist apps you never want minimized

🎛️ Real-time UI Overlay

  • Live pitch angle
  • Status display
  • FPS counter
  • Circular angle gauge
  • Total minimize count

⌨️ Keyboard Controls

Key Action
Q Quit program
P Pause / Resume tracking
C Calibrate neutral head position
+ / - Increase or decrease sensitivity

📦 Requirements

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

Required Python Packages

All dependencies compatible with Python 3.11:

🛠️ Installation

1️⃣ Clone the repository

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.py

LICENSE

MIT 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.

About

Privacy-focused desktop tool that hides your screen content when you're not looking. Simple head tracking detects when you look down and automatically minimizes specified windows. Built with OpenCV + MediaPipe for fast, accurate head pose estimation.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages