Metadata-Version: 2.1
Name: facialmatch
Version: 1.0.1
Summary: face matching
Author: Hemang Baldha
Author-email: hemang9705@gmail.com
Keywords: python,face,face matching,face detection,face recognition,opencv,opencv-python,numpy,scikit-learn
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: opencv-python
Requires-Dist: numpy
Requires-Dist: scikit-learn


# 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:



```bash

pip install facialmatch

```



## Usage



**match.py**

```bash

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**

```bash

{

  "similarity": 0.86,

  "match": "true"

}



```

##

**ExtractFace.py**

```bash

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()

```

