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. (seepyproject.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 utilitiesPupilSense/— PupilSense integration and inference scriptsconfigs/— YAML configuration files for experiments and devicesexample/— runnable example scriptstests/— unit tests
Contributing
Contributions welcome. Please open issues or pull requests and follow existing code style. Add tests for any behavior changes.
Release files for Pupil-LIMlab 1.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pupil_limlab-1.1.1.tar.gz | 51.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pupil_limlab-1.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 102.7 kB
Release files / pupil_limlab-1.1.1.tar.gz
| Download URL | pupil_limlab-1.1.1.tar.gz |
|---|---|
| Size | 51.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
791e00690bfc1589f59ed532dbfee125d74e194ae857f005ce3954b252f779a6
|
|
BLAKE2b-256 checksum How to use checksums |
d44192832dc7cce9c3f5d5646060bf40a0741bf871a7e84d796855f23a53ca25
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 10, 2026.
Transparency logRelease files / pupil_limlab-1.1.1-py3-none-any.whl
| Download URL | pupil_limlab-1.1.1-py3-none-any.whl |
|---|---|
| Size | 51.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
036dc01ab3574a98cd5feb1a23ba79e8856e196a849585b17500018231cc9526
|
|
BLAKE2b-256 checksum How to use checksums |
fa891bc3deead05c2853e3bba349eacb75ee8fa9d157809b9f66ea314acc79ba
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 10, 2026.
Transparency log