Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Trying to get face detector to work but frame processing is unavailable and are not enabled #1650

Closed
3 of 4 tasks
Salvasgdo opened this issue Jul 13, 2023 · 3 comments · Fixed by #1466
Closed
3 of 4 tasks
Labels
🐛 bug Something isn't working

Comments

@Salvasgdo
Copy link

Salvasgdo commented Jul 13, 2023

What were you trying to do?

I want to get face detecting to work

Reproduceable Code

useEffect(() => {
 console.log(faces, Date.now());
 }, [faces]);
 
   const frameProcessor = useFrameProcessor((frame) => {
     'worklet';
     const scannedFaces = scanFaces(frame);
     runOnJS(setFaces)(scannedFaces);
   }, []);
 
   useEffect(() => {
     getPermission()
   }, [])
 
   if (device == null) return <View />
  return (
    <View style={{ flex: 1 }}>
      <Camera
      ref={camera}
      style={styles.camera}
      device={device}
      isActive={true}
      orientation='portrait'
      photo={true}
      frameProcessorFps={5}
      frameProcessor={frameProcessor}
    />
       <Svg style={StyleSheet.absoluteFill}>
        <Defs>
          <Mask id="mask">
            <Rect x="0" y="0" width="100%" height="100%" fill="white" />
            <Ellipse
              cx="50%"
              cy="50%"
              rx="130"
              ry="180"
              fill="black"
            />
          </Mask>
        </Defs>
        <Rect x="0" y="0" width="100%" height="100%" fill="rgba(0, 0, 0, 0.6)" mask="url(#mask)" />
      </Svg>

      <View
        style={{
          alignItems: 'center',
          position: 'absolute',
          bottom: 0,
          width: '100%',
          paddingBottom: 70,
        }}
      >
       <TouchableOpacity style={styles.loginButton} onPress={takePicture} >
            <Text style={styles.buttonText}>Tomar</Text>
          </TouchableOpacity>
      </View>
    </View>
  )
};

What happened instead?

bug frame-processor/unavailable: Frame Processors are not enabled. See https://mrousavy.github.io/react-native-vision-camera/docs/guides/troubleshooting, js engine: hermes

Relevant log output

frame-processor/unavailable: Frame Processors are not enabled. See https://mrousavy.github.io/react-native-vision-camera/docs/guides/troubleshooting, js engine: hermes

Device

Physical Android Redmi

VisionCamera Version

^2.15.4

Additional information

@Salvasgdo Salvasgdo added the 🐛 bug Something isn't working label Jul 13, 2023
@Salvasgdo Salvasgdo changed the title 🐛 Trying to get face detector to work but frame processing is unavailable and are not enabled bug bugSomething isn't working 🐛 Trying to get face detector to work but frame processing is unavailable and are not enabled Jul 13, 2023
@dhruvv-lanatus
Copy link

I am also facing this issue. Have you found any solution?

@xgenem
Copy link

xgenem commented Aug 11, 2023

What a bummer...

@mrousavy
Copy link
Owner

Hey! I've rewritten the entire Android codebase of VisionCamera from CameraX to Camera2 in the efforts of ✨ VisionCamera V3.

I just now completed the Camera2 rewrite and I believe the core structure is running, but there might be some edge cases to iron out. Can you try and test the PR #1674 for me to see if you can still reproduce this issue here?

Here's an instruction on how you can test that: #1674 (comment)

If the issue cannot be reproduced with that version/PR anymore, then hoorayy, I fixed it! 🎉
Otherwise please let me know and I'll keep this issue open to keep track of it.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants