Gaze Origin Conversion
Some methods estimate the gaze direction originating from eye center, and some methods estimate the gaze direction originating from face center.
To convert the two kinds of gaze direction, we need to first compute the corrdinate of PoR t in CCS.
Then, we acquire the gaze origin o and further compute the new gaze direction.

If you use the codes in this page, please cite our survey:
@article{Cheng2021Survey,
title={Appearance-based Gaze Estimation With Deep Learning: A Review and Benchmark},
author={Yihua Cheng and Haofei Wang and Yiwei Bao and Feng Lu},
journal={arXiv preprint arXiv:2104.12668},
year={2021}
}
Tutorial
Please download the core code here.
We also provide an example.
gaze = ToNewOrigin(gaze, origin, neworigin, rmat, tvec)
We also provide specific conversion codes in each dataset.
To use the specific codes, you first should download the core code and rename the code as "conversion.py".
The document about the specific codes is coming soon.
Document
ToNewOrigin(gaze, origin, neworigin, rmat, tvec)
Paramters:
gaze (narray) : the gaze direction. The shape is (3, ).
origin (narray) : The origin of gaze direction in CCS. The shape is (3, ).
origin (narray) : The new origin of gaze direction in CCS. The shape is (3, ).
rmat (narray) : The rotation matrix. It is used to convert points in SCS to CCS. The shape is (3, 3).
rmat (narray) : The translation vector. It is used to convert points in SCS to CCS. The shape is (3, 1).
Return gaze
gaze (narray) : Gaze direction. The gaze direction originates from the neworigin. The shape is (3,)