Analysis of gaze behavior during emotion perception using eye-tracking technology and fixation detection algorithms.
This study examines individual differences in gaze patterns across five observers viewing 15 standardized facial emotion images (3 identities × 5 emotions: Anger, Fear, Happy, Neutral, Sad). We apply the I-DT fixation detection algorithm to quantify eye movement metrics and spatial attention distribution.
- Observers: 5 (anonymized as Observer_01 to Observer_05)
- Stimuli: 15 facial emotion images
- Recording Duration: 12 seconds per stimulus
- Display Resolution: 1920 × 1080 pixels
- Fixation Algorithm: I-DT with 60px dispersion & 100ms duration thresholds
git clone https://github.com/kidat/emotion-eyetracking-study.git
cd emotion-eyetracking-study
python -m venv venv
venv\Scripts\activate
pip install -r requirements.txtRun the eye-tracking experiment and record gaze data:
python emotion_eyetracking_study.pyThis executes the experimental protocol:
- Stimulus presentation
- Eye-tracker calibration
- Real-time gaze recording
- Automatic CSV output to
Output/directory
Run the comprehensive gaze analysis pipeline:
jupyter notebook dataAnalysis.ipynbThe notebook performs:
- Eye-tracking data loading and preprocessing
- I-DT fixation detection
- Fixation metrics computation
- Spatial attention heatmap generation
- Scanpath visualization
- Emotion-based statistical analysis
- Cross-observer comparative analysis
- Fixation metrics (duration, count, saccade velocity)
- Spatial attention heatmaps
- Scanpath visualizations
- Emotion-based statistical summaries
- Cross-observer comparative analysis
├── emotion_eyetracking_study.py # Data collection
├── dataAnalysis.ipynb # Analysis & visualization
├── Data/ # Raw stimuli & eye-tracking data
├── Output/ # Results & processed data
└── README.md
Python 3.7+, pandas, numpy, matplotlib, seaborn, scipy, opencv-python, jupyter
- Eye Tracking: Hengam System
- Data Processing: Python, Pandas, NumPy
- Visualization: Matplotlib, Seaborn
- Analysis: SciPy, I-DT Algorithm
All observer data are anonymized and collected with informed consent according to research ethics guidelines.
Kidu A. Welegerima
MIT License - See LICENSE file for details
Last Updated: December 2025