Add 6DRepNet head pose estimation sample (CompiledModel GPU) - #211
Open
john-rocky wants to merge 5 commits into
Open
Add 6DRepNet head pose estimation sample (CompiledModel GPU)#211john-rocky wants to merge 5 commits into
john-rocky wants to merge 5 commits into
Conversation
6DRepNet (thohemp/6DRepNet, ICIP 2022, MIT) regresses a continuous 6D rotation from a face crop — yaw/pitch/roll for driver-monitoring, AR, and attention — running fully on the LiteRT CompiledModel GPU at ~21 ms/frame on a Pixel 8a. First head-pose sample. Deploy-mode RepVGG (re-parameterized to plain convs) is a pure CNN → fully GPU-compatible (36/36 nodes, 1 partition; device corr 0.9993) with zero patches. The 6D -> Gram-Schmidt rotation matrix -> Euler decode runs host-side. CPU-exact vs PyTorch (corr 1.0). Input [1,3,224,224] RGB ImageNet-norm face crop, output [1,6]. Sample at compiled_model_api/head_pose_estimation/sixdrepnet_kotlin_gpu (android app + conversion scripts), with a deterministic bundled-face 3D-axes demo.
… conversion script, copyright 2026
Wrap every line in the conversion scripts to the 80-column limit of the Google Python Style Guide and add Args/Returns sections to the module-level function docstrings. No behavior changes.
Restructure the app to the image_segmentation reference: a thin ComponentActivity host over a MainViewModel + immutable UiState, UI strings moved to res/values, a Gradle version catalog, and status-bar inset padding. Inference/model code is unchanged.
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.
6DRepNet (ICIP 2022, MIT) regresses a continuous 6D rotation from a face crop — yaw / pitch / roll for driver-monitoring, AR, and attention — running fully on the LiteRT
CompiledModelGPU at ~21 ms/frame on a Pixel 8a. The first head-pose sample.Deploy-mode RepVGG (re-parameterized to plain 3×3 convs + ReLU) is a pure CNN → fully GPU-compatible (36/36 nodes on the delegate, 1 partition; device corr 0.9993) with zero patches. The 6D → Gram-Schmidt rotation matrix → Euler decode runs host-side. CPU-exact vs PyTorch (corr 1.0). Input
[1,3,224,224]RGB ImageNet-norm face crop, output[1,6].Model: litert-community/6DRepNet-HeadPose-LiteRT.
Sample at
compiled_model_api/head_pose_estimation/sixdrepnet_kotlin_gpu(android app + conversion scripts), with a deterministic bundled-face 3D-axes demo.