codes simplified

This commit is contained in:
Sefik Ilkin Serengil 2021-07-02 12:26:03 +03:00 committed by GitHub
parent ed9367b8f1
commit 98dfa5248e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -29,7 +29,6 @@ Verification function under the deepface interface offers to verify face pairs a
```python ```python
from deepface import DeepFace from deepface import DeepFace
result = DeepFace.verify("img1.jpg", "img2.jpg") result = DeepFace.verify("img1.jpg", "img2.jpg")
print("Is verified: ", result["verified"])
``` ```
<p align="center"><img src="https://raw.githubusercontent.com/serengil/deepface/master/icon/stock-1.jpg" width="95%" height="95%"></p> <p align="center"><img src="https://raw.githubusercontent.com/serengil/deepface/master/icon/stock-1.jpg" width="95%" height="95%"></p>
@ -42,7 +41,6 @@ Face recognition requires to apply face verification several times. Herein, deep
```python ```python
from deepface import DeepFace from deepface import DeepFace
import pandas as pd
df = DeepFace.find(img_path = "img1.jpg", db_path = "C:/workspace/my_db") df = DeepFace.find(img_path = "img1.jpg", db_path = "C:/workspace/my_db")
``` ```
@ -85,7 +83,6 @@ Deepface also offers facial attribute analysis including [`age`](https://sefiks.
```python ```python
from deepface import DeepFace from deepface import DeepFace
obj = DeepFace.analyze(img_path = "img4.jpg", actions = ['age', 'gender', 'race', 'emotion']) obj = DeepFace.analyze(img_path = "img4.jpg", actions = ['age', 'gender', 'race', 'emotion'])
print(obj["age"]," years old ",obj["dominant_race"]," ",obj["dominant_emotion"]," ", obj["gender"])
``` ```
<p align="center"><img src="https://raw.githubusercontent.com/serengil/deepface/master/icon/stock-2.jpg" width="95%" height="95%"></p> <p align="center"><img src="https://raw.githubusercontent.com/serengil/deepface/master/icon/stock-2.jpg" width="95%" height="95%"></p>