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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
caddef20577db3423370c4cb06e4929da227caf1edc6fcc7664578ed357e3728
|
|
| MD5 |
1db922fc884d672b5600322331b6caf4
|
|
| BLAKE2b-256 |
daa06bb30d9f6f58ead78268c9fb7ab7e4bdbfcd3175f1bf79a891b85714371d
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ae3e7be2643d5fe5311b3400044305923ce8ed432c54668979dbad9476e5e416
|
|
| MD5 |
0480d9d0e7ab8c51747e9aa4ecbf02e0
|
|
| BLAKE2b-256 |
f23f09f181013ef61ae9bded60ab22fa99a76af102733b8684d381f841bae6c1
|