mirror of
https://github.com/serengil/deepface.git
synced 2025-07-22 18:00:02 +00:00
topics
This commit is contained in:
parent
b595b5e6bc
commit
1f990f5a21
18
README.md
18
README.md
@ -6,7 +6,7 @@
|
||||
|
||||
**Deepface** is a lightweight facial analysis framework including [face recognition](https://sefiks.com/2018/08/06/deep-face-recognition-with-keras/) and demography ([age](https://sefiks.com/2019/02/13/apparent-age-and-gender-prediction-in-keras/), [gender](https://sefiks.com/2019/02/13/apparent-age-and-gender-prediction-in-keras/), [emotion](https://sefiks.com/2018/01/01/facial-expression-recognition-with-keras/) and [race](https://sefiks.com/2019/11/11/race-and-ethnicity-prediction-in-keras/)) for Python. You can apply facial analysis with a few lines of code. It plans to bridge a gap between software engineering and machine learning studies.
|
||||
|
||||
# Installation
|
||||
## Installation
|
||||
|
||||
The easiest way to install deepface is to download it from [PyPI](https://pypi.org/project/deepface/).
|
||||
|
||||
@ -14,7 +14,7 @@ The easiest way to install deepface is to download it from [PyPI](https://pypi.o
|
||||
pip install deepface
|
||||
```
|
||||
|
||||
# Face Recognition
|
||||
## Face Recognition
|
||||
|
||||
Verify function under the DeepFace interface is used for face recognition.
|
||||
|
||||
@ -78,7 +78,7 @@ result = DeepFace.verify("img1.jpg", "img2.jpg", model_name = "VGG-Face", distan
|
||||
result = DeepFace.verify("img1.jpg", "img2.jpg", model_name = "VGG-Face", distance_metric = "euclidean_l2")
|
||||
```
|
||||
|
||||
# Facial Attribute Analysis
|
||||
## Facial Attribute Analysis
|
||||
|
||||
Deepface also offers facial attribute analysis including [`age`](https://sefiks.com/2019/02/13/apparent-age-and-gender-prediction-in-keras/), [`gender`](https://sefiks.com/2019/02/13/apparent-age-and-gender-prediction-in-keras/), [`facial expression`](https://sefiks.com/2018/01/01/facial-expression-recognition-with-keras/) (including angry, fear, neutral, sad, disgust, happy and surprise)and [`race`](https://sefiks.com/2019/11/11/race-and-ethnicity-prediction-in-keras/) (including asian, white, middle eastern, indian, latino and black) predictions. Analysis function under the DeepFace interface is used to find demography of a face.
|
||||
|
||||
@ -120,7 +120,7 @@ models["race"] = Race.loadModel()
|
||||
DeepFace.analyze("img1.jpg", models=models)
|
||||
```
|
||||
|
||||
# Streaming and Real Time Analysis
|
||||
## Streaming and Real Time Analysis
|
||||
|
||||
You can run deepface for real time videos as well. Calling stream function under the DeepFace interface will access your webcam and apply both face recognition and facial attribute analysis. Stream function expects a database folder including face images. VGG-Face is the default face recognition model and cosine similarity is the default distance metric similar to verify function. The function starts to analyze if it can focus a face sequantially 5 frames. Then, it shows results 5 seconds.
|
||||
|
||||
@ -147,7 +147,7 @@ user
|
||||
|
||||
BTW, you should use regular slash ( / ) instead of backslash ( \ ) in Windows OS while passing the path to stream function. E.g. `DeepFace.stream("C:/User/Sefik/Desktop/database")`.
|
||||
|
||||
# API
|
||||
## API
|
||||
|
||||
<p align="center"><img src="https://raw.githubusercontent.com/serengil/deepface/master/icon/deepface-api.jpg" width="90%" height="90%"></p>
|
||||
|
||||
@ -159,11 +159,11 @@ python api.py
|
||||
|
||||
The both face recognition and facial attribute analysis are covered in the API. You are expected to call these functions as http post methods. Service endpoints will be `http://127.0.0.1:5000/verify` for face recognition and `http://127.0.0.1:5000/analyze` for facial attribute analysis. You should pass input images as base64 encoded string in this case. [Here](https://github.com/serengil/deepface/tree/master/api), you can find a postman project.
|
||||
|
||||
# E-Learning
|
||||
## E-Learning
|
||||
|
||||
Deepface is mentioned in this [playlist](https://www.youtube.com/watch?v=KRCvkNCOphE&list=PLsS_1RYmYQQFdWqxQggXHynP1rqaYXv_E) as video lectures.
|
||||
|
||||
# Disclaimer
|
||||
## Disclaimer
|
||||
|
||||
Reference face recognition models have different type of licenses. This framework is just a wrapper for those models. That's why, licence types are inherited as well. You should check the licenses for the face recognition models before use.
|
||||
|
||||
@ -171,7 +171,7 @@ Herein, [OpenFace](https://github.com/cmusatyalab/openface/blob/master/LICENSE)
|
||||
|
||||
On the other hand, [VGG-Face](http://www.robots.ox.ac.uk/~vgg/software/vgg_face/) is licensed under Creative Commons Attribution License. That's why, it is restricted to adopt VGG-Face for commercial use.
|
||||
|
||||
# Support
|
||||
## Support
|
||||
|
||||
There are many ways to support a project - starring⭐️ the GitHub repos is just one.
|
||||
|
||||
@ -179,7 +179,7 @@ You can also support this project through Patreon.
|
||||
|
||||
<a href="https://www.patreon.com/bePatron?u=31795557"><img src="https://c5.patreon.com/external/logo/become_a_patron_button.png"></img></a>
|
||||
|
||||
# Licence
|
||||
## Licence
|
||||
|
||||
Deepface is licensed under the MIT License - see [`LICENSE`](https://github.com/serengil/deepface/blob/master/LICENSE) for more details.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user