Skip to main content
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

Metadata

Release files for cateyes 0.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cateyes 0.0.5
File Size Uploaded Provenance Actions
cateyes-0.0.5.tar.gz 14.7 kB Without provenance Details for cateyes-0.0.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cateyes 0.0.5
File Interpreter ABI Platform Actions
cateyes-0.0.5-py3-none-any.whl Python 3 none any Details for cateyes-0.0.5-py3-none-any.whl

Total release size: 30.9 kB

Release files / cateyes-0.0.5.tar.gz

Download URL cateyes-0.0.5.tar.gz
Size 14.7 kB
Tags Source
SHA-256 checksum
How to use checksums
5dbe24ee6150025c671a24727f29d5b45eade5311152d9f528f4015a02dfdad4
BLAKE2b-256 checksum
How to use checksums
e518dc06ea24f4f0ab9f9537ba4e9621fac3a8ee2b34dd1216d1af34b86b745d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release files / cateyes-0.0.5-py3-none-any.whl

Download URL cateyes-0.0.5-py3-none-any.whl
Size 16.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
10ecef9ee57450f9d549d2083981ea461d78de25e94759dd95f73e50e46c779c
BLAKE2b-256 checksum
How to use checksums
150a11eff9e6e28696650c7f3d664180cdba52c6d0619c16833da8009faada45
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Security for cateyes 0.0.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.5 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page