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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: facef-0.1.5.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.5.tar.gz
Algorithm Hash digest
SHA256 76f5780e3c723d7fc430171dabf17d67a701439ffaa3e21e4e35c61a32cde75e
MD5 1a59a1f4c478339f796e975abe0e1cec
BLAKE2b-256 89c15fb6c89b5049d70a42396a5af29d1a7e2281de2667bdb9c42b0aebb61ee9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: facef-0.1.5-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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 a8c4d5d8567c84d3a025c3042aff30807d257b69a8d9a94c47c24ff438438256
MD5 944e905952bc931b5a9847c833a85f9c
BLAKE2b-256 12220c3873988d355f68d528a16fcdc0756adba89d88ad64b16cb7808471344a

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