🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

react-use-face-detection

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-use-face-detection

Face detection React hook powered by @mediapipe/face_detection, @mediapipe/camera_utils, react-webcam

0.0.10
npm
Version published
Weekly downloads
549
-18.3%
Maintainers
1
Weekly downloads
 
Created
Source

logo

useFaceDetection Hook

🧰 Installation

To install, you can use npm or yarn:

npm

npm install react-use-face-detection

yarn

yarn add react-use-face-detection

⚙️ Options

NameTypeDescription
mirroredboolean | undefinedThis enables a mirrored detection of the faces in the provided media source - e.g. if you flip the media source horizontally, this would enable the correct output of your flipped media source.
handleOnResults(results: FaceDetectionResults) => void | undefinedCallback function that returns the FaceDetectionResults
faceDetectionOptionsFaceDetectionOptions | undefinedOptions for configuring the face detection model - see https://google.github.io/mediapipe/solutions/face_detection.html#javascript-solution-api

🏹 Returned values

NameTypeDescription
boundingBoxBoundingBox[]Returns details and coordinates of the bounding box around the detected face(s)
isLoadingbooleanReturns a boolean that detects whether if the model has been loaded
detectedbooleanReturns a boolean that detects whether if a face has been detected
facesDetectednumberReturns a number of faces that have been detected
webcamRefRefObjectReturns a ref object for the react-webcam <Webcam/> node
imgRefRefObjectReturns a ref object for the <img/> element

👷 Built With

  • ReactJS - Frontend Javascript web framework
  • TypeScript - Open-source language which builds on JavaScript
  • MediaPipe - Machine Learning framework
  • Jest - JavaScript testing framework

📚 Author

Keywords

React

FAQs

Package last updated on 12 Apr 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts