vision-camera-face-detector icon indicating copy to clipboard operation
vision-camera-face-detector copied to clipboard

Property '__scanFaces' does not exist

Open ArchivistDevelopers opened this issue 1 year ago • 10 comments

ArchivistDevelopers avatar Aug 25 '23 15:08 ArchivistDevelopers

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); }, []);

michelorth avatar Oct 06 '23 21:10 michelorth

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

huyhai avatar Oct 13 '23 02:10 huyhai

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

SarhaneGhribi avatar Dec 07 '23 08:12 SarhaneGhribi

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"

kevmai96 avatar Jan 21 '24 21:01 kevmai96

Same issue with the following:

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

jessiemblack avatar Jan 25 '24 02:01 jessiemblack

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"

kevmai96 avatar Jan 25 '24 03:01 kevmai96

@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

jessiemblack avatar Jan 25 '24 04:01 jessiemblack

@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?

kevmai96 avatar Jan 25 '24 07:01 kevmai96

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

ansh avatar Feb 07 '24 22:02 ansh

@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?

kevmai96 avatar Feb 07 '24 23:02 kevmai96