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 use Facenet

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.4.tar.gz (12.0 kB view details)

Uploaded Source

Built Distribution

facef-0.1.4-py3-none-any.whl (13.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: facef-0.1.4.tar.gz
  • Upload date:
  • Size: 12.0 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.4.tar.gz
Algorithm Hash digest
SHA256 a91f6abe42f7c8aff6686d50a8a0e2f4e59b1f819c0eaf1718da2bcd859a74a9
MD5 b77569dadef6ce7cf3613e88722d7eae
BLAKE2b-256 81688feb7eb79f9de617e46bee8184a130a0d26e5535a3557c01995613429a76

See more details on using hashes here.

File details

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

File metadata

  • Download URL: facef-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 13.0 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 fec9a3a759026d88e7608772e0170950c3396debb866062c05de7b8df800ac00
MD5 26f5be77a93a7d70ba94284f498f27a1
BLAKE2b-256 3c17251b266b633dc181a0afb8246da002e67600ce7094d4b12d8fd7e4329867

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