Skip to content

Latest commit

 

History

History

face_detection_demo

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

A dummy demo for face detection using classical computer vision

Instructions

  • To enable camera on browser, please enable https. With unofficial certificates, Safari and Firefox are tested to be fine but not Chrome.

  • Create self-assigned certificates:

    openssl req -x509 -newkey rsa:4096 -nodes -out cert.pem -keyout key.pem -days 365

  • Several ways to enable https for flask:

    • Add app.run(ssl_context=('cert.pem', 'key.pem')) in flask app.py.
    • Run flask run --cert=cert.pem --key=key.pem
    • Using Gunicorn by: gunicorn --certfile cert.pem --keyfile key.pem -b 0.0.0.0:8000 face-detect:app
    • Setup NGINX by steps

Sources

This demo is inspired by following sources:

  • Choosing cameras in JavaScript with the mediaDevices API: blog, repo
  • Launch Your Own Face Recognition Application(Real-Time)In Browser Within Minutes: blog, repo
  • Build Real Time Face Detection With JavaScript: youtube, repo
  • Official face-api.js