From 9f4b804d4d9ac2b3f48b035ef8dfb604ae85a744 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=9Eefik=20Serangil?= Date: Sat, 15 Feb 2020 19:18:25 +0300 Subject: [PATCH] readme updated --- README.md | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 81cf6f0..2e4c438 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,13 @@ result = DeepFace.verify("img1.jpg", "img2.jpg") } ``` +You can retrieve the fields of the response object easily in Python. + +```python +print("Is verified: ", demography["verified"]) +print("Distance: ", demography["distance"]) +``` + ## Face recognition models Face recognition can be handled by different models. Currently, [`VGG-Face`](https://sefiks.com/2018/08/06/deep-face-recognition-with-keras/) , [`Google Facenet`](https://sefiks.com/2018/09/03/face-recognition-with-facenet-in-keras/), [`OpenFace`](https://sefiks.com/2019/07/21/face-recognition-with-openface-in-keras/) and `Facebook DeepFace` models are supported in deepface. The default configuration verifies faces with **VGG-Face** model. You can set the base model while verification as illustared below. Accuracy and speed show difference based on the performing model. @@ -94,9 +101,9 @@ Analysis function returns a json object. Then, you can retrieve the fields of the response object easily in Python. ```python -import json -demography = json.loads(demography) -print("Age: ",demography["age"]) +print("Age: ", demography["age"]) +print("Gender: ", demography["gender"]) +print("Emotion: ", demography["dominant_emotion"]) ``` # Installation