This demo shows how to use the Blazeface model to detect faces in a video stream. Then the face image(s) will be cropped and parsed to the classification model. The model development repo is available here and this is the Kaggle notebook to train the model.
First, you need to install Node.js and yarn on your machine, with the corresponding operating system, to build and/or run the app.
Install dependencies and prepare the build directory:
yarn
Launching the development server (by default, it's running at http://localhost:1234) :
yarn watch
Build the app:
yarn build
This will create a dist/
folder, which contains the static files needed to serve the app.
After finish building the app, you could deploy the app using Firebase hosting, using the following command.
firebase deploy
You need to login into your firebase account first and create your own hosting, refer to the firebase website for the complete guide.
We already deploy this app using a firebase hosting, and you could access it using this link.