Save tensors from react-native cameraWithTensors api to jpeg
See original GitHub issuePlease make sure that this is a feature request. As per our GitHub Policy, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:feature_template
System information
-
TensorFlow.js version (you are using):
“@tensorflow/tfjs”: “2.0.0”, “@tensorflow/tfjs-backend-webgl”: “2.0.0”, “@tensorflow/tfjs-core”: “2.0.0”, “@tensorflow/tfjs-react-native”: “0.3.0”,
-
Are you willing to contribute it (Yes/No): Yes
Describe the feature and the current behavior/state.
Currently when using the cameraWithTensor
HOC one can handle directly the underlying tensor to make e.g. real-time prediction. It would be nice to be able to store the stream of tensors as jpeg or video for instance for later use or visualization.
I have created a repo to showcase my currently unsuccessful attempts: https://github.com/ClementWalter/tfjs-expo-example
Will this change the current api? How?
Who will benefit with this feature?
Any Other info.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:7 (1 by maintainers)
Top GitHub Comments
yes! actually if you go to https://github.com/ClementWalter/tfjs-expo-example/blob/master/utils.js the function does the job. I will try to push it as a contrib to tfjs-react-native very soon. However, as I have said above, I don’t really understand the magic numbers used for width and height in the
cameraWithTensor
module.I’m assuming it depends on the device. you can actually get the device available picture sizes. take a look at expo-camera docs. when I’m changing the dimensions according to the results, I’m getting better capture proportions.