Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

facialmatch

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

facialmatch

face matching

  • 1.0.1
  • PyPI
  • Socket score

Maintainers
1

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

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc