Skip to main content

A module to calculate Eye Aspect Ratio (EAR) from images

Project description

ear-calculator

A Python module to compute Eye Aspect Ratio (EAR) from images.

Installation

pip install ear-calculator

Usage

from ear_calculator import EARCalculator

model_path = "shape_predictor_68_face_landmarks.dat"
ear_calculator = EARCalculator(model_path)

with open("face_image.jpg", "rb") as img_file:
    image_data = base64.b64encode(img_file.read()).decode('utf-8')

ear = ear_calculator.get_ear_from_image(image_data)
print(f"Eye Aspect Ratio (EAR): {ear}")

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

ear_calculator-0.1.1.tar.gz (2.2 kB view details)

Uploaded Source

Built Distribution

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

ear_calculator-0.1.1-py3-none-any.whl (2.5 kB view details)

Uploaded Python 3

File details

Details for the file ear_calculator-0.1.1.tar.gz.

File metadata

  • Download URL: ear_calculator-0.1.1.tar.gz
  • Upload date:
  • Size: 2.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.2

File hashes

Hashes for ear_calculator-0.1.1.tar.gz
Algorithm Hash digest
SHA256 00ee4f4d7992c8204ed08036082c325537b3beae6d0295d8d27b224e512f06e5
MD5 b5bdebb70ed2d36e32be53906c277942
BLAKE2b-256 d2a6c5f9da15d9b160c6fc4ee0b1a785408628872a893e8acda7fe4a815dcf43

See more details on using hashes here.

File details

Details for the file ear_calculator-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: ear_calculator-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 2.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.2

File hashes

Hashes for ear_calculator-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 93df41e6954d4f3c9166eaa159ab2318668802800a783550efda8aa37422b3af
MD5 1c66566189fc5cefa5ddae6b964b0e83
BLAKE2b-256 88b139388087345f9c76deb4e3757e65934b26e9cd149bf62d2ced5d799d29d6

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