Face Detection and Extraction using pretrained CNN model.
Download Anaconda
pip install keras
pip install mtcnn
pip install keras_vggfacedefhighlight_faces(image_path, faces):
# display imageimage=plt.imread(image_path)
plt.imshow(image)
ax=plt.gca()
# for each face, draw a rectangle based on coordinatesforfaceinfaces:
x, y, width, height=face['box']
face_border=Rectangle((x, y), width, height,
fill=False, color='red')
ax.add_patch(face_border)
plt.show()Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.


