Abstract / Summary
Template-based gaze-to-face registration enables standardized analysis of eye movements by mapping gaze coordinates onto a canonical facial template, reducing variability introduced by manual area-of-interest (AOI) definition across heterogeneous stimuli. However, existing implementations are largely restricted to static images, rely on semi-manual landmark annotation, and depend on proprietary software, limiting scalability and reproducibility. These constraints become increasingly problematic as research shifts toward dynamic stimuli, wearable eye-tracking, and open-source workflows. We present iTemplate2, a fully open-source Python-based redesign of the original system. The framework introduces four key advances: (1) support for dynamic stimuli via frame-wise coordinate transformation, including a normalization module for wearable and scene-based eye-tracking data; (2) integration of MediaPipe’s Face Landmarker for automated detection of 478 facial landmarks per frame, with multi-face tracking and identity persistence mechanisms that reduce manual annotation requirements; (3) a complete Python reimplementation using NumPy, pandas, OpenCV, PyQt6, and Apache Parquet, providing a cross-platform graphical interface without commercial dependencies; and (4) expanded visualization and analysis tools, including interactive heatmaps, snap-to-landmark AOI definition, and extraction of facial blendshape parameters for concurrent expression analysis. The system is applicable across diverse domains, including infant face scanning, cross-cultural gaze research, clinical screening, and naturalistic social interaction paradigms using wearable eye-tracking. It robustly processes complex multi-face video datasets that are difficult to analyze using conventional template-based methods. iTemplate2 modernizes the template-based registration framework for contemporary behavioral research, converting idiosyncratic visual data into a unified, reproducible analytical space. The software is freely available as an open-source tool at https://osf.io/54v9e/overview?view_only=5ac289558a3d4897a02336124ae409a1.