This Python Toolbox was developed for Peter König's Neurobiopsychology Lab at the Institute of Cognitive Science, Osnabrück. Its aim is to provide easy access to different automated gaze classification algorithms and to generate a unified, simplistic, and elegant way of handling eye tracking data.
Currently available gaze classification algorithms are:
Of course we will aim to include more gaze classification algorithms in the future. Suggestions and links to implementations are always welcome.
Currently, the way to install the package is:
pip install git+https://github.com/DiGyt/cateyes.git
However, proper PyPI support might follow.
CatEyes is intended to work on a simple and intuitive level. This includes reducing all the overhead from external classification algorithms and relying on fundamental Python objects that can be used with whatever data format and workflow you are working.
classification = cateyes.classify_nslr_hmm(gaze_x, gaze_y, times)
CatEyes also provides simple but flexible plotting functions which can be used to visualize classified gaze data and can be further customized with matplotlib.pyplot.
fig, axes = plt.subplots(2, figsize=(15, 6), sharex=True)
cateyes.plot_segmentation(gaze_x, times, classification, events, ax=axes[0],
show_event_text=False, show_legend=False)
cateyes.plot_segmentation(gaze_y, times, classification, events, ax=axes[1])
axes[0].set_ylabel("Theta (in degree)")
axes[1].set_ylabel("Phi (in degree)")
axes[1].set_xlabel("Time in seconds");
To get started, we recommend going through our example notebooks. You can simply run them via your internet browser (on Google Colab's hosted runtime) by clicking on the "open in Colab" button.
This minimal example applies the NSLR-HMM algorithm to a simple 2D gaze array and plots the results using the CatEyes plotting functions.
This notebook gives a more extensive example on CatEyes, including data organisation and manipulation with pandas (including e.g. resampling, interpolating, median-boxcar-filtering). The NSLR-HMM and REMoDNaV classification algorithms are applied and visualized using different internal and external plotting functions.
CatEyes' documentation is created using pdoc3 and GitHub Pages. Click on the link below to view the documentation.