DBDelve
Dive deep into your data. A fast, native, multi-engine database client written in Rust. Free and open source, no telemetry.
翻訳待ち
A Lightweight Face Recognition and Facial Attribute Analysis (Age, Gender, Emotion and Race) Library for Python
翻訳待ち
開発ツールPython · DockerfileGitHub @serengil自分でインストール所有者未確認
Paste into Claude or ChatGPT for installation instructions suited to your environment.
Have you tried it? One tap is enough. No sign-in needed.
Loading the full README. The saved excerpt is shown below.
DeepFace is a lightweight face recognition and facial attribute analysis (age, gender, emotion and race) framework for python. It is a hybrid face recognition framework wrapping state-of-the-art models: VGG-Face, FaceNet, OpenFace, DeepFace, DeepID, ArcFace, Dlib, SFace, GhostFaceNet, Buffalo_L. A modern face recognition pipeline consists of 5 common stages: detect, align (https://sefiks.com/2020/02/ [README 설치·사용 부분 발췌] Installation The easiest way to install deepface is to download it from PyPI. It's going to install the library itself andRead the full README ↗
DeepFace is a lightweight face recognition and facial attribute analysis (age, gender, emotion and race) framework for python. It is a hybrid face recognition framework wrapping state-of-the-art models: VGG-Face, FaceNet, OpenFace, DeepFace, DeepID, ArcFace, Dlib, SFace, GhostFaceNet, Buffalo_L.
A modern face recognition pipeline consists of 5 common stages: detect, align, normalize, represent and verify. While DeepFace handles all these common stages in the background, you don’t need to acquire in-depth knowledge about all the processes behind it. You can just call its verification, find or analysis function with a single line of code.
Experiments show that human beings have 97.53% accuracy on facial recognition tasks whereas those models already reached and passed that accuracy level.
The easiest way to install deepface is to download it from PyPI. It's going to install the library itself and its prerequisites as well.
DeepFace is framework agnostic: it can run on top of ONNX Runtime (default), TensorFlow or PyTorch. ONNX Runtime keeps the install lightweight (a few hundred MB), whereas TensorFlow and PyTorch typically add one to several GB, so install the tensorflow or pytorch extra only if you prefer one of those frameworks.
# runs deepface on onnxruntime by default
$ pip install deepface
# or to run deepface on tensorflow
# $ pip install "deepface[tensorflow]"
# or to run deepface on pytorch
# $ pip install "deepface[pytorch]"
# manage backend deep learning framework if you have many
# export DEEPFACE_BACKEND_ENGINE=onnx # or tensorflow, pytorch
Alternatively, you can also install deepface from its source code. Source code may have new features not published in pip release yet.
$ git clone https://github.com/serengil/deepface.git
$ cd deepface
$ pip install -e . # runs on onnxruntime, or pip install -e ".[tensorflow]" or pip install -e ".[pytorch]"
Once you installed the library, then you will be able to import it and use its functionalities.
from deepface import DeepFace
💡 Prefer not to install or manage infrastructure? You can use a managed API via deepface.dev.
Face Verification - Demo
This function determines whether two facial images belong to the same person or to different individuals. The function returns a dictionary, where the key of interest is verified: True indicates the images are of the same person, while False means they are of different people.
result: dict = DeepFace.verify(img1_path = "img1.jpg", img2_path = "img2.jpg")
Face recognition - Tutorial, Demo
Face recognition requires applying face verification many times. DeepFace provides an out-of-the-box find function that searches for the identity of an input image within a specified folder, s3 or ftp.
dfs: List[pd.DataFrame] = DeepFace.find(img_path = "img1.jpg", db_path = "C:/my_db")
Database-backed face recognition - Demo
This is the beginning of the README. Read the rest at the original. Read the full README ↗