
Security News
NIST Under Federal Audit for NVD Processing Backlog and Delays
As vulnerability data bottlenecks grow, the federal government is formally investigating NIST’s handling of the National Vulnerability Database.
react-use-face-detection
Advanced tools
Face detection React hook powered by @mediapipe/face_detection, @mediapipe/camera_utils, react-webcam
Simple React Hook to detect faces from an HTMLImageElement or react-webcam video source. Powered by MediaPipe
To install, you can use npm or yarn:
npm
npm install react-use-face-detection
yarn
yarn add react-use-face-detection
Name | Type | Optional | Description |
---|---|---|---|
mirrored | boolean | true | This 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 | true | Callback function that returns the FaceDetectionResults |
faceDetectionOptions | FaceDetectionOptions | true | Options for configuring the face detection model - see https://google.github.io/mediapipe/solutions/face_detection.html#javascript-solution-api |
faceDetection | FaceDetection | false | Initialize the face detection model from @mediapipe/face_detection |
camera | (cameraOptions: CameraOptions) => Camera | true | Initialize the camera utility model from @mediapipe/camera_utils |
Name | Type | Description |
---|---|---|
boundingBox | BoundingBox[] | Returns details and coordinates of the bounding box around the detected face(s) |
isLoading | boolean | Returns a boolean that detects whether if the model has been loaded |
detected | boolean | Returns a boolean that detects whether if a face has been detected |
facesDetected | number | Returns a number of faces that have been detected |
webcamRef | LegacyRef | Returns a ref object for the react-webcam <Webcam/> node |
imgRef | RefObject | Returns a ref object for the <img/> element |
FAQs
Face detection React hook powered by @mediapipe/face_detection, @mediapipe/camera_utils, react-webcam
The npm package react-use-face-detection receives a total of 769 weekly downloads. As such, react-use-face-detection popularity was classified as not popular.
We found that react-use-face-detection demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
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.
Security News
As vulnerability data bottlenecks grow, the federal government is formally investigating NIST’s handling of the National Vulnerability Database.
Research
Security News
Socket’s Threat Research Team has uncovered 60 npm packages using post-install scripts to silently exfiltrate hostnames, IP addresses, DNS servers, and user directories to a Discord-controlled endpoint.
Security News
TypeScript Native Previews offers a 10x faster Go-based compiler, now available on npm for public testing with early editor and language support.