This project implements a comprehensive gaze tracking experiment system using WebGazer.js. It includes a TrialManager for executing visual experiments, collecting gaze data, and managing participant interactions.
- Overview
- Features
- Installation
- Component Details
- Usage Guide
- File Structure
- ANalysis Script
- How to Contribute
- License
The Gaze Analysis Experiment Manager enables researchers to:
- Track participant gaze data using WebGazer.js
- Run configurable visual trials with randomized image objects
- Apply dynamic exclusions based on participant input
- Collect and store experimental data locally
- Support multiple test types (Shapes, Colors, Abstract, Pictures)
-
Dynamic Test Configuration:
- Participant initials collection
- Test type selection (Shapes/Colors/Abstract/Pictures)
- Configurable trial count (10-50 trials)
-
Calibration System:
- Interactive calibration points
- Visual feedback during calibration
- Webcam-based gaze tracking setup
-
Trial Management:
- Two trial types:
- Type 1: Single repeated object trials
- Type 2: Varied object trials
- Randomized object presentation
- Configurable display durations
- Black screen transitions
- Two trial types:
-
Data Collection:
- Real-time gaze tracking
- Trial metadata recording
- Automatic data export to JSON
- Local storage using localforage
- WebGazer.js integration for eye tracking
- Secure HTTPS server support
- Browser compatibility (Chrome/Firefox/Edge)
- Modular JavaScript architecture
- Install Node.js and npm
- Install required global packages:
npm install -g http-server
- Clone the repository:
git clone https://github.com/mrhunsaker/GazeTracking.git
cd GazeTracking
- Set up SSL certificates:
- Place
cert.pem
andkey.pem
in the StudentFolders directory
- Install dependencies:
npm install
- Start the experiment server:
bash runexperiment.sh
The main experiment interface that:
- Loads required scripts (WebGazer, localforage)
- Provides experiment instructions
- Handles video feed display
- Manages experiment container styling
Core experiment logic including:
- Trial execution and sequencing
- Gaze data collection
- Calibration procedures
- Image loading and display
- Data storage and export
Experiment launcher script featuring:
- Secure HTTPS server setup
- Student folder management
- Browser autolaunch
- Dependency validation
- Colorblind-friendly terminal output
- Launch the experiment:
bash runexperiment.sh
-
Select student folder when prompted
-
Wait for browser launch with experiment interface
-
Follow on-screen instructions for:
- Entering participant details
- Completing calibration
- Running trials
-
Data will automatically download after completion
GazeTracking/
├── StudentFolders/
│ ├── cert.pem
│ ├── key.pem
│ └── [Student_Folder]/
│ ├── Abstract/
│ ├── Colors/
│ ├── Pictures/
│ ├── Shapes/
│ ├── index.html
│ ├── trialManager.js
│ ├── objectExclusions.js
│ └── webgazer.js
├── scripts/
│ ├── runexperiment.bat
│ └── runexperiment.ps1
└── runexperiment.sh
This project contains tools and scripts designed for generating detailed visualizations and statistical summaries of the GazeTracking data collected by this app.
- Description: A Python script that processes data (e.g., JSON inputs), performs statistical analysis, and generates Markdown reports with visualizations.
- Features:
- Generates scatter plots and violin plots to visualize data trends.
- Performs statistical tests including Wilcoxon, T-tests, and ANOVA.
- Creates descriptive statistical summaries.
- Outputs a Markdown report summarizing results with inline images of the generated plots.
- Usage:
- Prepare a JSON file with the required format (e.g., trial data).
- Run the script with:
python AnalysisPlotting.py <path_to_json>
- Check the
./experimentalData/<filename>
directory for the generated report and plots.
We welcome contributions to improve the Gaze Analysis Experiment Manager! Here's how you can help:
-
Fork & Clone
- Fork the repository
- Create a feature branch
- Make your changes
-
Code Standards
- Follow existing code style
- Document new functions
- Add comments for complex logic
- Test your changes thoroughly
-
Submit Changes
- Push to your fork
- Submit a Pull Request (PR)
- Describe your changes in detail
- Reference any related issues
-
Core Features
- New trial types
- Additional analysis tools
- Enhanced calibration methods
-
Documentation
- Usage examples
- API documentation
- Tutorial content
-
Testing
- Unit tests
- Integration tests
- Browser compatibility testing
- Check existing issues
- Discuss major changes first
- Follow the coding style guide
- Include tests with new features
- Update documentation
For questions or help, open an issue or contact the maintainers.
Copyright 2024-11-30 Michael Ryan Hunsaker, M.Ed., Ph.D.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.