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
Release history Release notifications | RSS feed
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 hashes)
Built Distribution
Close
Hashes for facialmatch-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ae3e7be2643d5fe5311b3400044305923ce8ed432c54668979dbad9476e5e416 |
|
MD5 | 0480d9d0e7ab8c51747e9aa4ecbf02e0 |
|
BLAKE2b-256 | f23f09f181013ef61ae9bded60ab22fa99a76af102733b8684d381f841bae6c1 |