mirror of
https://github.com/serengil/deepface.git
synced 2025-06-05 19:15:23 +00:00
Merge branch 'master' of https://github.com/serengil/deepface
This commit is contained in:
commit
b05434f82a
10
README.md
10
README.md
@ -24,6 +24,8 @@ facenet_result = DeepFace.verify("img1.jpg", "img2.jpg", model_name = "Facenet")
|
||||
openface_result = DeepFace.verify("img1.jpg", "img2.jpg", model_name = "OpenFace")
|
||||
```
|
||||
|
||||
VGG-Face has the highest accuracy score but it is not convenient for real time studies because of its complex structure. Facenet is a complex model as well. On the other hand, OpenFace has a close accuracy score but it performs the fastest. That's why, OpenFace is much more convenient for real time studies.
|
||||
|
||||
## Similarity
|
||||
|
||||
These models actually find the vector embeddings of faces. Decision of verification is based on the distance between vectors. Distance could be found by different metrics such as [`Cosine Similarity`](https://sefiks.com/2018/08/13/cosine-similarity-in-machine-learning/), Euclidean Distance and L2 form. The default configuration finds the **cosine similarity**. You can alternatively set the similarity metric while verification as demostratred below.
|
||||
@ -34,8 +36,6 @@ 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")
|
||||
```
|
||||
|
||||
VGG-Face has the highest accuracy score but it is not convenient for real time studies because of its complex structure. Facenet is a complex model as well. On the other hand, OpenFace has a close accuracy score but it performs the fastest. That's why, OpenFace is much more convenient for real time studies.
|
||||
|
||||
## Verification
|
||||
|
||||
Verification function returns a tuple including boolean verification result, distance between two faces and max threshold to identify.
|
||||
@ -67,8 +67,8 @@ Deepface also offers facial attribute analysis including [`age`](https://sefiks.
|
||||
|
||||
```python
|
||||
from deepface import DeepFace
|
||||
demography = DeepFace.analyze("img.zip") #passing nothing as 2nd argument will find everything
|
||||
#demography = DeepFace.analyze("img.zip", ['age', 'gender', 'race', 'emotion']) #identical to above line
|
||||
demography = DeepFace.analyze("img.jpg") #passing nothing as 2nd argument will find everything
|
||||
#demography = DeepFace.analyze("img.jpg", ['age', 'gender', 'race', 'emotion']) #identical to above line
|
||||
```
|
||||
|
||||
Analysis function returns a json object.
|
||||
@ -147,4 +147,4 @@ There are many ways to support a project - starring⭐️ the GitHub repos is ju
|
||||
|
||||
# Licence
|
||||
|
||||
Chefboost is licensed under the MIT License - see [`LICENSE`](https://github.com/serengil/deepface/blob/master/LICENSE) for more details.
|
||||
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