From 6a4e44caddba26a144b460bbe785459b5e55b711 Mon Sep 17 00:00:00 2001 From: Sefik Ilkin Serengil Date: Thu, 23 Dec 2021 16:51:57 +0300 Subject: [PATCH] detect face --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 1662b81..a0cbb13 100644 --- a/README.md +++ b/README.md @@ -122,9 +122,6 @@ All deepface functions accept an optional detector backend input argument. You c ```python backends = ['opencv', 'ssd', 'dlib', 'mtcnn', 'retinaface'] -#face detection and alignment -detected_face = DeepFace.detectFace(img_path = "img.jpg", detector_backend = backends[4]) - #face verification obj = DeepFace.verify(img1_path = "img1.jpg", img2_path = "img2.jpg", detector_backend = backends[4]) @@ -133,6 +130,9 @@ df = DeepFace.find(img_path = "img.jpg", db_path = "my_db", detector_backend = b #facial analysis demography = DeepFace.analyze(img_path = "img4.jpg", detector_backend = backends[4]) + +#face detection and alignment +face = DeepFace.detectFace(img_path = "img.jpg", detector_backend = backends[4]) ``` Face recognition models are actually CNN models and they expect standard sized inputs. So, resizing is required before representation. To avoid deformation, deepface adds black padding pixels after detection and alignment.