This project enables hands-free control of your computer using head movements. It includes two primary features: cursor movement and head-tilt-based scrolling and video playback. A graphical user interface (GUI) makes it easy to start, stop, and switch between features.
-
Cursor Movement
- Controls the mouse cursor using head movements detected via a webcam.
-
Scroll & Video Playback
- Scrolls pages or controls video playback based on head tilt angles.
-
GUI Interface
- Simple GUI to select and run features.
- Python 3.7 or above
- Webcam (integrated or external)
Install the required libraries using pip:
pip install -r requirements.txtDependencies:
- OpenCV
- dlib
- numpy
- pyautogui
- pygetwindow
- tkinter (comes pre-installed with Python)
-
Download Required Files
- Ensure
shape_predictor_68_face_landmarks.datis in the project directory. Download it from dlib's model repository.
Extract the
.bz2file if necessary. - Ensure
-
Folder Structure
The project folder should contain:
- shape_predictor_68_face_landmarks.dat - eye_track.py - scrollvid.py - GUIapp.py - requirements.txt
Run the GUIapp.py file:
python GUIapp.py- Cursor Movement: Starts head-based cursor control.
- Scroll & Video Playback: Activates head-tilt scrolling or video control.
- Stop Feature: Stops the currently running feature.
- Exit: Closes the application.
You can stop any running feature and then exit the GUI.
-
"shape_predictor_68_face_landmarks.dat" Not Found
- Ensure the file is in the same directory as the scripts.
-
Webcam Not Detected
- Check if another application is using the webcam.
- Verify the webcam is connected and functional.
-
Dependencies Not Installed
- Re-run
pip install -r requirements.txt.
- Re-run
-
Permission Denied
- Run the script with administrator privileges if required.
- This project is for demonstration purposes and may not be fully optimized for all environments.
- Ensure proper lighting for the webcam to detect head movements accurately.