mirror of
https://github.com/serengil/deepface.git
synced 2025-06-07 12:05:22 +00:00
detect face
This commit is contained in:
parent
a487d078af
commit
6a4e44cadd
@ -122,9 +122,6 @@ All deepface functions accept an optional detector backend input argument. You c
|
|||||||
```python
|
```python
|
||||||
backends = ['opencv', 'ssd', 'dlib', 'mtcnn', 'retinaface']
|
backends = ['opencv', 'ssd', 'dlib', 'mtcnn', 'retinaface']
|
||||||
|
|
||||||
#face detection and alignment
|
|
||||||
detected_face = DeepFace.detectFace(img_path = "img.jpg", detector_backend = backends[4])
|
|
||||||
|
|
||||||
#face verification
|
#face verification
|
||||||
obj = DeepFace.verify(img1_path = "img1.jpg", img2_path = "img2.jpg", detector_backend = backends[4])
|
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
|
#facial analysis
|
||||||
demography = DeepFace.analyze(img_path = "img4.jpg", detector_backend = backends[4])
|
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.
|
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.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user