face_alignment
face_alignment copied to clipboard
Simple face alignment library by using face_recognition and opencv
face_alignment
Simple face alignment library by using face_recognition and opencv
Environment
- MacOS
- Ubuntu 16.04
Prerequisite
- face_recognition
- opencv
if there's any problem in environment setting, please check my another repository
https://github.com/cftang0827/python-computer-vision-env_install
Workflow
- Use face_recognition(dlib) to find 68 face landmark points.
- Find the middle point of left eye and right eye
- Use opencv's warpaffine to correct original image
img2_r = io.imread('test2.jpg')
t1 = timeit.default_timer()
img2_a = api.face_alignment(img2_r, scale = 1.05)
print('Time elapsed: {}'.format(timeit.default_timer() - t1))
Origin image
After alignment image
Time elapsed: 0.200452