Skip to main content

face recognition library, flexible and easy to use

Project description

FaceF

A library for face recognition, flexible and easy to use. The library uses a lot of models like ssd, mtcnn, facenet .... These models will be downloaded automatically when used for the first time, please make sure your network connection is not blocked to google drive.

Install

FaceF is available on pypi.org, if you just want to use it for your project, install it using pip. Requires python>=3.6, tensorflow2

pip install facef

To use

1. Face detection

import cv2
from facef.detection import ssd_detect, mtcnn_detect 

img = cv2.imread('path_to_image.jpg')

boxes = ssd_detect(img)
# boxes,_ = mtcnn_detect(img)
for box in boxes:
    cv2.rectangle(img), (box[0],box[1]), (box[2],box[3]), (0,255,0),thickness=2)
cv2.imshow('image', img)

2. Face extract feature

import cv2
from facef.extraction import facenet_ext 

img_face = cv2.imread('face_image.jpg')

emb = facenet_ext(face_img)
print(emb)

3. Get face distance

import cv2
from facef.distance import face2face_distance 

distance = face2face_distance(emb_face1, emb_face2)
print(distance)

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

facef-0.1.3.tar.gz (10.1 kB view details)

Uploaded Source

Built Distribution

facef-0.1.3-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

Details for the file facef-0.1.3.tar.gz.

File metadata

  • Download URL: facef-0.1.3.tar.gz
  • Upload date:
  • Size: 10.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.8

File hashes

Hashes for facef-0.1.3.tar.gz
Algorithm Hash digest
SHA256 6f630c9b339c5ec1406a43bb4f6a1655ce391d68dc2260d6ee5c71cc411327c9
MD5 8e3d4396ffd65dbed2af23aaf6d4b2d2
BLAKE2b-256 e9b638ea2ef205354f6e29cf58821950d62fe78e87de1e6565a0ff41829f9d34

See more details on using hashes here.

File details

Details for the file facef-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: facef-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 10.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.8

File hashes

Hashes for facef-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 31d660ac026d6f8d68145ee76638675d89e6ddb2623ab040080e9a067d3493e9
MD5 5c06e576dc24ce93191be699fb6e6da2
BLAKE2b-256 9e826bc7a766c78be97ffd10fc5cdbcafcadd606f54ed1556df43f2f5103528f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page