feat: handle all orientations when using vision camera#980
Merged
NorbertKlockiewicz merged 20 commits intomainfrom Mar 20, 2026
Merged
feat: handle all orientations when using vision camera#980NorbertKlockiewicz merged 20 commits intomainfrom
NorbertKlockiewicz merged 20 commits intomainfrom
Conversation
e022520 to
639cd9c
Compare
benITo47
reviewed
Mar 19, 2026
packages/react-native-executorch/common/rnexecutorch/utils/FrameTransform.cpp
Outdated
Show resolved
Hide resolved
packages/react-native-executorch/common/rnexecutorch/utils/FrameTransform.cpp
Outdated
Show resolved
Hide resolved
packages/react-native-executorch/common/rnexecutorch/utils/FrameTransform.cpp
Outdated
Show resolved
Hide resolved
packages/react-native-executorch/common/rnexecutorch/utils/FrameTransform.cpp
Outdated
Show resolved
Hide resolved
packages/react-native-executorch/src/controllers/BaseOCRController.ts
Outdated
Show resolved
Hide resolved
msluszniak
reviewed
Mar 19, 2026
...ive-executorch/common/rnexecutorch/models/semantic_segmentation/BaseSemanticSegmentation.cpp
Outdated
Show resolved
Hide resolved
packages/react-native-executorch/common/rnexecutorch/models/vertical_ocr/VerticalOCR.cpp
Show resolved
Hide resolved
packages/react-native-executorch/common/rnexecutorch/models/VisionModel.cpp
Outdated
Show resolved
Hide resolved
...ive-executorch/common/rnexecutorch/models/semantic_segmentation/BaseSemanticSegmentation.cpp
Outdated
Show resolved
Hide resolved
...ive-executorch/common/rnexecutorch/models/semantic_segmentation/BaseSemanticSegmentation.cpp
Outdated
Show resolved
Hide resolved
packages/react-native-executorch/common/rnexecutorch/utils/FrameProcessor.cpp
Outdated
Show resolved
Hide resolved
packages/react-native-executorch/common/rnexecutorch/utils/FrameProcessor.cpp
Outdated
Show resolved
Hide resolved
packages/react-native-executorch/common/rnexecutorch/utils/FrameTransform.h
Outdated
Show resolved
Hide resolved
f5be4f9 to
7bea029
Compare
This comment was marked as off-topic.
This comment was marked as off-topic.
benITo47
reviewed
Mar 20, 2026
benITo47
reviewed
Mar 20, 2026
packages/react-native-executorch/src/modules/computer_vision/VisionModule.ts
Show resolved
Hide resolved
benITo47
reviewed
Mar 20, 2026
packages/react-native-executorch/src/modules/computer_vision/VisionModule.ts
Show resolved
Hide resolved
msluszniak
approved these changes
Mar 20, 2026
Member
msluszniak
left a comment
There was a problem hiding this comment.
I had only physical android device, so someone needs to test it on iOS, but everything worked as expected.
Add comment explaining isMirrored property handling in VisionModule.
msluszniak
reviewed
Mar 20, 2026
packages/react-native-executorch/src/modules/computer_vision/VisionModule.ts
Outdated
Show resolved
Hide resolved
…isionModule.ts Co-authored-by: Mateusz Sluszniak <56299341+msluszniak@users.noreply.github.com>
benITo47
approved these changes
Mar 20, 2026
Contributor
benITo47
left a comment
There was a problem hiding this comment.
Tested on iOS - works seamlessly!
No more concerns from my side.
LGTM!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
FrameTransformutilities (rotateFrameForModel,inverseRotateBbox,inverseRotateMat,inverseRotatePoints) that pre-rotate camera frames so vision models always see upright images, then map results back to screen spaceisFrontCameraviaSynchronizable(worklet-compatible) instead of React props, with iOS front-camera 180° fix (#if __APPLE__guarded)Introduces a breaking change?
Type of change
Tested on
Testing instructions
Run computer vision example app, test all models (back/front camera), rotate the phone
Screenshots
Related issues
Checklist
Additional notes