Skip to content

Commit 787c374

Browse files
authored
Update Import_face_utils
1 parent e7efd14 commit 787c374

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

Import_face_utils

+28
Original file line numberDiff line numberDiff line change
@@ -1 +1,29 @@
1+
Supported detection models
2+
face_recognition (hog and cnn)
3+
retina face model
4+
haar cascade face detection
5+
more to be added in the next releases
16

7+
Installation
8+
OS X & Linux using PIP :
9+
10+
pip install face-utils
11+
Features
12+
Face Detection
13+
By creating an object of the face detection model you want you can use it to detect the faces in images.
14+
I have also implemented outputs forms such as 1 : (x,y,w,h) and 2 : (top,right,bottom,left )
15+
16+
Face cropping
17+
ability to crop the face from the image given the detector result
18+
You can also zoom in and out from the face.
19+
20+
Example
21+
import cv2
22+
from face_utils.detection import Detector
23+
from face_utils.cropping import cropping
24+
imgPath = "files/Obama.jpg"
25+
img = cv2.imread(imgPath)
26+
img= np.array(img)
27+
model = Detector("hog")
28+
bbox = model.detect(img,2) #using (x,y,w,h) return mode
29+
face = cropping.crop(img,bbox,1,80,80)

0 commit comments

Comments
 (0)