hysts/pytorch_mpiigaze_demo

Gaze estimation using MPIIGaze and MPIIFaceGaze

What it solves

This project provides a demo program for gaze estimation, allowing users to determine where a person is looking based on images or video feeds (including live webcam input). It simplifies the process of using pretrained gaze estimation models like MPIIGaze, MPIIFaceGaze, and ETH-XGaze.

How it works

The program uses deep learning models to analyze visual data. It first detects faces and landmarks using a chosen detector (such as MediaPipe or dlib), then applies a specific gaze estimation model to predict the gaze vector. The system handles complex data normalization to ensure the input images and head poses are correctly formatted for the models, following established research conventions.

Who it’s for

This tool is designed for developers and researchers interested in human-computer interaction, computer vision, and gaze tracking applications.

Highlights

  • Multiple Model Support: Supports MPIIGaze, MPIIFaceGaze, and ETH-XGaze models.
  • Flexible Input: Works with static images, video files, or live webcam streams.
  • Customizable Detection: Offers multiple face detection options including MediaPipe, dlib, and face_alignment_sfd.
  • Pretrained Weights: Automatically downloads weights from the Hugging Face Hub in safetensors format.
  • Visualization Tools: Includes interactive keys to toggle the display of landmarks, head pose, and bounding boxes during processing.