Installation¶
This guide walks you through setting up MindSight on your local machine.
Prerequisites¶
- Python 3.10 or newer
- PyTorch (CPU is sufficient; GPU accelerates inference)
- Optional: CUDA toolkit (NVIDIA GPUs) or CoreML support (Apple Silicon)
Apple Silicon users
MindSight supports CoreML acceleration via onnxruntime-silicon. No CUDA installation is needed on macOS with Apple Silicon.
Clone the Repository¶
Create a Virtual Environment¶
Install Dependencies¶
Install all dependencies at once:
PyTorch GPU support
The requirements.txt installs CPU-only PyTorch by default. For GPU acceleration, install PyTorch first using the appropriate command from pytorch.org/get-started, then run pip install -r requirements.txt.
ONNX Runtime variants
For NVIDIA GPU inference, replace onnxruntime with onnxruntime-gpu. For Apple Silicon CoreML, use onnxruntime-silicon.
Alternatively, use the helper script for platform-aware installation:
python install_dependencies.py # auto-detects CUDA / Apple Silicon
python install_dependencies.py --dry-run # preview without installing
Download Gaze Model Weights¶
MindSight supports multiple gaze-estimation backends. Each requires its own model weights.
MGaze (default)¶
Download ONNX or PyTorch weights and place them in:
You can download weights using the included script:
Gazelle¶
Download the Gazelle model weights separately and pass the path at launch:
L2CS¶
Download the L2CS weights and pass the path at launch:
UniGaze¶
Non-commercial license
UniGaze is released under a non-commercial license. Review its terms before use.
UniGaze dependencies (timm) are included in requirements.txt. Download the UniGaze model weights and pass the path at launch:
YOLO Weights¶
YOLO and YOLOE weights are auto-downloaded by the Ultralytics library on first use. No manual download is required. The weights are cached locally after the initial download.
Verify Installation¶
Run the following command to confirm MindSight is installed correctly:
You should see a list of available command-line arguments and their descriptions.
Troubleshooting¶
CUDA not found¶
- Verify your NVIDIA driver is installed:
nvidia-smi - Ensure you installed the CUDA-compatible PyTorch build. See pytorch.org/get-started for the correct install command.
- Confirm
onnxruntime-gpuis installed instead of the CPU-onlyonnxruntime.
Missing model weights¶
- Check that the
GazeTracking/Backends/MGaze/gaze-estimation/weights/directory exists and contains the expected weight files. - Download weights using
bash GazeTracking/Backends/MGaze/gaze-estimation/download.sh.
Import errors¶
- Make sure your virtual environment is activated.
- Re-run
pip install opencv-python(or the missing package). - On headless servers, use
opencv-python-headlessinstead ofopencv-python.
PyQt6 issues on Linux¶
- Install system-level Qt dependencies:
Still stuck?
Open an issue on the repository with the full error traceback and your pip list output.