https://github.com/pupil-labs/real-time-blink-detection
https://github.com/pupil-labs/real-time-blink-detection
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/pupil-labs/real-time-blink-detection
- Owner: pupil-labs
- Created: 2023-05-08T12:56:28.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-26T08:52:23.000Z (about 1 year ago)
- Last Synced: 2024-11-15T12:13:21.525Z (5 months ago)
- Language: Python
- Size: 378 MB
- Stars: 5
- Watchers: 6
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Pupil Labs blink detection pipeline
This package will allow you to perform blink detection in recordings made with Pupil Invisible and Neon. The package contains code both for posthoc blink detection (i.e., outside of Pupil Cloud) on existing recordings
as well as real-time blink detection utilizing Pupil Labs' Realtime Python API.If you are interested in learning about the technical details of Pupil Lab's blink detector, feel free to check out our white paper.
# Installing the package
In order to download the package, you can simply run the following command from the terminal:
```bash
git clone https://github.com/pupil-labs/real-time-blink-detection.git
```In order to install all required Python modules, simply run:
```bash
pip install -r requirements.txt
```# Using the package
After having installed the package, you can import the required modules in Python:
```Python
from blink_detector.helper import preprocess_recording
from blink_detector import blink_detection_pipeline
```After import, you can apply the preprocessing and the blink detection pipeline to your recordings:
```Python
recording_path = "/path/to/your/recording"
left_eye_images, right_eye_images, ts = preprocess_recording(recording_path, is_neon=True)
blink_events = list(blink_detection_pipeline(left_eye_images, right_eye_images, ts))
```This yields a list of blink events with various blink statistics for further examination. For more details, please have a look at the Python notebook that comes with this repository.