Gaze estimation using MPIIGaze and MPIIFaceGaze
Project description
A demo program of gaze estimation models (MPIIGaze, MPIIFaceGaze, ETH-XGaze)
With this program, you can run gaze estimation on images and videos. By default, the video from a webcam will be used.
To train a model for MPIIGaze and MPIIFaceGaze, use this repository.
Quick start
Installation
pip install ptgaze
Run demo
ptgaze --mode eth-xgaze
Usage
usage: ptgaze [-h] [--config CONFIG] [--mode {mpiigaze,mpiifacegaze,eth-xgaze}]
[--face-detector {dlib,face_alignment_dlib,face_alignment_sfd,mediapipe}]
[--device {cpu,cuda}] [--image IMAGE] [--video VIDEO] [--camera CAMERA]
[--output-dir OUTPUT_DIR] [--ext {avi,mp4}] [--no-screen] [--debug]
optional arguments:
-h, --help show this help message and exit
--config CONFIG Config file. When using a config file, all the other commandline arguments
are ignored. See
https://github.com/hysts/pytorch_mpiigaze_demo/ptgaze/data/configs/eth-
xgaze.yaml
--mode {mpiigaze,mpiifacegaze,eth-xgaze}
With 'mpiigaze', MPIIGaze model will be used. With 'mpiifacegaze',
MPIIFaceGaze model will be used. With 'eth-xgaze', ETH-XGaze model will be
used.
--face-detector {dlib,face_alignment_dlib,face_alignment_sfd,mediapipe}
The method used to detect faces and find face landmarks (default:
'mediapipe')
--device {cpu,cuda} Device used for model inference.
--image IMAGE Path to an input image file.
--video VIDEO Path to an input video file.
--camera CAMERA Camera calibration file. See https://github.com/hysts/pytorch_mpiigaze_demo/
ptgaze/data/calib/sample_params.yaml
--output-dir OUTPUT_DIR, -o OUTPUT_DIR
If specified, the overlaid video will be saved to this directory.
--ext {avi,mp4}, -e {avi,mp4}
Output video file extension.
--no-screen If specified, the video is not displayed on screen, and saved to the output
directory.
--debug
While processing an image or video, press the following keys on the window to show or hide intermediate results:
l
: landmarksh
: head poset
: projected points of 3D face modelb
: face bounding box
References
- Zhang, Xucong, Seonwook Park, Thabo Beeler, Derek Bradley, Siyu Tang, and Otmar Hilliges. "ETH-XGaze: A Large Scale Dataset for Gaze Estimation under Extreme Head Pose and Gaze Variation." In European Conference on Computer Vision (ECCV), 2020. arXiv:2007.15837, Project Page, GitHub
- Zhang, Xucong, Yusuke Sugano, Mario Fritz, and Andreas Bulling. "Appearance-based Gaze Estimation in the Wild." Proc. of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2015. arXiv:1504.02863, Project Page
- Zhang, Xucong, Yusuke Sugano, Mario Fritz, and Andreas Bulling. "It's Written All Over Your Face: Full-Face Appearance-Based Gaze Estimation." Proc. of the IEEE Conference on Computer Vision and Pattern Recognition Workshops(CVPRW), 2017. arXiv:1611.08860, Project Page
- Zhang, Xucong, Yusuke Sugano, Mario Fritz, and Andreas Bulling. "MPIIGaze: Real-World Dataset and Deep Appearance-Based Gaze Estimation." IEEE transactions on pattern analysis and machine intelligence 41 (2017). arXiv:1711.09017
- Zhang, Xucong, Yusuke Sugano, and Andreas Bulling. "Evaluation of Appearance-Based Methods and Implications for Gaze-Based Applications." Proc. ACM SIGCHI Conference on Human Factors in Computing Systems (CHI), 2019. arXiv, code
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ptgaze-0.2.3.tar.gz
(25.9 kB
view details)
Built Distribution
ptgaze-0.2.3-py3-none-any.whl
(32.8 kB
view details)
File details
Details for the file ptgaze-0.2.3.tar.gz
.
File metadata
- Download URL: ptgaze-0.2.3.tar.gz
- Upload date:
- Size: 25.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 10b262e02051eb118ec2cc822a1d700a617ee0d688d62bbc4d71abadf54dcc5c |
|
MD5 | 44001798fe3258d97d65b26c76681e35 |
|
BLAKE2b-256 | 6626aaf9709cd14de0fe3ae54750cdbf646ae6a4956917162a4eeb25a0058c45 |
File details
Details for the file ptgaze-0.2.3-py3-none-any.whl
.
File metadata
- Download URL: ptgaze-0.2.3-py3-none-any.whl
- Upload date:
- Size: 32.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e7aeb46409df77e2f677d68d9d6fad5a37971b13ebc36c5f34dc8a2ba4eb7602 |
|
MD5 | a0ec1b5d5f6d4bb57d8f308b5aa273fa |
|
BLAKE2b-256 | a6388ed1ad5fd398904b1db71135afd753c00714eabfc2d8d7beb5ea7819fec3 |