focus_analyzer.py
main file for running your focus analysis.common/video_handler.py
class for capturing the contents of a video file and saving the changes made to it.common/transformer.py
class for editing each frame within our video.common/io_functions.py
helper functions for reading/writing our data and video files.configs/config.json
a configuration file for your file paths and preferred visual settingsYou’ll need the following:
You will first have to watch a video and record your eye tracking and EEG data, reformatting to match my provided examples in the resources folder. Identify the max X and Y coordinates of your screen, as this will be referenced in the config file.
The commands below are for Windows and my Python alias is "python" but yours may be "python3", "py -3", etc.
Make sure you have the virtualenv package in your global Python environment.
python -m pip install virtualenv
Move this project to its own folder and setup a virtual environment inside of it.
python -m venv env
Activate your virtual environment.
env/Scripts/activate
Install the project's dependencies into your virtual environment.
pip install -r requirements.txt
Modify the configs/config.json
file to adjust your settings and point to your relevant video and data files.
Run your program!
python focus_analyzer.py