This guide explains how to set up and run the Touchless Computer Control project.
Before installing the project, make sure you have:
- Python 3.11 or newer
- A working webcam
- Git
- pip
Python 3.11 is recommended for compatibility with the project dependencies.
Clone the repository:
git clone https://github.com/partialHuman/Touchless-Computer-Control-Using-Hand-Gestures-Python-OpenCV-.gitMove into the project directory:
cd Touchless-Computer-Control-Using-Hand-Gestures-Python-OpenCV-Create a virtual environment:
Windows
py -3.11 -m venv .venvActivate it:
.venv\Scripts\Activate.ps1Linux / macOS
python3.11 -m venv .venv
source .venv/bin/activateAfter activation, the terminal should show something similar to:
(.venv)
Install all required Python packages:
pip install -r requirements.txtCheck the Python version:
python --versionYou can also verify MediaPipe:
python -c "import mediapipe as mp; print(mp.__version__)"The project requires the MediaPipe hand landmark model:
models/
└── hand_landmarker.task
Make sure this file exists before running the application.
The model path is configured through:
src/config.py
Start the application from the project root:
python main.pyYou should see a menu similar to:
1. Virtual Mouse
2. Gesture Keyboard
Select the desired mode and press Enter.
If you encounter MediaPipe-related errors, verify that you are using the project's virtual environment:
.venv\Scripts\Activate.ps1Then check:
python --version
pip show mediapipePython 3.11 is recommended for the most reliable compatibility.
Make sure:
- Your webcam is connected.
- No other application is currently using the camera.
- Camera permissions are enabled.
- The correct camera device is available.
If PowerShell blocks the activation script, you can allow local scripts for the current user:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUserThen restart PowerShell and activate the environment again:
.venv\Scripts\Activate.ps1