Skip to main content

face matching

Project description

facialmatch

facialmatch is a Python package that provides easy-to-use functions for comparing faces in images and extracting facial regions from a given image.

Features

  • 🧑‍🤝‍🧑 Compare Faces: Compare two images and check if they match with a given similarity threshold.

  • 🖼️ Extract Face: Extract and return the facial region from an image.

Installation

You can install the package via pip:

pip install facialmatch

Usage

match.py

from facialmatch import compare_faces



# Compare two faces

result = compare_faces("path/to/image1.jpg", "path/to/image2.jpg")



# Custom similarity threshold

custom_result = compare_faces("path/to/image1.jpg", "path/to/image2.jpg", minimum_similarity=0.80)

output

{

  "similarity": 0.86,

  "match": "true"

}

ExtractFace.py

from facialmatch import get_face_from_image

import matplotlib.pyplot as plt



# Extract a face from an image

face_image = get_face_from_image("path/to/image")



# Display the extracted face using matplotlib

plt.imshow(face_image)

plt.axis('off')  # Turn off the axis

plt.show()

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

facialmatch-1.0.1.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

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

facialmatch-1.0.1-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file facialmatch-1.0.1.tar.gz.

File metadata

  • Download URL: facialmatch-1.0.1.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.2

File hashes

Hashes for facialmatch-1.0.1.tar.gz
Algorithm Hash digest
SHA256 caddef20577db3423370c4cb06e4929da227caf1edc6fcc7664578ed357e3728
MD5 1db922fc884d672b5600322331b6caf4
BLAKE2b-256 daa06bb30d9f6f58ead78268c9fb7ab7e4bdbfcd3175f1bf79a891b85714371d

See more details on using hashes here.

File details

Details for the file facialmatch-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: facialmatch-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.2

File hashes

Hashes for facialmatch-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ae3e7be2643d5fe5311b3400044305923ce8ed432c54668979dbad9476e5e416
MD5 0480d9d0e7ab8c51747e9aa4ecbf02e0
BLAKE2b-256 f23f09f181013ef61ae9bded60ab22fa99a76af102733b8684d381f841bae6c1

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