Skip to main content

A pupil analysis and inference toolkit

Project description

PyPI version

PupilToolKit

A lightweight toolkit for pupil tracking and processing used by LIM Lab.

Overview

PupilToolKit provides utilities and pipelines for pupil extraction, processing, and inference. The repository includes two main components:

  • PupilProcessing: processing pipelines and utility functions.
  • PupilSense: integration with PupilSense inference tools and example scripts.

Example configuration files for experiments and devices are stored in the configs/ directory.

Features

  • Extract and process pupil data
  • Run inference with PupilSense models
  • Example scripts and test coverage

Requirements

  • Python 3.10+ (recommended)
  • Typical scientific packages: numpy, scipy, etc. (see pyproject.toml / setup.py)

Create and activate a virtual environment before installing:

conda create -n process_pupil python=3.10 -y
conda activate process_pupil
pip install -e .

Or using pip/venv:

python -m venv .venv
.venv\\Scripts\\activate
pip install -e .

Installation

Recommended: create and activate a virtual environment (conda or venv) before installing packages.

  • PyTorch & TorchVision (CUDA 12.1) — install the CUDA 12.1 builds of PyTorch 2.2 and TorchVision 0.17.0:
pip install torch==2.2.0+cu121 torchvision==0.17.0+cu121 -f https://download.pytorch.org/whl/torch_stable.html

If you do not have CUDA 12.1 or need a CPU-only build, install the matching CPU/compatible wheel instead (omit +cu121 or follow the official PyTorch install selector at https://pytorch.org).

  • Detectron2 — platform-specific instructions:

  • Windows (pre-built wheels):

pip install detectron2 --extra-index-url https://myhloli.github.io/wheels/
  • Linux (install from upstream):
pip install --no-build-isolation git+https://github.com/facebookresearch/detectron2.git
  • PupilLIMlab package — install the project package from PyPI (or your registry):
pip install PupilLIMlabSWC

After these steps you should be able to run the example scripts and the PupilSense inference tools.

Quick start

Run the example script:

python example/run_script.py

Run tests:

pytest -q

Repository structure

  • PupilProcessing/ — core processing modules and utilities
  • PupilSense/ — PupilSense integration and inference scripts
  • configs/ — YAML configuration files for experiments and devices
  • example/ — runnable example scripts
  • tests/ — unit tests

Contributing

Contributions welcome. Please open issues or pull requests and follow existing code style. Add tests for any behavior changes.

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

pupil_limlab-1.1.tar.gz (47.0 kB view details)

Uploaded Source

Built Distribution

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

pupil_limlab-1.1-py3-none-any.whl (46.7 kB view details)

Uploaded Python 3

File details

Details for the file pupil_limlab-1.1.tar.gz.

File metadata

  • Download URL: pupil_limlab-1.1.tar.gz
  • Upload date:
  • Size: 47.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pupil_limlab-1.1.tar.gz
Algorithm Hash digest
SHA256 4c1744fd977b07299d0c1c6c38d6a5e1f121479237262991b0492d266d6c653d
MD5 a9a3f1c22fbe6e9813943df000d4b9b6
BLAKE2b-256 147fa51040304b4765bbdeabb9f2c27da83b4c972a3be36de2fa601ffa8a2bff

See more details on using hashes here.

Provenance

The following attestation bundles were made for pupil_limlab-1.1.tar.gz:

Publisher: publish.yml on LIMLabSWC/PupilLIMLab

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pupil_limlab-1.1-py3-none-any.whl.

File metadata

  • Download URL: pupil_limlab-1.1-py3-none-any.whl
  • Upload date:
  • Size: 46.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pupil_limlab-1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e6173e317b609a5dc36a4646ae4acffc68d71125bd280cbc28628ed55c99f468
MD5 630b60af6f4b2ba7082de35360bcec8f
BLAKE2b-256 6ad00c0199705f2f1431018185e3c0f78b22403513e0ec76a6dd32fe6fd731a5

See more details on using hashes here.

Provenance

The following attestation bundles were made for pupil_limlab-1.1-py3-none-any.whl:

Publisher: publish.yml on LIMLabSWC/PupilLIMLab

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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