How to use the expo-face-detector.detectFacesAsync function in expo-face-detector

To help you get started, we’ve selected a few expo-face-detector examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github expo / expo / apps / native-component-list / src / screens / Camera / Photo.tsx View on Github external
detectFace = () =>
    FaceDetector.detectFacesAsync(this.props.uri, {
      detectLandmarks: FaceDetector.Constants.Landmarks.none,
      runClassifications: FaceDetector.Constants.Classifications.all,
    })
      .then(this.facesDetected)
      .catch(this.handleFaceDetectionError)
github expo / expo / apps / native-component-list / src / screens / FaceDetectorScreen.tsx View on Github external
detectFaces = (picture: string) => {
    this.setState({
      faceDetection: {
        detecting: true,
        faces: [],
      },
    });
    FaceDetector.detectFacesAsync(picture, {
      mode: FaceDetector.Constants.Mode.accurate,
      detectLandmarks: FaceDetector.Constants.Landmarks.all,
      runClassifications: FaceDetector.Constants.Classifications.none,
    })
      .then(result => {
        this.setState({
          faceDetection: {
            detecting: false,
            faces: result.faces,
            image: result.image,
          },
        });
      })
      .catch(error => {
        this.setState({
          faceDetection: {

expo-face-detector

Lets you use the power of Google Mobile Vision (https://developers.google.com/vision/face-detection-concepts) framework to detect faces on images.

MIT
Latest version published 4 months ago

Package Health Score

86 / 100
Full package analysis