rodgomesc / vision-camera-face-detector

VisionCamera Frame Processor Plugin to detect faces using MLKit Vision Face Detector
MIT License
95 stars 66 forks source link

Property '__scanFaces' does not exist #43

Open ArchivistDevelopers opened 1 year ago

michelorth commented 1 year ago

I have the same problem

"vision-camera-face-detector": "^0.1.8", "react-native-reanimated": "^3.5.3", "react-native-vision-camera": "^2.16.1",

my babel.config

const path = require('path'); const pak = require('./package.json');

module.exports = { presets: ['module:metro-react-native-babel-preset'], plugins: [ [ 'react-native-reanimated/plugin', { globals: ['__scanFaces'], }, ], ], };

my frame processor

const frameProcessor = useFrameProcessor((frame) => { 'worklet'; const scannedFaces = scanFaces(frame); runOnJS(setFaces)(scannedFaces); }, []);

huyhai commented 1 year ago

try this : "react-native-vision-camera": "2.16.1", "react-native-reanimated": "3.5.4",

SarhaneGhribi commented 11 months ago

module.exports = { presets: ['module:metro-react-native-babel-preset'], plugins: [ ['react-native-worklets-core/plugin'], ['react-native-reanimated/plugin', { globals: ['__scanFaces',], },] ], };

paste this in your babel.config.js file

Robogram commented 9 months ago

try this : "react-native-vision-camera": "2.16.1", "react-native-reanimated": "3.5.4",

I got this "'hermes/inspector/chrome/Registration.h' file not found"

jessiemblack commented 9 months ago

Same issue with the following:

"react-native-vision-camera": "^3.8.2" "react-native-reanimated": "^3.6.1"

Robogram commented 9 months ago

Same issue with the following:

"react-native-vision-camera": "^3.8.2" "react-native-reanimated": "^3.6.1" Very annoyinggggggg lol...... I'm currently looking up on this instead "https://github.com/mrousavy/react-native-fast-tflite"

jessiemblack commented 9 months ago

@Robogram I actually got this to work today:

"react-native": "0.73.2",
"react-native-reanimated": "^3.5.4",
"react-native-vision-camera": "^2.16.1",
"react-native-worklets-core": "^0.2.4",
"vision-camera-face-detector": "^0.1.8"

Import the following: import {scanFaces} from 'vision-camera-face-detector';

Inside your component:

const [faces, setFaces] = useState(null);

  const frameProcessor = useFrameProcessor(frame => {
    'worklet';
    const scannedFaces = scanFaces(frame);
    runOnJS(setFaces)(scannedFaces);
  }, []);

Hope this helps

Robogram commented 9 months ago

@Robogram I actually got this to work today:

"react-native": "0.73.2",
"react-native-reanimated": "^3.5.4",
"react-native-vision-camera": "^2.16.1",
"react-native-worklets-core": "^0.2.4",
"vision-camera-face-detector": "^0.1.8"

Import the following: import {scanFaces} from 'vision-camera-face-detector';

Inside your component:

const [faces, setFaces] = useState(null);

  const frameProcessor = useFrameProcessor(frame => {
    'worklet';
    const scannedFaces = scanFaces(frame);
    runOnJS(setFaces)(scannedFaces);
  }, []);

Hope this helps

@jessiemichelleblack No, still doesn't work:(. Can I see your repository if you don't mind?

ansh commented 9 months ago

@Robogram Make sure you run pod install inside the ios directory

Robogram commented 9 months ago

@Robogram Make sure you run pod install inside the ios directory

I did "npx pod-install" or do I actually have to cd in ios and 'pod install' also?