Skip to main content

Pupil Labs 2D Pupil Detector

Project description

https://img.shields.io/pypi/v/pupil-detectors.svg https://img.shields.io/pypi/pyversions/pupil-detectors.svg tests Code style: Black https://img.shields.io/badge/skeleton-2022-informational

pupil-detectors

This Python package contains the standalone 2D pupil detectors for the [Pupil-Labs](https://pupil-labs.com/) software stack.

Install via PyPI

pip install pupil-detectors

Usage

Here’s a quick example on how to detect and draw an ellipse.

import cv2
from pupil_detectors import Detector2D

detector = Detector2D()

# read image as numpy array from somewhere, e.g. here from a file
img = cv2.imread("pupil.png")
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)

result = detector.detect(gray)
ellipse = result["ellipse"]

# draw the ellipse outline onto the input image
# note that cv2.ellipse() cannot deal with float values
# also it expects the axes to be semi-axes (half the size)
cv2.ellipse(
   img,
   tuple(int(v) for v in ellipse["center"]),
   tuple(int(v / 2) for v in ellipse["axes"]),
   ellipse["angle"],
   0, 360, # start/end angle for drawing
   (0, 0, 255) # color (BGR): red
)
cv2.imshow("Image", img)
cv2.waitKey(0)

Developers

Building from Source

Installing the dependencies

  • macOS: brew install eigen opencv

  • Windows: choco install eigen opencv

  • Ubuntu: apt-get install libeigen3-dev libeigen3-dev

Building the Python package

# Clone repository
git clone git@github.com:pupil-labs/pupil-detectors.git
cd pupil-detectors

# Install from source with development extras
pip install .

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_detectors-2.0.2rc2.tar.gz (69.8 kB view details)

Uploaded Source

Built Distributions

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

pupil_detectors-2.0.2rc2-cp311-cp311-win_amd64.whl (23.6 MB view details)

Uploaded CPython 3.11Windows x86-64

pupil_detectors-2.0.2rc2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (20.3 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

pupil_detectors-2.0.2rc2-cp311-cp311-macosx_10_9_x86_64.whl (27.6 MB view details)

Uploaded CPython 3.11macOS 10.9+ x86-64

pupil_detectors-2.0.2rc2-cp310-cp310-win_amd64.whl (23.6 MB view details)

Uploaded CPython 3.10Windows x86-64

pupil_detectors-2.0.2rc2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (20.3 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

pupil_detectors-2.0.2rc2-cp310-cp310-macosx_10_9_x86_64.whl (27.6 MB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

pupil_detectors-2.0.2rc2-cp39-cp39-win_amd64.whl (23.6 MB view details)

Uploaded CPython 3.9Windows x86-64

pupil_detectors-2.0.2rc2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (20.3 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

pupil_detectors-2.0.2rc2-cp39-cp39-macosx_10_9_x86_64.whl (27.6 MB view details)

Uploaded CPython 3.9macOS 10.9+ x86-64

pupil_detectors-2.0.2rc2-cp38-cp38-win_amd64.whl (23.6 MB view details)

Uploaded CPython 3.8Windows x86-64

pupil_detectors-2.0.2rc2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (20.3 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

pupil_detectors-2.0.2rc2-cp38-cp38-macosx_10_9_x86_64.whl (27.6 MB view details)

Uploaded CPython 3.8macOS 10.9+ x86-64

pupil_detectors-2.0.2rc2-cp37-cp37m-win_amd64.whl (23.6 MB view details)

Uploaded CPython 3.7mWindows x86-64

pupil_detectors-2.0.2rc2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (20.3 MB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.17+ x86-64

pupil_detectors-2.0.2rc2-cp37-cp37m-macosx_10_9_x86_64.whl (27.6 MB view details)

Uploaded CPython 3.7mmacOS 10.9+ x86-64

pupil_detectors-2.0.2rc2-cp36-cp36m-win_amd64.whl (23.6 MB view details)

Uploaded CPython 3.6mWindows x86-64

pupil_detectors-2.0.2rc2-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (20.3 MB view details)

Uploaded CPython 3.6mmanylinux: glibc 2.17+ x86-64

pupil_detectors-2.0.2rc2-cp36-cp36m-macosx_10_9_x86_64.whl (27.6 MB view details)

Uploaded CPython 3.6mmacOS 10.9+ x86-64

File details

Details for the file pupil_detectors-2.0.2rc2.tar.gz.

File metadata

  • Download URL: pupil_detectors-2.0.2rc2.tar.gz
  • Upload date:
  • Size: 69.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.10

File hashes

Hashes for pupil_detectors-2.0.2rc2.tar.gz
Algorithm Hash digest
SHA256 08def36eaf87ec288ca2b7aee47df94063ebd45ff7bf0a829fbb6fda881def1f
MD5 50e37951e9a5aebf3b245b63ddb90fbd
BLAKE2b-256 e43773f66d153bb3d1096442800852c34f9351dba919a3f38a553b75b058590a

See more details on using hashes here.

File details

Details for the file pupil_detectors-2.0.2rc2-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for pupil_detectors-2.0.2rc2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 3aebdabea50dc63e110d298a2791030c9af28a82f81ff8151479208608a9e99a
MD5 49059c552ed48fe135b0d21a42b8d663
BLAKE2b-256 775e6b801d017606fa4b26ad84ff3bc9a54a893c87da77b394f379300cd690ca

See more details on using hashes here.

File details

Details for the file pupil_detectors-2.0.2rc2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pupil_detectors-2.0.2rc2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7156b70615b49412f0556e412644d61ac2892bea7bb90c5b0a188f978b32b5af
MD5 fd78e75df43423a03d181b90853031cb
BLAKE2b-256 33ed07b7d221fde9901cbc29d30f17b611d86e13d75cf52f63e86c2d1080bfbf

See more details on using hashes here.

File details

Details for the file pupil_detectors-2.0.2rc2-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for pupil_detectors-2.0.2rc2-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 5cf501d652ba30d741d5fdcd024764b2e7dbc279d6cbf5bfab3fdcd5f365216e
MD5 4ed1d8a7a826b7812ecc09347dc4a070
BLAKE2b-256 f35a67bb3e82b5a7c753a92edc1d6c14ca0331f335672bfd09e3e25122d52544

See more details on using hashes here.

File details

Details for the file pupil_detectors-2.0.2rc2-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for pupil_detectors-2.0.2rc2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 fc867699637c06a24f17d0a78784a723a0d8fffd6d5bd4a37034fcec5e4a923f
MD5 f2789a2ce1e67402d26c99d9abdc99b3
BLAKE2b-256 559ff7c96ce0ea5269afc79fbad7ec78887a7c93520590595afdd128af8d636b

See more details on using hashes here.

File details

Details for the file pupil_detectors-2.0.2rc2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pupil_detectors-2.0.2rc2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d91820bf3f0c471a0d959074f8dd2b8ba85f7122f90ee886185c954720dd4347
MD5 54f5549e97886dbe4139da954169630c
BLAKE2b-256 86000c66c883df51733c3f254e414dab24266686edbb22b04f507239ad2e7e03

See more details on using hashes here.

File details

Details for the file pupil_detectors-2.0.2rc2-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for pupil_detectors-2.0.2rc2-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 e61d3f0db823358a5efe4f52af374836caaedc034d1721ed4c864a5fce1fe165
MD5 357f0f053a92eddb8f28591c567be4e8
BLAKE2b-256 e6cb77f2bf36151789c03a454459d41c7ac6c1406834759e5c158c9a0433a6c1

See more details on using hashes here.

File details

Details for the file pupil_detectors-2.0.2rc2-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for pupil_detectors-2.0.2rc2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 adbe42b779ba66770a0c9ac5342ee030f5e5c888462a40adbd85d68838d473ec
MD5 2f2d40bb38133a5a21c0631bbddb4b44
BLAKE2b-256 96279ae87e174ecc67c910b594bcb830aed7ee7957cc153f6cf407cbe782b7f5

See more details on using hashes here.

File details

Details for the file pupil_detectors-2.0.2rc2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pupil_detectors-2.0.2rc2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 25e4ca84b0d932749dc40cda23869c7f22ceaa96a73b2b863922bf3183e8b279
MD5 8288c9c8b47ce049ced16e638ac6f97d
BLAKE2b-256 fa60a04213feb8c612e4a0d521ac6dc483c7046564649ad60e68d34e77bc8217

See more details on using hashes here.

File details

Details for the file pupil_detectors-2.0.2rc2-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for pupil_detectors-2.0.2rc2-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 2906e17939bec893227e5e145f1b86003709ea0de96f4a0c26847d814656de5f
MD5 ddc1c02edd11abb2c508b6398785e9e8
BLAKE2b-256 6e5af4befe67f035f835332519c27147b5eeea0dfb7e040ceb517b2e37742e73

See more details on using hashes here.

File details

Details for the file pupil_detectors-2.0.2rc2-cp38-cp38-win_amd64.whl.

File metadata

File hashes

Hashes for pupil_detectors-2.0.2rc2-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 0716cb6467d3b62bd0b18332dc2fb28e8cf0bbaccc6eb9503e5deb67dc2d898e
MD5 778b1732db0f6de4943df96f39f4ea7c
BLAKE2b-256 1071a1f96e80e8b6ffea2f5fd8f55b6d5c93b22e207281c5baa9f57334788402

See more details on using hashes here.

File details

Details for the file pupil_detectors-2.0.2rc2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pupil_detectors-2.0.2rc2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 95e0087487f4e8ccd3bf00a9718d498772985e3c153882e9626badc3eae5e713
MD5 e30ba87074474bf58e20aa492087f558
BLAKE2b-256 f9ae9f419a6a73d65c3da0ca00ec662478cb173c340fa022e91e612bf84bcb36

See more details on using hashes here.

File details

Details for the file pupil_detectors-2.0.2rc2-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for pupil_detectors-2.0.2rc2-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 da4ebf919b284a00647f1fcdb3f0a055c6c3350ee5ee08d77f1bce9ce58df932
MD5 75ef49ee40b63eec5b98845e3f011e8f
BLAKE2b-256 99e87b7aea79ac8e175e6286f58f299eb4fecbcbe0056ac5e0376757a096f29c

See more details on using hashes here.

File details

Details for the file pupil_detectors-2.0.2rc2-cp37-cp37m-win_amd64.whl.

File metadata

File hashes

Hashes for pupil_detectors-2.0.2rc2-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 3fd136861582eca523cb9f54e6f06b919805ffb2ac24fa7460e2a8ddb5da78d0
MD5 fb5251fc7bb9c60f6ed48b1d7d0ef572
BLAKE2b-256 9c913081e8ced0d62f38f291db434295876c82622e8fb670c93ca1aaf2e61989

See more details on using hashes here.

File details

Details for the file pupil_detectors-2.0.2rc2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pupil_detectors-2.0.2rc2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a9bebc727d6887255e1ce7c8235d9125be26a82d0ed2a6f5ad1ee68333aa1114
MD5 05769792b4540c4245177d7e77261201
BLAKE2b-256 d21fc5b99e16e7318d763f59f01530c3b78c0481803c6e2062c23c31c6e4ce05

See more details on using hashes here.

File details

Details for the file pupil_detectors-2.0.2rc2-cp37-cp37m-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for pupil_detectors-2.0.2rc2-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 795e3047bd794362a8046994c1b26a582e3f25d7e61a482bfeb941d18f3b4f02
MD5 311d5ccc6eafdbf2c5130bb77a12b281
BLAKE2b-256 7dc02d8ba52159934e05ae769853ce95123683f4f6859b65b80bcbf922316368

See more details on using hashes here.

File details

Details for the file pupil_detectors-2.0.2rc2-cp36-cp36m-win_amd64.whl.

File metadata

File hashes

Hashes for pupil_detectors-2.0.2rc2-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 50ede7fb8bca6ed363ec14355f2c237e5456755c5ff2579c9ec1d2461b45cd09
MD5 5e509a874014bff8b80e0e96893cd38c
BLAKE2b-256 f73360d99a6dd01571a2c7640f9edd24d16f8609601a32a93c08c07d08d9000d

See more details on using hashes here.

File details

Details for the file pupil_detectors-2.0.2rc2-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pupil_detectors-2.0.2rc2-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7157b50aee975341a6b452aee3a34e97ba3bdc174f08e45f8a8807fd59fcb20d
MD5 5e650f2d9550851d294a27f6806bde7a
BLAKE2b-256 7515622202de6b8dc983daadc5f77e4006fdd4f5cbcca5824c9e58967ca0a7cc

See more details on using hashes here.

File details

Details for the file pupil_detectors-2.0.2rc2-cp36-cp36m-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for pupil_detectors-2.0.2rc2-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 701a067afb03e55994ae26e47e5f5f39a42014d8582a0ee4de394a80be427599
MD5 3a7d7b6d811a7f535e9626b0d3457a27
BLAKE2b-256 0ca3ae4941cb1dbc59bde67b85d4aa4a677e27c511404e4b675418183bfb6bc2

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