question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[tfjs-react-native] CameraStream wrong orientation in landscape mode.

See original GitHub issue

To get help from the community, we encourage using Stack Overflow and the tensorflow.js tag.

TensorFlow.js version

    "@tensorflow/tfjs": "^1.5.2",
    "@tensorflow/tfjs-react-native": "^0.2.3",

Browser version

This is an issue with tensorflow for react native. react-native-cli: 2.0.1 react-native: 0.61.5

Describe the problem or feature request

The Camera Stream does not work well in landscape mode. The image is streamed/render in the wrong orientation/dimensions.

Code to reproduce the bug / link to feature request

In iOS set landscape mode in Xcode and use the TensorCamera as usual:

const TensorCamera = cameraWithTensors( ExpoCamera );

const Camera = () => {
	return (<TensorCamera
		style={{ flex: 1} }
		cameraTextureHeight={ 1920 }
		cameraTextureWidth={ 1080 }
		resizeDepth={ 3 }
		onReady={ handleCameraStream }
		autorender={ true }
	/>)
}

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
rthadurcommented, Nov 1, 2021

Please check the related PR https://github.com/tensorflow/tfjs/pull/3041#issuecomment-953312177 , @jinjingforever is working on fix for it. Thank you

0reactions
google-ml-butler[bot]commented, Nov 3, 2021

Are you satisfied with the resolution of your issue? Yes No

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fixing orientation problems on react-native ... - MitrahSoft Blog
from 'react-native-camera'; After importing the initial step which needs to be done is, locking the orientation of the particular page or component to...
Read more >
Making predictions on live video feed using React Native and ...
I want my camera to understand model in real time just like face detection, barcode scanner. Main.js import React, {useRef, useEffect, useState} ...
Read more >
React native ‌orientation‌ locker and ‌landscape‌ orientation
How to add full-screen React Native video player with landscape orientation, using a new library called React Native Orientation Locker.
Read more >
tf.io.RequestDetails - TensorFlow.js React Native API
This component provides options that can be used to render the camera preview. Notably the component allows on-the-fly resizing of the camera image...
Read more >
npm - Snyk
... @tensorflow/tfjs-layers · @tensorflow/tfjs-node · @thegrizzlylabs/cordova-plugin-genius-scan · @throw-out-error/minecraft-datapack · @tippy.js/react ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found