-
Notifications
You must be signed in to change notification settings - Fork 1k
Description
Hello there, I was trying to test out the example, with tensorflow for Pose detection.
The with-tfjs-camera example from the Expo examples repo is currently not working with the latest versions of Expo SDK and TensorFlow.js. Here are the details:
Problem
The example uses deprecated or incompatible code.
first issue I found was
TypeError: _expoCamera.Camera.useCameraPermissions is not a function (it is undefined)
for which I changed const [permission, requestPermission] = Camera.useCameraPermissions()
to const [permission, requestPermission] = Camera.requestCameraPermissionsAsync()
another Issue was
TypeError: Cannot read property 'Type' of undefined
fixed it by changing <CustomTensorCamera width={size.width} style={styles.camera} type={Camera.Constants.Type.back} onReady={onReady} autorender />
to
<CustomTensorCamera width={size.width} style={styles.camera} type={"back"} onReady={onReady} autorender />
Main problem is that the screen is black and unresponsive.
specially in apk or expo-go. In emulator the camera shows up but is unresponsive.
note: I changed const TensorCamera = cameraWithTensors(Camera);
to const TensorCamera = cameraWithTensors(CameraView);
according to latest docs.
Steps to Reproduce
Clone the repo and navigate to with-tfjs-camera.
Run npm install or yarn install.
Device: Physical (Android/iOS)
Is it possible to get latest working example? Any help will be appreciated. Thanks in advance :)