Describe the bug
This bug report is for iOS, but it may apply to Android or any device whose camera's orientation can be changed.
BlazePose sample only works in 1 specific orientation on the iPad and iPhone
-- If iOS Rotation Lock is Off, it works in landscape reverse (with the back camera on the right side).
-- The working orientation can differ if iOS Rotation Lock is On.
-- In the other 3 orientations, the pose flickers rapidly and the debug image view shows the image rapidly flipping upside-down.
Even when using the working orientation, the tracking breaks down as the tracked user moves to the side and goes outside of the red debug box (DrawCropMatrix).
If the user sets the iOS Rotation Lock to On, the Test Webcam Rotation scene does not work.
-- Rotation remains at 0 regardless of device orientation.
Expected behaviour
BlazePose sample should work regardless of device orientation
BlazePose + Test Webcam Rotation sample should work for all 4 orientations even if the iOS Rotation Lock setting is On
Additional context
Note that the Test Webcam Rotation scene is behaving correctly with Rotation Lock: Off
-- On iOS, the raw input is flipped vertically. The trimmed and resized inputs look correct for all device orientations.
Workaround
This workaround can be used to:
Get the sample to work on Landscape (back camera on the left side)
Fix the tracking breakdown as the tracked user moves to the side
Comment out these lines in Invoke() and InvokeAsync() methods in PoseLandmarkDetect.cs
Environment:
Describe the bug This bug report is for iOS, but it may apply to Android or any device whose camera's orientation can be changed.
DrawCropMatrix
).Expected behaviour
Additional context
Workaround This workaround can be used to:
Comment out these lines in
Invoke()
andInvokeAsync()
methods in PoseLandmarkDetect.cshttps://github.com/asus4/tf-lite-unity-sample/blob/928157b3ce81945fb53722099b22cf04bf3fcbfb/Assets/Samples/BlazePose/PoseLandmarkDetect.cs#L107-L109
https://github.com/asus4/tf-lite-unity-sample/blob/928157b3ce81945fb53722099b22cf04bf3fcbfb/Assets/Samples/BlazePose/PoseLandmarkDetect.cs#L133-L135