Member-only story
Face Detection Using JavaScript API — face-api.js
In this article, we will learn about face detection (Age/Gender/Face Positions/Mood) using face-api.js and the nearby object detection (Person/Phone etc) using coco-ssd model on the web browser.
face-api.jsis a javascript module, built on top of tensorflow.js core, which implements several CNNs (Convolutional Neural Networks) to solve face detection, face recognition and face landmark detection, optimized for the web and for mobile devices.
Let’s start now,
Prerequisite :
- Basic understanding of React.js (You may choose any library or frontend framework of your choice)
- Basic understanding of p5.js library.
- Installed create-react-app and Node.js version >= 10.15.1
Let’s create a react project,
npx create-react-app object_face_detection
cd object_face_detectionNow, install the below dependencies
npm install @tensorflow-models/coco-ssd
npm install @tensorflow/tfjs-converter
npm install @tensorflow/tfjs-core
npm install face-api.js
npm install p5
npm install react-p5-wrapperLet’s understand each dependency one by one-










