Skip to main content

Uniform Categorization of Eyetracking in Python.

Project description

CatEyes logo

Simplified Categorization for Eye Tracking in Python

Introduction

This repository 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:

  • REMoDNaV: Dar *, A. H., Wagner *, A. S. & Hanke, M. (2019). REMoDNaV: Robust Eye Movement Detection for Natural Viewing. bioRxiv. DOI: 10.1101/619254
  • NSLR-HMM: Pekkanen, J., & Lappi, O. (2017). A new and general approach to signal denoising and eye movement classification based on segmented linear regression. Scientific reports, 7(1), 1-13.
  • I-DT dispersion-based algorithm: Salvucci, D. D., & Goldberg, J. H. (2000). Identifying fixations and saccades in eye-tracking protocols. In Proceedings of the 2000 symposium on Eye tracking research & applications.
  • I-VT velocity-based algorithm: Salvucci, D. D., & Goldberg, J. H. (2000). Identifying fixations and saccades in eye-tracking protocols. In Proceedings of the 2000 symposium on Eye tracking research & applications.

Of course we will aim to include more gaze classification algorithms in the future. Suggestions and links to implementations are always welcome.

Installation

Currently, the way to install the package is:

pip install git+https://github.com/DiGyt/cateyes.git

However, proper PyPI support might follow.

Examples

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");
CatEyes segmentation plot

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.


Minimal use example

This minimal example applies the NSLR-HMM algorithm to a simple 2D gaze array and plots the results using the CatEyes plotting functions.

Open in Colab


Pandas workflow example

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.

Open in Colab

Documentation

CatEyes' documentation is created using pdoc3 and GitHub Pages. Click on the link below to view the documentation.

Documentation

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cateyes-0.0.5.tar.gz (14.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cateyes-0.0.5-py3-none-any.whl (16.2 kB view details)

Uploaded Python 3

File details

Details for the file cateyes-0.0.5.tar.gz.

File metadata

  • Download URL: cateyes-0.0.5.tar.gz
  • Upload date:
  • Size: 14.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for cateyes-0.0.5.tar.gz
Algorithm Hash digest
SHA256 5dbe24ee6150025c671a24727f29d5b45eade5311152d9f528f4015a02dfdad4
MD5 7fe2857b4adfa0a0e1328aa20f76af33
BLAKE2b-256 e518dc06ea24f4f0ab9f9537ba4e9621fac3a8ee2b34dd1216d1af34b86b745d

See more details on using hashes here.

File details

Details for the file cateyes-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: cateyes-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 16.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for cateyes-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 10ecef9ee57450f9d549d2083981ea461d78de25e94759dd95f73e50e46c779c
MD5 f6cf3b91f59ffffad59182afaee7fe8d
BLAKE2b-256 150a11eff9e6e28696650c7f3d664180cdba52c6d0619c16833da8009faada45

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page