Practical overview
When it fits
Use it when you need a Python/PyTorch gaze-estimation pipeline for camera frames or the repository's specific MPIIGaze and Gaze360 training and evaluation workflows.
Who it is for
- Developers adding gaze-direction estimation to webcam-based applications.
- Researchers or practitioners training and evaluating gaze models with MPIIGaze or Gaze360.
Documented uses
- Estimate gaze from face images or webcam frames.
- Render gaze results on processed camera frames.
- Train and test on MPIIGaze using leave-one-person-out evaluation.
- Train and test on Gaze360 using a train-validation-test workflow.
Requirements & limits
The repository is public and lists an MIT license. Its installation instructions use Python and PyTorch.
- Webcam inference requires pretrained weights; the README directs users to download a checkpoint and place it in models/.
- The inference example uses OpenCV to capture a frame and supports a CPU device option; the demo command specifies a GPU index.
- Training and evaluation require prepared datasets, with separate workflows for MPIIGaze and Gaze360.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Set up L2Cs Net and run the documented webcam demo
Install the package, place the pretrained Gaze360 weights in the expected folder, and launch the repository's webcam demo.
Before you start
- Python and PyTorch, as identified by the repository.
- The L2Cs Net repository, a webcam, and the pretrained model file L2CSNet_gaze360.pkl.
- A GPU argument is used in the demo command; the usage example also shows a CPU device option.
Steps
Install from the repository using its documented pip command, or clone the repository and install the local package.
Download a pretrained model and store it in the models/ directory.
Run demo.py with the snapshot path models/L2CSNet_gaze360.pkl, GPU index 0, and camera index 0.
Expected outcome
The repository's webcam demo is configured to use the Gaze360 pretrained model.
Guide limitations
- The guide documents setup and the demo command, not a verified execution or compatibility result.
Prepare an MPIIGaze training and evaluation workflow
Prepare the named dataset and follow the repository's documented leave-one-person-out training and testing stages.
Before you start
- The MPIIFaceGaze dataset and the preprocessing referenced by the repository.
- Prepared data stored at datasets/MPIIFaceGaze.
- Python environment with the project installed.
Steps
Download MPIIFaceGaze and apply the referenced dataset preprocessing.
Store the prepared dataset at datasets/MPIIFaceGaze.
Run train.py with dataset mpiigaze and a snapshot output path.
Run test.py with the resulting snapshot folder and an evaluation output path.
Run leave_one_out_eval.py with the evaluation and results paths to obtain average leave-one-out gaze accuracy.
Expected outcome
The documented workflow stores trained snapshots and test results, then calculates average leave-one-out gaze accuracy.
Guide limitations
- The repository points to external dataset and preprocessing resources; this guide does not validate those resources or report a successful run.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 11 November 2026
- Original website title
- Ahmednull/L2CS-Net · Official homepage title · retained in its source language

