From ca3a92d2cff90461bf6004448cb588c04d1215cf Mon Sep 17 00:00:00 2001 From: Sefik Ilkin Serengil Date: Thu, 13 Mar 2025 09:25:44 +0000 Subject: [PATCH] Update README.md shorter lines in snippets --- README.md | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 8786155..46f57d0 100644 --- a/README.md +++ b/README.md @@ -112,11 +112,17 @@ models = [ "Buffalo_L", ] -result = DeepFace.verify(img1_path = "img1.jpg", img2_path = "img2.jpg", model_name = models[0]) +result = DeepFace.verify( + img1_path = "img1.jpg", img2_path = "img2.jpg", model_name = models[0] +) -dfs = DeepFace.find(img_path = "img1.jpg", db_path = "C:/my_db", model_name = models[1]) +dfs = DeepFace.find( + img_path = "img1.jpg", db_path = "C:/my_db", model_name = models[1] +) -embeddings = DeepFace.represent(img_path = "img.jpg", model_name = models[2]) +embeddings = DeepFace.represent( + img_path = "img.jpg", model_name = models[2] +) ```

@@ -153,7 +159,9 @@ result = DeepFace.verify( img1_path = "img1.jpg", img2_path = "img2.jpg", distance_metric = metrics[1] ) -dfs = DeepFace.find(img_path = "img1.jpg", db_path = "C:/my_db", distance_metric = metrics[2]) +dfs = DeepFace.find( + img_path = "img1.jpg", db_path = "C:/my_db", distance_metric = metrics[2] +) ``` **Facial Attribute Analysis** - [`Demo`](https://youtu.be/GT2UeN85BdA) @@ -161,7 +169,9 @@ dfs = DeepFace.find(img_path = "img1.jpg", db_path = "C:/my_db", distance_metric DeepFace also comes with a strong facial attribute analysis module 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. Result is going to be the size of faces appearing in the source image. ```python -objs = DeepFace.analyze(img_path = "img4.jpg", actions = ['age', 'gender', 'race', 'emotion']) +objs = DeepFace.analyze( + img_path = "img4.jpg", actions = ['age', 'gender', 'race', 'emotion'] +) ```