This project uses hand tracking to control the system volume based on the distance between the thumb and index finger. It utilizes OpenCV for video capture, MediaPipe for hand tracking, and osascript for controlling system volume on macOS.
Check out the live demo video on YouTube: Hand Tracking Volume Control Demo
- Python
- OpenCV
- MediaPipe
- FastAPI
- Uvicorn
- osascript (for macOS volume control)
- Clone the repository:
git clone https://github.com/your-repo/hand-tracking-volume-control.git
- Navigate to the project directory:
cd hand-tracking-volume-control
- Install dependencies:
pip install -r requirements.txt
- Run the FastAPI server:
uvicorn volume_control_server:app --reload
- Open the browser and go to
http://localhost:8000
. - Allow access to your webcam when prompted.
- Start controlling the system volume by moving your thumb and index finger closer or further apart!