Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

README.md

Generalizing Gaze Estimation with Weak-Supervision from Synthetic Views

The implementation of Arxiv paper for gaze estimation task.

Preparation

Run the commands below from this repository's reconstruction/gaze/ directory; all input and output paths are relative to it.

  1. Download the dataset and put it under data/

  2. Download eyes3d.pkl and put it under assets/

  3. Download pretrained checkpoint and put it under assets/

  4. Install libraries:

    pip install timm pytorch-lightning==1.8.1 albumentations==1.3.0
    

Testing with pre-trained model

After downloading the pre-trained checkpoint above,

python test_gaze.py assets/latest_a.ckpt

test_gaze.py reads images from assets/images/ and writes side-by-side input and gaze visualizations to outputs/, using the original filenames. Create assets/images/ and add your input images before running it.

Training

python trainer_gaze.py

trainer_gaze.py reads train.rec, train.idx, val.rec, and val.idx from data/gaze_refine/ by default (override with --root). It saves checkpoints to work_dirs/gaze/ and TensorBoard logs under work_dirs/gaze/logs/.

Results