homuler / MediaPipeUnityPlugin

Unity plugin to run MediaPipe
MIT License
1.71k stars 445 forks source link

Using MediaPipe v0.13.1 - ArFoundation with MediaPipe works in the Editor but not on Android #1118

Closed ShonubiSamuel closed 5 months ago

ShonubiSamuel commented 6 months ago

Plugin Version or Commit ID

v0.13.1

Unity Version

2022.3.4f1

Your Host OS

macOS Ventura 13.6.1

Target Platform

Android

Description

(Just in case, please note: This current issue is a bit different from the one I had in v0.12.0.) After struggling with v0.12.0, I switched to v0.13.1, which is a lot better because the Official Solution Project (from the Getting Started page) works πŸ˜…. Thanks for the new update.

So, I was able to modify the Official Solution Project to work with AR Foundation and tested it in the editor with my phone using "AR Foundation Remote 2," which works well without errors. However, when I tried out the build on my Android phone, it crashes my phone.

I tried running the Android logcat, I saw something like πŸ‘‡ (Note: The full version is still far down below):

 calculator_graph.cc:142] Non-OK-status: Initialize(std::move(config)) status: NOT_FOUND: ValidatedGraphConfig Initialization failed.
No registered object with name: FaceLandmarkFrontCpu; Unable to find Calculator "FaceLandmarkFrontCpu"
No registered object with name: FaceRendererCpu; Unable to find Calculator "FaceRendererCpu"
terminating.
calculator_graph.cc:142] Non-OK-status: Initialize(std::move(config)) status: NOT_FOUND: ValidatedGraphConfig Initialization failed.
No registered object with name: FaceLandmarkFrontCpu; Unable to find Calculator "FaceLandmarkFrontCpu"
No registered object with name: FaceRendererCpu; Unable to find Calculator "FaceRendererCpu"
terminating.
calculator_graph.cc:25] Aborted
MediaPipeException: MediaPipe Aborted, refer glog files for more details

Code to Reproduce the issue

using System;
using System.Collections;
using Unity.Collections;
using Unity.Collections.LowLevel.Unsafe;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.XR.ARFoundation;
using UnityEngine.XR.ARSubsystems;

using Stopwatch = System.Diagnostics.Stopwatch;

namespace Mediapipe.Unity.Tutorial
{
  public class FaceMesh : MonoBehaviour
  {
    [SerializeField] private ARCameraManager _cameraManager;
    [SerializeField] private TextAsset _configAsset;
    [SerializeField] private RawImage _screen;
    private int _width;
    private int _height;
    private int _fps = 30;
    [SerializeField] private MultiFaceLandmarkListAnnotationController _multiFaceLandmarksAnnotationController;

    private CalculatorGraph _graph;
    private OutputStream _multiFaceLandmarksStream;
    private ResourceManager _resourceManager;
    private NativeArray<byte> _buffer;
    private Texture2D _texture;

    private IEnumerator Start()
    {
      _cameraManager.frameReceived += OnCameraFrameReceived;

      yield return new WaitUntil(() => _texture != null);

      _width = _texture.width;
      _height = _texture.height;

      _screen.rectTransform.sizeDelta = new Vector2(_width, _height);

      _resourceManager = new StreamingAssetsResourceManager();
      yield return _resourceManager.PrepareAssetAsync("face_detection_short_range.bytes");
      yield return _resourceManager.PrepareAssetAsync("face_landmark_with_attention.bytes");

      var stopwatch = new Stopwatch();

      _graph = new CalculatorGraph(_configAsset.text);
      _multiFaceLandmarksStream = new OutputStream(_graph, "multi_face_landmarks");
      _multiFaceLandmarksStream.StartPolling();
      _graph.StartRun();
      stopwatch.Start();

      var screenRect = _screen.GetComponent<RectTransform>().rect;

      while (true)
      {
        var imageFrame = new ImageFrame(ImageFormat.Types.Format.Srgba, _width, _height, _width * 4, _buffer);
        var currentTimestamp = stopwatch.ElapsedTicks / (System.TimeSpan.TicksPerMillisecond / 1000);
        _graph.AddPacketToInputStream("input_video", Packet.CreateImageFrameAt(imageFrame, currentTimestamp));

        var task = _multiFaceLandmarksStream.WaitNextAsync();

        yield return new WaitUntil(() => task.IsCompleted);
        var result = task.Result;

        if (!result.ok)
        {
          throw new Exception("Something went wrong");
        }

        var multiFaceLandmarksPacket = result.packet;
        if (multiFaceLandmarksPacket != null)
        {
          var multiFaceLandmarks = multiFaceLandmarksPacket.GetProtoList(NormalizedLandmarkList.Parser);

          _multiFaceLandmarksAnnotationController.DrawNow(multiFaceLandmarks);
        }
        else
        {
          _multiFaceLandmarksAnnotationController.DrawNow(null);
        }
      }
    }

    private unsafe void OnCameraFrameReceived(ARCameraFrameEventArgs eventArgs)
    {
      if (_cameraManager.TryAcquireLatestCpuImage(out var image))
      {
        InitBuffer(image);

        var conversionParams = new XRCpuImage.ConversionParams(image, TextureFormat.RGBA32);
        var ptr = (IntPtr)NativeArrayUnsafeUtility.GetUnsafePtr(_buffer);
        image.Convert(conversionParams, ptr, _buffer.Length);

         _texture = new Texture2D(image.width, image.height, TextureFormat.RGBA32, false);
        _texture.LoadRawTextureData(_buffer.ToArray());
        _texture.Apply();

        _screen.texture = _texture;

        image.Dispose();

      }
    }

    private void InitBuffer(XRCpuImage image)
    {
      var length = image.width * image.height * 4;
      if (_buffer == null || _buffer.Length != length)
      {
        _buffer = new NativeArray<byte>(length, Allocator.Persistent, NativeArrayOptions.UninitializedMemory);
      }
    }

    private void OnDestroy()
    {

      _multiFaceLandmarksStream?.Dispose();
      _multiFaceLandmarksStream = null;

      if (_graph != null)
      {
        try
        {
          _graph.CloseInputStream("input_video");
          _graph.WaitUntilDone();
        }
        finally
        {
          _graph.Dispose();
          _graph = null;
        }

        _buffer.Dispose();
      }
    }
  }
}

Additional Context

I ran a logcat using adb -s [device_id] logcat Unity:V native:V tflite:V CRASH:E AndroidRuntime:E "*:S" so i copied out what i felt was the main log:

 01-07 20:50:49.047 25893 25983 F native  : F0000 00:00:1704657049.046963   25983 calculator_graph.cc:142] Non-OK-status: Initialize(std::move(config)) status: NOT_FOUND: ValidatedGraphConfig Initialization failed.
01-07 20:50:49.047 25893 25983 F native  : No registered object with name: FaceLandmarkFrontCpu; Unable to find Calculator "FaceLandmarkFrontCpu"
01-07 20:50:49.047 25893 25983 F native  : No registered object with name: FaceRendererCpu; Unable to find Calculator "FaceRendererCpu"
01-07 20:50:49.048 25893 25983 F native  : terminating.
01-07 20:50:49.048 25893 25983 F native  : F0000 00:00:1704657049.046963   25983 calculator_graph.cc:142] Non-OK-status: Initialize(std::move(config)) status: NOT_FOUND: ValidatedGraphConfig Initialization failed.
01-07 20:50:49.048 25893 25983 F native  : No registered object with name: FaceLandmarkFrontCpu; Unable to find Calculator "FaceLandmarkFrontCpu"
01-07 20:50:49.048 25893 25983 F native  : No registered object with name: FaceRendererCpu; Unable to find Calculator "FaceRendererCpu"
01-07 20:50:49.048 25893 25983 F native  : terminating.
01-07 20:50:49.053 25893 25983 E native  : E20240107 20:50:49.048084 25983 calculator_graph.cc:25] Aborted
01-07 20:50:49.080 25893 25983 E Unity   : MediaPipeException: MediaPipe Aborted, refer glog files for more details
01-07 20:50:49.080 25893 25983 E Unity   :   at Mediapipe.MpReturnCodeExtension.Assert (Mediapipe.MpReturnCode code) [0x00000] in <00000000000000000000000000000000>:0 
01-07 20:50:49.080 25893 25983 E Unity   :   at Mediapipe.CalculatorGraph..ctor (System.Byte[] serializedConfig) [0x00000] in <00000000000000000000000000000000>:0 
01-07 20:50:49.080 25893 25983 E Unity   :   at Mediapipe.CalculatorGraph..ctor (Mediapipe.CalculatorGraphConfig config) [0x00000] in <00000000000000000000000000000000>:0 
01-07 20:50:49.080 25893 25983 E Unity   :   at Mediapipe.CalculatorGraph..ctor (System.String textFormatConfig) [0x00000] in <00000000000000000000000000000000>:0 
01-07 20:50:49.080 25893 25983 E Unity   :   at Mediapipe.Unity.Tutorial.FaceMesh+<Start>d__11.MoveNext () [0x00000] in <00000000000000000000000000000000>:0 
01-07 20:50:49.080 25893 25983 E Unity   :   at UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) [0x00000] in <00000000000000000000000000000000>:0 
01-07 20:50:49.080 25893 25983 E Unity   : 
01-07 20:50:49.109 25893 25983 I native  : I0000 00:00:1704657049.109739   25983 session_manager.cc:329] ArPresto::Moving from ArPrestoStatus 101 to 100
01-07 20:50:51.794 25893 26198 I native  : I0000 00:00:1704657051.794587   26198 viwls_helper.cc:214] Skip Lite-COM due to a significant calibration change.

But here is the full log:

Last login: Sun Jan  7 20:48:07 on ttys001
user@MACs-MacBook-Pro platform-tools % adb -s 1026d3710408 logcat Unity:V native:V tflite:V CRASH:E AndroidRuntime:E "*:S"
--------- beginning of main
01-07 20:49:37.592  3459  5528 I native  : I0000 00:00:1704656977.592588    5528 soda_async_impl.cc:1545] Current audio timestamp: 1704656977401761
01-07 20:50:07.593  3459  5528 I native  : I0000 00:00:1704657007.593279    5528 soda_async_impl.cc:1545] Current audio timestamp: 1704657007401761
01-07 20:50:37.593  3459  5528 I native  : I0000 00:00:1704657037.593619    5528 soda_async_impl.cc:1545] Current audio timestamp: 1704657037401761
01-07 20:50:38.417 25893 25893 D Unity   : CommandLine:  
01-07 20:50:38.456 25893 25893 D Unity   : onActivityResumed: com.unity3d.player.UnityPlayerActivity@8b36e0a
01-07 20:50:38.458 25893 25893 I Unity   : onResume
01-07 20:50:38.618 25893 25983 D Unity   : SetWindow 0 0xb40000708552b010
01-07 20:50:38.620 25893 25983 D Unity   : SetWindow 0 0xb40000708552b010
01-07 20:50:38.663 25893 25893 I Unity   : windowFocusChanged: true
01-07 20:50:38.682 25893 25983 I Unity   : MemoryManager: Using 'Dynamic Heap' Allocator.
01-07 20:50:38.683 25893 25983 D Unity   : [UnityMemory] Configuration Parameters - Can be set up in boot.config
01-07 20:50:38.683 25893 25983 D Unity   :     "memorysetup-allocator-temp-initial-block-size-main=262144"
01-07 20:50:38.683 25893 25983 D Unity   :     "memorysetup-allocator-temp-initial-block-size-worker=262144"
01-07 20:50:38.683 25893 25983 D Unity   :     "memorysetup-bucket-allocator-granularity=16"
01-07 20:50:38.683 25893 25983 D Unity   :     "memorysetup-bucket-allocator-bucket-count=8"
01-07 20:50:38.683 25893 25983 D Unity   :     "memorysetup-bucket-allocator-block-size=4194304"
01-07 20:50:38.683 25893 25983 D Unity   :     "memorysetup-bucket-allocator-block-count=1"
01-07 20:50:38.683 25893 25983 D Unity   :     "memorysetup-main-allocator-block-size=16777216"
01-07 20:50:38.683 25893 25983 D Unity   :     "memorysetup-thread-allocator-block-size=16777216"
01-07 20:50:38.683 25893 25983 D Unity   :     "memorysetup-gfx-main-allocator-block-size=16777216"
01-07 20:50:38.683 25893 25983 D Unity   :     "memorysetup-gfx-thread-allocator-block-size=16777216"
01-07 20:50:38.683 25893 25983 D Unity   :     "memorysetup-cache-allocator-block-size=4194304"
01-07 20:50:38.683 25893 25983 D Unity   :     "memorysetup-typetree-allocator-block-size=2097152"
01-07 20:50:38.683 25893 25983 D Unity   :     "memorysetup-profiler-bucket-allocator-granularity=16"
01-07 20:50:38.683 25893 25983 D Unity   :     "memorysetup-profiler-bucket-allocator-bucket-count=8"
01-07 20:50:38.683 25893 25983 D Unity   :     "memorysetup-profiler-bucket-allocator-block-size=4194304"
01-07 20:50:38.683 25893 25983 D Unity   :     "memorysetup-profiler-bucket-allocator-block-count=1"
01-07 20:50:38.683 25893 25983 D Unity   :     "memorysetup-profiler-allocator-block-size=16777216"
01-07 20:50:38.683 25893 25983 D Unity   :     "memorysetup-profiler-editor-allocator-block-size=1048576"
01-07 20:50:38.683 25893 25983 D Unity   :     "memorysetup-temp-allocator-size-main=4194304"
01-07 20:50:38.683 25893 25983 D Unity   :     "memorysetup-job-temp-allocator-block-size=2097152"
01-07 20:50:38.683 25893 25983 D Unity   :     "memorysetup-job-temp-allocator-block-size-background=1048576"
01-07 20:50:38.683 25893 25983 D Unity   :     "memorysetup-job-temp-allocator-reduction-small-platforms=262144"
01-07 20:50:38.683 25893 25983 D Unity   :     "memorysetup-temp-allocator-size-background-worker=32768"
01-07 20:50:38.683 25893 25983 D Unity   :     "memorysetup-temp-allocator-size-job-worker=262144"
01-07 20:50:38.683 25893 25983 D Unity   :     "memorysetup-temp-allocator-size-preload-manager=262144"
01-07 20:50:38.683 25893 25983 D Unity   :     "memorysetup-temp-allocator-size-nav-mesh-worker=65536"
01-07 20:50:38.683 25893 25983 D Unity   :     "memorysetup-temp-allocator-size-audio-worker=65536"
01-07 20:50:38.683 25893 25983 D Unity   :     "memorysetup-temp-allocator-size-cloud-worker=32768"
01-07 20:50:38.683 25893 25983 D Unity   :     "memorysetup-temp-allocator-size-gfx=262144"
01-07 20:50:38.715 25893 25983 D Unity   : Enabling Unity systrace
01-07 20:50:38.774 25893 25983 D Unity   : [VFS] Mount /data/app/~~T4bCPE_sOJanVuWYTNoxuA==/com.DefaultCompany.MediaPipeUnityPlugin-BoYN-MbnQZjx03RjYK54Ww==/base.apk
01-07 20:50:38.789 25893 25983 D Unity   : Loading player data from /data/app/~~T4bCPE_sOJanVuWYTNoxuA==/com.DefaultCompany.MediaPipeUnityPlugin-BoYN-MbnQZjx03RjYK54Ww==/base.apk/assets/bin/Data/data.unity3d
01-07 20:50:38.809 25893 25983 I Unity   : SystemInfo CPU = ARM64 FP ASIMD AES, Cores = 8, Memory = 3701mb
01-07 20:50:38.809 25893 25983 I Unity   : SystemInfo ARM big.LITTLE configuration: 2 big (mask: 0xc0), 6 little (mask: 0x3f)
01-07 20:50:38.810 25893 25983 I Unity   : ApplicationInfo com.DefaultCompany.MediaPipeUnityPlugin version 0.1
01-07 20:50:38.810 25893 25983 I Unity   : Built from '2022.3/staging' branch, Version '2022.3.4f1 (35713cd46cd7)', Build type 'Development', Scripting Backend 'il2cpp', CPU 'arm64-v8a', Stripping 'Enabled'
01-07 20:50:38.812 25893 25983 D Unity   : Extracting il2cpp resources.
01-07 20:50:38.894 25893 25983 D Unity   : Found 2 interfaces on host :
01-07 20:50:38.894 25893 25983 D Unity   :  0) 10.139.147.88
01-07 20:50:38.894 25893 25983 D Unity   :  1) 192.168.118.40
01-07 20:50:38.894 25893 25983 D Unity   : 
01-07 20:50:38.899 25893 25983 D Unity   : Multi-casting "[IP] 10.139.147.88 [Port] 55000 [Flags] 19 [Guid] 1498621856 [EditorId] 3933878623 [Version] 1048832 [Id] AndroidPlayer(11,Xiaomi_M2003J15SC@10.139.147.88) [Debug] 0 [PackageName] AndroidPlayer [ProjectName] MediaPipeUnityPlugin" to [225.0.0.222:54997]...
01-07 20:50:39.198 25893 25983 D Unity   : [EGL] Attaching window :0xb40000708552b010
01-07 20:50:39.199 25893 25983 D Unity   : InitializeScriptEngine OK (0x70a28e6fc0)
01-07 20:50:39.233 25893 25983 D Unity   : Loading player data from assets/bin/Data/data.unity3d
01-07 20:50:39.235 25893 25983 D Unity   : PlayerInitEngineNoGraphics OK
01-07 20:50:39.235 25893 25983 I Unity   : Company Name: DefaultCompany
01-07 20:50:39.235 25893 25983 I Unity   : Product Name: MediaPipeUnityPlugin
01-07 20:50:39.235 25893 25983 D Unity   : AndroidGraphics::Startup window =  0xb40000708552b010
01-07 20:50:39.235 25893 25983 D Unity   : [EGL] Attaching window :0xb40000708552b010
01-07 20:50:39.240 25893 25983 D Unity   : [Subsystems] Discovering subsystems at path /data/app/~~T4bCPE_sOJanVuWYTNoxuA==/com.DefaultCompany.MediaPipeUnityPlugin-BoYN-MbnQZjx03RjYK54Ww==/base.apk/assets/bin/Data/UnitySubsystems
01-07 20:50:39.240 25893 25983 D Unity   : [Subsystems] No descriptors matched for  examples in /data/app/~~T4bCPE_sOJanVuWYTNoxuA==/com.DefaultCompany.MediaPipeUnityPlugin-BoYN-MbnQZjx03RjYK54Ww==/base.apk/assets/bin/Data/UnitySubsystems/UnityARCore/UnitySubsystemsManifest.json.
01-07 20:50:39.241 25893 25983 D Unity   : [Subsystems] 1 'inputs' descriptors matched in /data/app/~~T4bCPE_sOJanVuWYTNoxuA==/com.DefaultCompany.MediaPipeUnityPlugin-BoYN-MbnQZjx03RjYK54Ww==/base.apk/assets/bin/Data/UnitySubsystems/UnityARCore/UnitySubsystemsManifest.json
01-07 20:50:39.241 25893 25983 D Unity   : [Subsystems] No descriptors matched for  displays in /data/app/~~T4bCPE_sOJanVuWYTNoxuA==/com.DefaultCompany.MediaPipeUnityPlugin-BoYN-MbnQZjx03RjYK54Ww==/base.apk/assets/bin/Data/UnitySubsystems/UnityARCore/UnitySubsystemsManifest.json.
01-07 20:50:39.241 25893 25983 D Unity   : [Subsystems] No descriptors matched for  meshings in /data/app/~~T4bCPE_sOJanVuWYTNoxuA==/com.DefaultCompany.MediaPipeUnityPlugin-BoYN-MbnQZjx03RjYK54Ww==/base.apk/assets/bin/Data/UnitySubsystems/UnityARCore/UnitySubsystemsManifest.json.
01-07 20:50:39.262 25893 25983 D Unity   : [EGL] Request: ES 3.2 RGB 000 0/0
01-07 20:50:39.263 25893 25983 D Unity   : [EGL] Checking ES 3.2 support...
01-07 20:50:39.264 25893 25983 D Unity   : [EGL] ES 3.2 support detected
01-07 20:50:39.264 25893 25983 D Unity   : [EGL] Found: ID[5] ES 3.2 RGB 565 0/0
01-07 20:50:39.264 25893 25983 D Unity   : GfxDevice: creating device client; threaded=1; jobified=0
01-07 20:50:39.265 25893 25983 D Unity   : [EGL] Request: ES 3.2 RGB 000 0/0
01-07 20:50:39.265 25893 25983 D Unity   : [EGL] Found: ID[5] ES 3.2 RGB 565 0/0
01-07 20:50:39.265 25893 25983 D Unity   : [EGL] Request: ES 3.0 RGBA 8888 0/0
01-07 20:50:39.265 25893 25983 D Unity   : [EGL] Found: ID[1] ES 3.0 RGBA 8888 0/0
01-07 20:50:39.268 25893 25983 D Unity   : ANativeWindow: (1080/2340) RequestedResolution: (0/0) RenderingResolution: (0/0) EGLSurface: (1080/2340)
01-07 20:50:39.271 25893 25983 D Unity   : Renderer: Mali-G52
01-07 20:50:39.271 25893 25983 D Unity   : Vendor:   ARM
01-07 20:50:39.271 25893 25983 D Unity   : Version:  OpenGL ES 3.2 v1.r26p0-01eac0.455662e55e7c7fb95a4b1db7e7af49a8
01-07 20:50:39.271 25893 25983 D Unity   : GLES:     3
01-07 20:50:39.271 25893 25983 D Unity   :  GL_EXT_debug_marker GL_ARM_rgba8 GL_ARM_mali_shader_binary GL_OES_depth24 GL_OES_depth_texture GL_OES_depth_texture_cube_map GL_OES_packed_depth_stencil GL_OES_rgb8_rgba8 GL_EXT_read_format_bgra GL_OES_compressed_paletted_texture GL_OES_compressed_ETC1_RGB8_texture GL_OES_standard_derivatives GL_OES_EGL_image GL_OES_EGL_image_external GL_OES_EGL_image_external_essl3 GL_OES_EGL_sync GL_OES_texture_npot GL_OES_vertex_half_float GL_OES_required_internalformat GL_OES_vertex_array_object GL_OES_mapbuffer GL_EXT_texture_format_BGRA8888 GL_EXT_texture_rg GL_EXT_texture_type_2_10_10_10_REV GL_OES_fbo_render_mipmap GL_OES_element_index_uint GL_EXT_shadow_samplers GL_OES_texture_compression_astc GL_KHR_texture_compression_astc_ldr GL_KHR_texture_compression_astc_hdr GL_KHR_texture_compression_astc_sliced_3d GL_EXT_texture_compression_astc_decode_mode GL_EXT_texture_compression_astc_decode_mode_rgb9e5 GL_KHR_debug GL_EXT_occlusion_query_boolean GL_EXT_disjoint_timer_query GL_EXT_blend_minmax GL_EXT_discard_framebuffer
01-07 20:50:39.271 25893 25983 D Unity   :  GL_OES_get_program_binary GL_OES_texture_3D GL_EXT_texture_storage GL_EXT_multisampled_render_to_texture GL_EXT_multisampled_render_to_texture2 GL_OES_surfaceless_context GL_OES_texture_stencil8 GL_EXT_shader_pixel_local_storage GL_ARM_shader_framebuffer_fetch GL_ARM_shader_framebuffer_fetch_depth_stencil GL_ARM_mali_program_binary GL_EXT_sRGB GL_EXT_sRGB_write_control GL_EXT_texture_sRGB_decode GL_EXT_texture_sRGB_R8 GL_EXT_texture_sRGB_RG8 GL_KHR_blend_equation_advanced GL_KHR_blend_equation_advanced_coherent GL_OES_texture_storage_multisample_2d_array GL_OES_shader_image_atomic GL_EXT_robustness GL_EXT_draw_buffers_indexed GL_OES_draw_buffers_indexed GL_EXT_texture_border_clamp GL_OES_texture_border_clamp GL_EXT_texture_cube_map_array GL_OES_texture_cube_map_array GL_OES_sample_variables GL_OES_sample_shading GL_OES_shader_multisample_interpolation GL_EXT_shader_io_blocks GL_OES_shader_io_blocks GL_EXT_tessellation_shader GL_OES_tessellation_shader GL_EXT_primitive_bounding_box GL_OES_primitive_bounding_
01-07 20:50:39.271 25893 25983 D Unity   : box GL_EXT_geometry_shader GL_OES_geometry_shader GL_ANDROID_extension_pack_es31a GL_EXT_gpu_shader5 GL_OES_gpu_shader5 GL_EXT_texture_buffer GL_OES_texture_buffer GL_EXT_copy_image GL_OES_copy_image GL_EXT_shader_non_constant_global_initializers GL_EXT_color_buffer_half_float GL_EXT_color_buffer_float GL_EXT_YUV_target GL_OVR_multiview GL_OVR_multiview2 GL_OVR_multiview_multisampled_render_to_texture GL_KHR_robustness GL_KHR_robust_buffer_access_behavior GL_EXT_draw_elements_base_vertex GL_OES_draw_elements_base_vertex GL_EXT_protected_textures GL_EXT_buffer_storage GL_EXT_external_buffer GL_EXT_EGL_image_array GL_EXT_texture_filter_anisotropic GL_ARM_texture_unnormalized_coordinates
01-07 20:50:39.281 25893 25983 D Unity   : OPENGL LOG: Creating OpenGL ES 3.2 graphics device ; Context level  <OpenGL ES 3.2> ; Context handle -1816073856
01-07 20:50:39.283 25893 25983 D Unity   : [EGL] Attaching window :0xb40000708552b010
01-07 20:50:39.287 25893 25983 D Unity   : Requested framebuffer: resolution[1080x2340], rgba[8/8/8/8], depth+stencil[on], samples[1]
01-07 20:50:39.288 25893 25983 D Unity   : Created framebuffer: resolution[1080x2340], rgba[8/8/8/8], depth+stencil[24/8], samples[0] 
01-07 20:50:39.288 25893 25983 D Unity   : [EGL] Attaching window :0xb40000708552b010
01-07 20:50:39.288 25893 25983 D Unity   : Initialize engine version: 2022.3.4f1 (35713cd46cd7)
01-07 20:50:39.550 25893 25983 W Unity   : The referenced script (Unknown) on this Behaviour is missing!
01-07 20:50:39.551 25893 25983 W Unity   : The referenced script on this Behaviour (Game Object '<null>') is missing!
01-07 20:50:39.570 25893 25983 I Unity   : XRGeneral Settings awakening...
01-07 20:50:39.570 25893 25983 I Unity   : UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
01-07 20:50:39.570 25893 25983 I Unity   : UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
01-07 20:50:39.570 25893 25983 I Unity   : UnityEngine.Logger:Log(LogType, Object)
01-07 20:50:39.570 25893 25983 I Unity   : UnityEngine.Debug:Log(Object)
01-07 20:50:39.570 25893 25983 I Unity   : UnityEngine.XR.Management.XRGeneralSettings:Awake()
01-07 20:50:39.570 25893 25983 I Unity   : 
01-07 20:50:39.829 25893 25983 D Unity   : Failed to load native plugin: Unable to lookup library path for '_burst_0_0'.
01-07 20:50:39.866 25893 25983 I native  : I0000 00:00:1704657039.866629   25983 arpresto_api.cc:34] ArPresto::ArPresto_initialize
01-07 20:50:39.868 25893 25983 D Unity   : [Subsystems] UnityARCore successfully registered Provider for ARCore-Input
01-07 20:50:39.887 25893 25983 D Unity   : [Subsystems] Loading plugin UnityARCore for subsystem ARCore-Input...
01-07 20:50:39.905 25893 25983 D Unity   : PlayerInitEngineGraphics OK
01-07 20:50:39.907 25893 25983 D Unity   : New input system (experimental) initialized
01-07 20:50:39.919 25893 25983 D Unity   : Found 22 native sensors
01-07 20:50:39.924 25893 25983 D Unity   : Sensor :        Accelerometer ( 1) ; 0.001200 / 0.00s ; ACCELEROMETER / icm4x6xx_acc 
01-07 20:50:39.925 25893 25983 D Unity   : Sensor :        Accelerometer ( 1) ; 0.001200 / 0.00s ; ACCELEROMETER / icm4x6xx_acc 
01-07 20:50:39.929 25893 25983 D Unity   : SetWindow 0 0xb40000708552b010
01-07 20:50:39.929 25893 25983 D Unity   : [EGL] Attaching window :0xb40000708552b010
01-07 20:50:39.931 25893 25983 D Unity   : ANativeWindow: (1080/2340) RequestedResolution: (0/0) RenderingResolution: (0/0) EGLSurface: (1080/2340)
01-07 20:50:42.001 25893 25983 D Unity   : UnloadTime: 1.388923 ms
01-07 20:50:42.451 25893 25983 I native  : I0000 00:00:1704657042.451064   25983 arpresto_api.cc:107] ArPresto::ArPresto_checkApkAvailability
01-07 20:50:42.539 25893 25983 I native  : I0000 00:00:1704657042.539760   25983 arpresto_api.cc:66] ArPresto::ArPresto_handleActivityResume
01-07 20:50:42.564 25893 25983 D Unity   : Sensor :        Accelerometer ( 1) ; 0.001200 / 0.00s ; ACCELEROMETER / icm4x6xx_acc 
01-07 20:50:42.565 25893 25983 D Unity   : Choreographer available: Enabling VSYNC timing
01-07 20:50:43.389 26057 26087 I native  : I0000 00:00:1704657043.389423   26087 device_profile_database_helpers.cc:569] Found nothing for V5bxAW
01-07 20:50:43.389 26057 26087 I native  : I0000 00:00:1704657043.389573   26087 device_profile_database_helpers.cc:569] Found nothing for merlin_global/merlin
01-07 20:50:43.389 26057 26087 I native  : I0000 00:00:1704657043.389585   26087 device_profile_database_helpers.cc:556] Considering kagnIF:10
01-07 20:50:43.389 26057 26087 I native  : I0000 00:00:1704657043.389619   26087 device_profile_database_helpers.cc:515] Device profile for Redmi/merlin_global/merlin:12/SP1A.210812.016/V13.0.2.0.SJOMIXM:user/release-keys: kagnIF:10
01-07 20:50:43.403 25893 25983 I native  : I0000 00:00:1704657043.403654   25983 arpresto_api.cc:173] ArPresto::ArPresto_setCameraTextureNames
01-07 20:50:43.403 25893 25983 I native  : I0000 00:00:1704657043.403813   25983 arpresto_api.cc:192] ArPresto::ArPresto_setEnabled
01-07 20:50:43.692 25893 25983 I Unity   : Configuration Descriptor 0x1 (rank 1): World Facing Camera, Rotation and Orientation, Plane Tracking, Image Tracking, Auto-Focus, Light Estimation (Ambient Intensity), Light Estimation (Ambient Color), Raycast, Environment Depth, Environment Depth Temporal Smoothing
01-07 20:50:43.692 25893 25983 I Unity   : Configuration Descriptor 0x2 (rank 0): World Facing Camera, Rotation and Orientation, Plane Tracking, Image Tracking, Environment Probes, Auto-Focus, Light Estimation (Spherical Harmonics), Light Estimation (Main Light Direction), Light Estimation (Main Light Intensity), Raycast, Environment Depth, Environment Depth Temporal Smoothing
01-07 20:50:43.692 25893 25983 I Unity   : Configuration Descriptor 0x3 (rank 2): User Facing Camera, Rotation Only, Face Tracking, Auto-Focus, Light Estimation (Ambient Intensity), Light Estimation (Ambient Color)
01-07 20:50:43.692 25893 25983 I Unity   : UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
01-07 20:50:43.692 25893 25983 I Unity   : UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
01-07 20:50:43.692 25893 25983 I Unity   : UnityEngine.Logger:Log(LogType, Object)
01-07 20:50:43.692 25893 25983 I Unity   : UnityEngine.Debug:Log(Object)
01-07 20:50:43.692 25893 25983 I Unity   : UnityEngine.XR.ARSubsystems
01-07 20:50:43.700 25893 25983 I Unity   : Using session configuration 0x1
01-07 20:50:43.700 25893 25983 I Unity   :  Requested Features: World Facing Camera, Rotation and Orientation, Auto-Focus
01-07 20:50:43.700 25893 25983 I Unity   :  Supported Features: World Facing Camera, Rotation and Orientation, Auto-Focus
01-07 20:50:43.700 25893 25983 I Unity   :  Requested features not satisfied: (None)
01-07 20:50:43.700 25893 25983 I Unity   : UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
01-07 20:50:43.700 25893 25983 I Unity   : UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
01-07 20:50:43.700 25893 25983 I Unity   : UnityEngine.Logger:Log(LogType, Object)
01-07 20:50:43.700 25893 25983 I Unity   : UnityEngine.Debug:Log(Object)
01-07 20:50:43.700 25893 25983 I Unity   : UnityEngine.XR.ARSubsystems.XRSessionSubsystem:DebugPrintConfigurationChange(Configuration, Feature)
01-07 20:50:43.700 25893 25983 I Unity   : UnityEngine.XR.ARSubsystems.XRSessionSubsystem:Update(XRSessionUpdateParams)
01-07 20:50:43.700 25893 25983 I Unity   : UnityEngine.XR.ARFoundation.ARSession:Update()
01-07 20:50:43.700 25893 25983 I Unity   : 
01-07 20:50:43.709 26057 26087 I native  : I0000 00:00:1704657043.709410   26087 device_profile_database_helpers.cc:569] Found nothing for V5bxAW
01-07 20:50:43.709 26057 26087 I native  : I0000 00:00:1704657043.709488   26087 device_profile_database_helpers.cc:569] Found nothing for merlin_global/merlin
01-07 20:50:43.709 26057 26087 I native  : I0000 00:00:1704657043.709513   26087 device_profile_database_helpers.cc:556] Considering kagnIF:10
01-07 20:50:43.709 26057 26087 I native  : I0000 00:00:1704657043.709536   26087 device_profile_database_helpers.cc:515] Device profile for Redmi/merlin_global/merlin:12/SP1A.210812.016/V13.0.2.0.SJOMIXM:user/release-keys: kagnIF:10
01-07 20:50:43.865 25893 25893 I Unity   : onPause
01-07 20:50:43.886 25893 25983 I native  : I0000 00:00:1704657043.886253   25983 arpresto_api.cc:76] ArPresto::ArPresto_handleActivityPause
01-07 20:50:43.891 25893 25983 D Unity   : Sensor :        Accelerometer ( 1) ; 0.001200 / 0.00s ; ACCELEROMETER / icm4x6xx_acc 
01-07 20:50:44.333 25893 25893 I Unity   : windowFocusChanged: false
01-07 20:50:46.542 25893 25893 D Unity   : onActivityResumed: com.unity3d.player.UnityPlayerActivity@8b36e0a
01-07 20:50:46.545 25893 25893 I Unity   : onResume
01-07 20:50:46.578 25893 25893 I Unity   : windowFocusChanged: true
01-07 20:50:46.598 25893 25983 D Unity   : Sensor :        Accelerometer ( 1) ; 0.001200 / 0.00s ; ACCELEROMETER / icm4x6xx_acc 
01-07 20:50:46.598 25893 25983 D Unity   : Choreographer available: Enabling VSYNC timing
01-07 20:50:46.613 25893 25983 I native  : I0000 00:00:1704657046.613121   25983 arpresto_api.cc:66] ArPresto::ArPresto_handleActivityResume
01-07 20:50:46.690 25893 25983 I native  : I0000 00:00:1704657046.690753   25983 session_create_implementation.cc:255] Entering createImplementationWithFeaturesAndSettings. ARCore SDK version: [1.31.220920000].
01-07 20:50:46.707 25893 25983 I native  : I0000 00:00:1704657046.707579   25983 session_create_implementation.cc:216] AugmentedRegion downsample mode from Phenotype: true
01-07 20:50:46.727 26057 26087 I native  : I0000 00:00:1704657046.727807   26087 device_profile_database_helpers.cc:569] Found nothing for V5bxAW
01-07 20:50:46.727 26057 26087 I native  : I0000 00:00:1704657046.727947   26087 device_profile_database_helpers.cc:569] Found nothing for merlin_global/merlin
01-07 20:50:46.727 26057 26087 I native  : I0000 00:00:1704657046.727979   26087 device_profile_database_helpers.cc:556] Considering kagnIF:10
01-07 20:50:46.728 26057 26087 I native  : I0000 00:00:1704657046.727996   26087 device_profile_database_helpers.cc:515] Device profile for Redmi/merlin_global/merlin:12/SP1A.210812.016/V13.0.2.0.SJOMIXM:user/release-keys: kagnIF:10
01-07 20:50:46.731 26057 26087 W native  : W0000 00:00:1704657046.731517   26087 helpers.cc:4697] Defaulting to persistent calibration file.
01-07 20:50:46.731 26057 26087 W native  : W0000 00:00:1704657046.731788   26087 helpers.cc:4674] Property calibration_cad is not defined.
01-07 20:50:46.733 26057 26087 I native  : I0000 00:00:1704657046.733875   26087 device_provider.cc:3490] Identified device type: kMerlin
01-07 20:50:46.738 25893 25983 I native  : I0000 00:00:1704657046.738413   25983 session_create_implementation_shared.cc:2375] min_apk_version_code is: 220920000, phenotype flag of enable_dual_camera_support is: false, phenotype flag of unified_data_source_status is: 2, is_dual_camera_supported based on device profile is: false
01-07 20:50:46.738 25893 25983 I native  : I0000 00:00:1704657046.738533   25983 session_create_implementation_shared.cc:2386] Settings.camera_stack_option is not specified
01-07 20:50:46.738 25893 25983 I native  : I0000 00:00:1704657046.738545   25983 session_create_implementation_shared.cc:2459] Datasource will be created with camera_stack_option = kUnifiedMono
01-07 20:50:46.738 25893 25983 I native  : I0000 00:00:1704657046.738556   25983 android_camera.cc:168] Camera start operation timeout set to 4000 ms.
01-07 20:50:46.738 25893 25983 I native  : I0000 00:00:1704657046.738673   25983 android_camera.cc:1824] Initializing camera manager.
01-07 20:50:46.763 25893 25983 I native  : I0000 00:00:1704657046.763318   25983 android_camera.cc:1850] Camera manager initialized successfully with 2 cameras.
01-07 20:50:46.763 25893 25983 I native  : I0000 00:00:1704657046.763543   25983 android_camera.cc:760] [Camera=1; State=CLOSED] Reset cleanly got to CLOSED state.
01-07 20:50:46.763 25893 25983 I native  : I0000 00:00:1704657046.763883   25983 android_camera.cc:760] [Camera=0; State=CLOSED] Reset cleanly got to CLOSED state.
01-07 20:50:46.764 25893 25983 I native  : I0000 00:00:1704657046.764649   25983 session_create_implementation_shared.cc:2558] Persistent online recalibration is enabled by Phenotype.
01-07 20:50:46.778 25893 25983 I tflite  : Initialized TensorFlow Lite runtime.
01-07 20:50:46.782 25893 25983 I tflite  : Created TensorFlow Lite XNNPACK delegate for CPU.
01-07 20:50:46.783 25893 25983 I tflite  : Replacing 2 out of 2 node(s) with delegate (TfLiteXNNPackDelegate) node, yielding 1 partitions for the whole graph.
01-07 20:50:46.785 25893 25983 I native  : I0000 00:00:1704657046.785832   25983 online_calibration_manager.cc:93] OnlineCalibrationManager: Could not open /data/user/0/com.DefaultCompany.MediaPipeUnityPlugin/cache/arcore-online-recalibration for reading.
01-07 20:50:47.002 25893 25983 I native  : I0000 00:00:1704657047.002459   25983 android_sensors.cc:135] Using uncalibrated accelerometer.
01-07 20:50:47.002 25893 25983 I native  : I0000 00:00:1704657047.002908   25983 android_sensors.cc:154] Uncalibrated magnetometer available.
01-07 20:50:47.003 25893 25983 I native  : I0000 00:00:1704657047.003226   25983 android_sensors.cc:162] Calibrated magnetometer available.
01-07 20:50:47.003 25893 25983 I native  : I0000 00:00:1704657047.003398   25983 android_sensors.cc:177] Using SENSOR_TYPE_LIGHT
01-07 20:50:47.003 25893 25983 I native  : I0000 00:00:1704657047.003580   25983 android_sensors.cc:180] Could not find SENSOR_TYPE_PRESSURE
01-07 20:50:47.003 25893 25983 I native  : I0000 00:00:1704657047.003750   25983 android_sensors.cc:177] Using SENSOR_TYPE_PROXIMITY
01-07 20:50:47.004 25893 25983 I native  : I0000 00:00:1704657047.004067   25983 android_sensors.cc:177] Using SENSOR_TYPE_GRAVITY
01-07 20:50:47.004 25893 25983 I native  : I0000 00:00:1704657047.004316   25983 android_sensors.cc:177] Using SENSOR_TYPE_ROTATION_VECTOR
01-07 20:50:47.004 25893 25983 I native  : I0000 00:00:1704657047.004483   25983 android_sensors.cc:177] Using SENSOR_TYPE_GAME_ROTATION_VECTOR
01-07 20:50:47.004 25893 25983 I native  : I0000 00:00:1704657047.004737   25983 android_sensors.cc:177] Using SENSOR_TYPE_GEOMAGNETIC_ROTATION_VECTOR
01-07 20:50:47.004 25893 25983 I native  : I0000 00:00:1704657047.004893   25983 android_sensors.cc:177] Using SENSOR_TYPE_STEP_DETECTOR
01-07 20:50:47.007 25893 25983 I native  : I0000 00:00:1704657047.007752   25983 android_platform_checks.cc:206] IsZeroRotationLandscape = false
01-07 20:50:47.008 25893 25983 I native  : I0000 00:00:1704657047.008701   25983 app_version_util.cc:50] Package name: com.google.ar.core App version: 1.41.233110993
01-07 20:50:47.067 25893 25983 I native  : I0000 00:00:1704657047.008994   25983 logger.h:28] DataSourceMetrics: CamerasInit: 1.308us
01-07 20:50:47.067 25893 25983 I native  : I0000 00:00:1704657047.067843   25983 session_create_implementation_shared.cc:1580] CPU Image enable frame delay to compensate delay: false
01-07 20:50:47.087 25893 25983 I native  : I0000 00:00:1704657047.087191   25983 config_helpers.cc:429] IMU sigma values from data source are used
01-07 20:50:47.088 25893 25983 I native  : I0000 00:00:1704657047.088398   25983 deep_io.cc:106] Load deepIO config: deepio_v5_pb.uncompressed
01-07 20:50:47.088 25893 25983 I native  : I0000 00:00:1704657047.088573   25983 deep_io.cc:117] Load TFLite model: deepio_v5_tflite.uncompressed
01-07 20:50:47.101 25893 25983 I tflite  : Replacing 64 out of 83 node(s) with delegate (TfLiteXNNPackDelegate) node, yielding 21 partitions for the whole graph.
01-07 20:50:47.106 25893 25983 I native  : I0000 00:00:1704657047.106243   25983 session_create_implementation_shared.cc:929] DeepIO release instantiated successfully.
01-07 20:50:47.107 25893 25983 I native  : I0000 00:00:1704657047.107890   25983 inertial_estimator.cc:95] DeepIO model id: 5
01-07 20:50:47.107 25893 25983 I native  : I0000 00:00:1704657047.107981   25983 config_helpers.cc:378] Failed to find IMU intrinsic covariance matrix in profile for id: 100
01-07 20:50:47.108 25893 25983 I native  : I0000 00:00:1704657047.108002   25983 config_helpers.cc:136] Does not find camera intrinsic covariance matrix in profile for id 0
01-07 20:50:47.108 25893 25983 I native  : I0000 00:00:1704657047.108016   25983 config_helpers.cc:209] Does not find extrinsic covariance matrix in profile for IMU id 100
01-07 20:50:47.112 25893 25983 I native  : I0000 00:00:1704657047.112072   25983 motion_tracking_context.cc:1018] VPS data synchronizer is successfully initialized.
01-07 20:50:47.112 25893 25983 I native  : I0000 00:00:1704657047.112733   25983 feature_matcher_and_filter.cc:283] Enabled the robustification to large-sized and fast-moving objects on this mono-camera device.
01-07 20:50:47.117 25893 25983 I tflite  : Replacing 3 out of 3 node(s) with delegate (TfLiteXNNPackDelegate) node, yielding 1 partitions for the whole graph.
01-07 20:50:47.117 25893 25983 I native  : I0000 00:00:1704657047.117834   25983 pose_confidence_estimator.cc:231] Pose confidence model loaded successfully
01-07 20:50:47.118 25893 25983 I native  : I0000 00:00:1704657047.118015   25983 bundle_adjustment_initializer.cc:209] [SSBA Initialization] SSBA initialization uses imu preintegration error with shared bias term.
01-07 20:50:47.143 25893 25983 I native  : I0000 00:00:1704657047.143423   25983 asset_manager_util.cc:61] Created global reference to asset manager.
01-07 20:50:47.143 25893 25983 I native  : I0000 00:00:1704657047.143542   25983 session_create_implementation_shared.cc:1605] Normal detector created.
01-07 20:50:47.159 25893 25983 I native  : I0000 00:00:1704657047.159111   25983 planar_target_tracking_manager.h:116] Config of PlanarTargetTrackingManager:
01-07 20:50:47.159 25893 25983 I native  : -pose_refinement_with_detection_interval_ns: 0
01-07 20:50:47.159 25893 25983 I native  : -min_interval_between_detections_ns: 500000000
01-07 20:50:47.159 25893 25983 I native  : -filter_parallax: false
01-07 20:50:47.159 25893 25983 I native  : -filter_result: true
01-07 20:50:47.159 25893 25983 I native  : -multiple_targets: true
01-07 20:50:47.159 25893 25983 I native  : -mini_detection: true
01-07 20:50:47.159 25893 25983 I native  : -tracking_mode: 1
01-07 20:50:47.159 25893 25983 I native  : -camera_id: 0
01-07 20:50:47.166 25893 25983 I native  : I0000 00:00:1704657047.166001   25983 session_manager.cc:46] ArPresto::Session created.camera direction:0
01-07 20:50:47.166 25893 25983 I native  : I0000 00:00:1704657047.166957   25983 session.cc:1255] Entering Session::Resume.
01-07 20:50:47.167 25893 25983 I native  : I0000 00:00:1704657047.167457   25983 camera_config_manager.cc:719] UpdateBugFixes on CameraConfigManager is unimplemented!
01-07 20:50:47.193 25893 25983 I native  : I0000 00:00:1704657047.193101   25983 eis_manager.cc:68] EIS turned off
01-07 20:50:47.193 25893 25983 I native  : I0000 00:00:1704657047.193218   25983 eis_manager.cc:79] current_eis_metadata_.frame_size 1920 x 1080
01-07 20:50:47.193 25893 25983 I native  : I0000 00:00:1704657047.193270   25983 android_camera.cc:168] Camera start operation timeout set to 4000 ms.
01-07 20:50:47.193 25893 25983 I native  : I0000 00:00:1704657047.193311   25983 android_camera.cc:1824] Initializing camera manager.
01-07 20:50:47.203 25893 25983 I native  : I0000 00:00:1704657047.203545   25983 android_camera.cc:1850] Camera manager initialized successfully with 2 cameras.
01-07 20:50:47.203 25893 25983 I native  : I0000 00:00:1704657047.203650   25983 android_camera.cc:760] [Camera=1; State=CLOSED] Reset cleanly got to CLOSED state.
01-07 20:50:47.204 25893 25983 I native  : I0000 00:00:1704657047.204569   25983 android_camera.cc:760] [Camera=0; State=CLOSED] Reset cleanly got to CLOSED state.
01-07 20:50:47.206 25893 25983 I native  : I0000 00:00:1704657047.206064   25983 session.cc:3602] Update Frame Delay to 0 frames.
01-07 20:50:47.219 25893 25983 I native  : I0000 00:00:1704657047.219832   25983 android_sensors.cc:229] Starting thread.
01-07 20:50:47.229 25893 25983 I native  : I0000 00:00:1704657047.229560   25983 logger.h:28] DataSourceMetrics: kStartImageSubSystem: 9.547077ms
01-07 20:50:47.229 25893 25983 I native  : I0000 00:00:1704657047.229697   25983 session.cc:1443] Session::ResumeWithAnalytics returning OK.
01-07 20:50:47.231 25893 25983 I native  : I0000 00:00:1704657047.231323   25983 session_manager.cc:329] ArPresto::Moving from ArPrestoStatus 102 to 101
01-07 20:50:47.231 25893 25983 E native  : E0000 00:00:1704657047.231403   25983 session_lite_c_api.cc:153] operator(): width <= 0
01-07 20:50:47.231 25893 25983 I native  : I0000 00:00:1704657047.231440   25983 session.cc:3602] Update Frame Delay to 0 frames.
01-07 20:50:47.255 25893 26221 W native  : W0000 00:00:1704657047.254990   26221 android_sensor_event_source.cc:277] INTERNAL: Could not create direct sensor channel
01-07 20:50:47.255 25893 26221 W native  : === Source Location Trace: === 
01-07 20:50:47.255 25893 26221 W native  : third_party/arcore/ar/infrastructure/android/android_sensor_event_source.cc:135
01-07 20:50:47.255 25893 26221 I native  : I0000 00:00:1704657047.255097   26221 android_sensor_event_source.cc:221] SENSOR_TYPE_GYROSCOPE_UNCALIBRATED min delay 5ms requesting 5ms
01-07 20:50:47.265 25893 26221 W native  : W0000 00:00:1704657047.265392   26221 android_sensor_event_source.cc:277] INTERNAL: Could not create direct sensor channel
01-07 20:50:47.265 25893 26221 W native  : === Source Location Trace: === 
01-07 20:50:47.265 25893 26221 W native  : third_party/arcore/ar/infrastructure/android/android_sensor_event_source.cc:135
01-07 20:50:47.265 25893 26221 I native  : I0000 00:00:1704657047.265504   26221 android_sensor_event_source.cc:221] SENSOR_TYPE_ACCELEROMETER_UNCALIBRATED min delay 5ms requesting 5ms
01-07 20:50:47.342 25893 25983 I native  : I0000 00:00:1704657047.342910   25983 session.cc:594] New session config:
01-07 20:50:47.342 25893 25983 I native  : ArConfig
01-07 20:50:47.342 25893 25983 I native  :  augmented_face_mode:           AR_AUGMENTED_FACE_MODE_DISABLED
01-07 20:50:47.342 25893 25983 I native  :  augmented_image_database:      [0 images]
01-07 20:50:47.342 25893 25983 I native  :  cloud_anchor_mode:             AR_CLOUD_ANCHOR_MODE_DISABLED
01-07 20:50:47.342 25893 25983 I native  :  depth_mode:                    AR_DEPTH_MODE_DISABLED
01-07 20:50:47.342 25893 25983 I native  :  semantic_mode:                AR_SEMANTIC_MODE_DISABLED
01-07 20:50:47.342 25893 25983 I native  :  focus_mode:                    AR_FOCUS_MODE_AUTO
01-07 20:50:47.342 25893 25983 I native  :  geospatial_mode:               AR_GEOSPATIAL_MODE_DISABLED
01-07 20:50:47.342 25893 25983 I native  :  instant_placement_mode:        AR_INSTANT_PLACEMENT_MODE_DISABLED
01-07 20:50:47.342 25893 25983 I native  :  light_estimation_mode:         AR_LIGHT_ESTIMATION_MODE_DISABLED
01-07 20:50:47.342 25893 25983 I native  :  plane_finding_mode:            AR_PLANE_FINDING_MODE_DISABLED
01-07 20:50:47.342 25893 25983 I native  :  update_mode:                   AR_UPDATE_MODE_BLOCKING
01-07 20:50:47.343 25893 25983 I native  : I0000 00:00:1704657047.343065   25983 session.cc:587] Session::CheckAndWriteCurrentConfig returning OK.
01-07 20:50:47.421 25893 25983 I Unity   : Using session configuration 0x1 (unchanged)
01-07 20:50:47.421 25893 25983 I Unity   :  Requested Features: World Facing Camera, Rotation and Orientation, Auto-Focus
01-07 20:50:47.421 25893 25983 I Unity   :  Supported Features: World Facing Camera, Rotation and Orientation, Auto-Focus
01-07 20:50:47.421 25893 25983 I Unity   :  Requested features not satisfied: (None)
01-07 20:50:47.421 25893 25983 I Unity   : UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
01-07 20:50:47.421 25893 25983 I Unity   : UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
01-07 20:50:47.421 25893 25983 I Unity   : UnityEngine.Logger:Log(LogType, Object)
01-07 20:50:47.421 25893 25983 I Unity   : UnityEngine.Debug:Log(Object)
01-07 20:50:47.421 25893 25983 I Unity   : UnityEngine.XR.ARSubsystems.XRSessionSubsystem:DebugPrintConfigurationChange(Configuration, Feature)
01-07 20:50:47.421 25893 25983 I Unity   : UnityEngine.XR.ARSubsystems.XRSessionSubsystem:Update(XRSessionUpdateParams)
01-07 20:50:47.421 25893 25983 I Unity   : UnityEngine.XR.ARFoundation.ARSession:Update()
01-07 20:50:47.421 25893 25983 I Unity   : 
01-07 20:50:48.418 25893 26220 I native  : I0000 00:00:1704657048.418734   26220 logger.h:28] DataSourceMetrics: kFirstGlCallback: 1.198720923s
01-07 20:50:48.459 25893 26352 I native  : I0000 00:00:1704657048.459294   26352 timebase_helpers.cc:171] Timebase offset initialized to 0
01-07 20:50:48.459 25893 26352 I native  : I0000 00:00:1704657048.459386   26352 logger.h:28] DataSourceMetrics: kFirstImageCallback: 1.239375154s
01-07 20:50:48.487 25893 26197 W native  : W0000 00:00:1704657048.487557   26197 feature_matcher_and_filter_utils.cc:269] INVALID_ARGUMENT: integration window start at 0
01-07 20:50:48.487 25893 26197 W native  : === Source Location Trace: === 
01-07 20:50:48.487 25893 26197 W native  : third_party/redwood/perception/imu_processing/imu_integrator/imu_integrator_utils.cc:97
01-07 20:50:48.487 25893 26197 W native  :  Use identity R.
01-07 20:50:48.488 25893 26352 E native  : E0000 00:00:1704657048.488434   26352 static_feature_frame_selector.cc:79] Unknown old image at: 2835635822854 ns
01-07 20:50:48.488 25893 26352 W native  : W0000 00:00:1704657048.488701   26352 session.cc:1240] INVALID_ARGUMENT: Sensor timestamps must be strictly monotonically increasing, instead received 2835704856000 -> 2835597289000; Failed to add timestamp info to external data synchronizer.
01-07 20:50:48.488 25893 26352 W native  : === Source Location Trace: === 
01-07 20:50:48.488 25893 26352 W native  : third_party/arcore/ar/video/external_data_sync.cc:36
01-07 20:50:48.488 25893 26352 E native  : E0000 00:00:1704657048.488807   26352 static_feature_frame_selector.cc:79] Unknown old image at: 2835635822854 ns
01-07 20:50:48.491 25893 26198 I native  : I0000 00:00:1704657048.491127   26198 data_manager.cc:217] - VisualInertialState is kNotTracking - Clear the buffer. Save the map. Reset the trajectory.
01-07 20:50:48.542 25893 26198 I native  : I0000 00:00:1704657048.542282   26198 data_manager.cc:217] - VisualInertialState is kNotTracking - Clear the buffer. Save the map. Reset the trajectory.
01-07 20:50:48.665 25893 26198 I native  : I0000 00:00:1704657048.665619   26198 data_manager.cc:217] - VisualInertialState is kNotTracking - Clear the buffer. Save the map. Reset the trajectory.
01-07 20:50:48.743 25893 26198 I native  : I0000 00:00:1704657048.743098   26198 data_manager.cc:217] - VisualInertialState is kNotTracking - Clear the buffer. Save the map. Reset the trajectory.
01-07 20:50:48.864 25893 26196 I native  : I0000 00:00:1704657048.863987   26196 bundle_adjustment_initializer.cc:364] Intrinsic vector size of the camera 0 is 7
01-07 20:50:48.899 25893 26196 I native  : I0000 00:00:1704657048.899320   26196 bundle_adjustment_initialization.h:143] Number of measurements used in BA initialization for temporal landmarks: 300
01-07 20:50:48.899 25893 26196 I native  : I0000 00:00:1704657048.899472   26196 bundle_adjustment_initialization.h:145] Number of good measurements (i.e., reprojection errors <= 3 pixels) in BA initialization for temporal landmarks: 287
01-07 20:50:49.047 25893 25983 F native  : F0000 00:00:1704657049.046963   25983 calculator_graph.cc:142] Non-OK-status: Initialize(std::move(config)) status: NOT_FOUND: ValidatedGraphConfig Initialization failed.
01-07 20:50:49.047 25893 25983 F native  : No registered object with name: FaceLandmarkFrontCpu; Unable to find Calculator "FaceLandmarkFrontCpu"
01-07 20:50:49.047 25893 25983 F native  : No registered object with name: FaceRendererCpu; Unable to find Calculator "FaceRendererCpu"
01-07 20:50:49.048 25893 25983 F native  : terminating.
01-07 20:50:49.048 25893 25983 F native  : F0000 00:00:1704657049.046963   25983 calculator_graph.cc:142] Non-OK-status: Initialize(std::move(config)) status: NOT_FOUND: ValidatedGraphConfig Initialization failed.
01-07 20:50:49.048 25893 25983 F native  : No registered object with name: FaceLandmarkFrontCpu; Unable to find Calculator "FaceLandmarkFrontCpu"
01-07 20:50:49.048 25893 25983 F native  : No registered object with name: FaceRendererCpu; Unable to find Calculator "FaceRendererCpu"
01-07 20:50:49.048 25893 25983 F native  : terminating.
01-07 20:50:49.053 25893 25983 E native  : E20240107 20:50:49.048084 25983 calculator_graph.cc:25] Aborted
01-07 20:50:49.080 25893 25983 E Unity   : MediaPipeException: MediaPipe Aborted, refer glog files for more details
01-07 20:50:49.080 25893 25983 E Unity   :   at Mediapipe.MpReturnCodeExtension.Assert (Mediapipe.MpReturnCode code) [0x00000] in <00000000000000000000000000000000>:0 
01-07 20:50:49.080 25893 25983 E Unity   :   at Mediapipe.CalculatorGraph..ctor (System.Byte[] serializedConfig) [0x00000] in <00000000000000000000000000000000>:0 
01-07 20:50:49.080 25893 25983 E Unity   :   at Mediapipe.CalculatorGraph..ctor (Mediapipe.CalculatorGraphConfig config) [0x00000] in <00000000000000000000000000000000>:0 
01-07 20:50:49.080 25893 25983 E Unity   :   at Mediapipe.CalculatorGraph..ctor (System.String textFormatConfig) [0x00000] in <00000000000000000000000000000000>:0 
01-07 20:50:49.080 25893 25983 E Unity   :   at Mediapipe.Unity.Tutorial.FaceMesh+<Start>d__11.MoveNext () [0x00000] in <00000000000000000000000000000000>:0 
01-07 20:50:49.080 25893 25983 E Unity   :   at UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) [0x00000] in <00000000000000000000000000000000>:0 
01-07 20:50:49.080 25893 25983 E Unity   : 
01-07 20:50:49.109 25893 25983 I native  : I0000 00:00:1704657049.109739   25983 session_manager.cc:329] ArPresto::Moving from ArPrestoStatus 101 to 100
01-07 20:50:51.794 25893 26198 I native  : I0000 00:00:1704657051.794587   26198 viwls_helper.cc:214] Skip Lite-COM due to a significant calibration change.
01-07 20:50:51.805 25893 26198 I native  : I0000 00:00:1704657051.805355   26198 viwls_optimization.cc:127] Force a full COM map solve.
01-07 20:50:51.833 25893 26198 I native  : I0000 00:00:1704657051.833856   26198 viwls_optimization.cc:1406] MAP SOLVE: USER_SUCCESS
01-07 20:50:51.836 25893 26198 I native  : I0000 00:00:1704657051.836735   26198 visual_inertial_wls.cc:261] online_viwls_solve_time in seconds = 0.0421551 solve_time_counter_ = 0
01-07 20:50:51.848 25893 26198 I native  : I0000 00:00:1704657051.848289   26198 multi_map_manager.cc:288] Added ADF into multi_map_manager: f445294b-0293-2525-9a54-f3822ceb6c9f
01-07 20:50:55.566 25893 26198 I native  : I0000 00:00:1704657055.566467   26198 viwls_helper.cc:214] Skip Lite-COM due to a significant calibration change.
01-07 20:50:55.571 25893 26198 I native  : I0000 00:00:1704657055.571601   26198 viwls_optimization.cc:127] Force a full COM map solve.
01-07 20:50:55.674 25893 26198 I native  : I0000 00:00:1704657055.674559   26198 viwls_optimization.cc:1406] MAP SOLVE: USER_SUCCESS
01-07 20:50:55.678 25893 26198 I native  : I0000 00:00:1704657055.678458   26198 visual_inertial_wls.cc:261] online_viwls_solve_time in seconds = 0.111993 solve_time_counter_ = 0
01-07 20:50:55.722  3459  5528 I native  : I0000 00:00:1704657055.720267    5528 soda_impl.cc:1669] Adding hotword timeout event
01-07 20:50:57.719 25893 26198 W native  : W0000 00:00:1704657057.719279   26198 data_manager.cc:166] The used RAM memory size by current process is 1054836 kb which is greater than the threshold 1048576 kb, so stop online mapping.
01-07 20:50:57.720 25893 26198 W native  : W0000 00:00:1704657057.719531   26198 data_manager.cc:313] Online mapping stops after 9.222s. Map has 44 keyframes 36 landmarks
01-07 20:51:02.568 25893 26196 W native  : W0000 00:00:1704657062.568382   26196 vio_fault_detector.cc:305] Fault: Lack of valid visual measurements.
01-07 20:51:02.591 25893 26196 W native  : W0000 00:00:1704657062.568659   26196 data_manager.cc:1244] VIO is at fault conditions, wait for reset. Current timestamp in ns = 2849796580854
01-07 20:51:02.591 25893 26196 W native  : W0000 00:00:1704657062.591743   26196 data_manager.cc:730] Resetting VIO at timestamp = 2849796580854 ns.
01-07 20:51:02.816 25893 25983 I native  : I0000 00:00:1704657062.809652   25983 session_manager.cc:329] ArPresto::Moving from ArPrestoStatus 100 to 101
01-07 20:51:03.835 25893 26196 E native  : E0000 00:00:1704657063.821879   26196 vio_initializer.cc:804] INTERNAL: [SSBA Initialization] Failed: Image has too few landmarks. [Required: 9, Actual: 8].; 
01-07 20:51:03.835 25893 26196 E native  :  Initializer's SSBA failed to produce a valid output.
01-07 20:51:03.835 25893 26196 E native  : === Source Location Trace: === 
01-07 20:51:03.835 25893 26196 E native  : third_party/redwood/perception/odometry/visual_inertial_initialization/bundle_adjustment_initializer.cc:324
01-07 20:51:03.936 25893 26196 I native  : I0000 00:00:1704657063.935015   26196 bundle_adjustment_initializer.cc:364] Intrinsic vector size of the camera 0 is 7
01-07 20:51:04.072 25893 26196 I native  : I0000 00:00:1704657064.072896   26196 bundle_adjustment_initialization.h:143] Number of measurements used in BA initialization for temporal landmarks: 373
01-07 20:51:04.075 25893 26196 I native  : I0000 00:00:1704657064.073040   26196 bundle_adjustment_initialization.h:145] Number of good measurements (i.e., reprojection errors <= 3 pixels) in BA initialization for temporal landmarks: 260
01-07 20:51:04.160 25893 25983 I native  : I0000 00:00:1704657064.159900   25983 session_manager.cc:329] ArPresto::Moving from ArPrestoStatus 101 to 100
01-07 20:51:07.454 25893 26155 I native  : I0000 00:00:1704657067.447576   26155 performance_monitor.cc:115] Event: FeatureExtraction is taking too long, it took 113.272ms
01-07 20:51:07.603  3459  5528 I native  : I0000 00:00:1704657067.594062    5528 soda_async_impl.cc:1545] Current audio timestamp: 1704657067401761
01-07 20:51:09.762 25893 26196 W native  : W0000 00:00:1704657069.752480   26196 vio_fault_detector.cc:163] VIO is moving fast with speed (m/s): 0.601809 but RANSAC failed to provide valid frame to frame translation by reporting degeneracy.
01-07 20:51:11.958 25893 25893 I Unity   : onPause
01-07 20:51:12.164 25893 25983 I native  : I0000 00:00:1704657072.159903   25983 arpresto_api.cc:76] ArPresto::ArPresto_handleActivityPause
01-07 20:51:12.213 25893 25983 I native  : I0000 00:00:1704657072.183375   25983 session.cc:1673] Entering Session::Pause.
01-07 20:51:12.213 25893 26155 I native  : I0000 00:00:1704657072.197117   26155 performance_monitor.cc:115] Event: FeatureExtraction is taking too long, it took 118.109ms
01-07 20:51:12.259 25893 26197 E native  : E0000 00:00:1704657072.259808   26197 jni_helper.cc:110] Attempt to get JNIEnv* on thread not attached to JVM
01-07 20:51:12.352 25893 25983 I native  : I0000 00:00:1704657072.319743   25983 plane_manager.cc:967] PopulatePlaneEstimationStatistics  number_of_normal_segmentations: 0, number_of_plane_normal_segment_matches: 0, vertical_planes_boundary_area: 0, vertical_planes_ml_boundary_growth: 0, number_of_vertical_planes: 0, number_of_vertical_planes_with_ml_boundary_growth: 0, avg_duration_in_seconds: 0, tof_merge_quality_stats_.Empty(): true, tof_merge_quality_stats_.hist_area_overlap_ratio_: [0.750, 0.760): 0.000000, [0.760, 0.770): 0.000000, [0.770, 0.780): 0.000000, [0.780, 0.790): 0.000000, [0.790, 0.800): 0.000000, [0.800, 0.810): 0.000000, [0.810, 0.820): 0.000000, [0.820, 0.830): 0.000000, [0.830, 0.840): 0.000000, [0.840, 0.850): 0.000000, [0.850, 0.860): 0.000000, [0.860, 0.870): 0.000000, [0.870, 0.880): 0.000000, [0.880, 0.890): 0.000000, [0.890, 0.900): 0.000000, [0.900, 0.910): 0.000000, [0.910, 0.920): 0.000000, [0.920, 0.930): 0.000000, [0.930, 0.940): 0.000000, [0.940, 0.950): 0.000000, [0.950, 0.960): 0.000000, [0.960, 0.970): 0.000000, [0.970, 0.980): 0.000000, [0.980, 0.990): 0.000000, [0.990, 1.000): 0.000000, [1.000, inf): 0.000000, , tof_merge_quality_stats_.hist_feature_overlap_ratio_: [0.900, 0.905): 0.000000, [0.905, 0.910): 0.000000, [0.910, 0.915): 0.000000, [0.915, 0.920): 0.000000, [0.920, 0.925): 0.000000, [0.925, 0.930): 0.000000, [0.930, 0.935): 0.000000, [0.935, 0.940): 0.000000, [0.940, 0.945): 0.000000, [0.945, 0.950): 0.000000, [0.950, 0.955): 0.000000, [0.955, 0.960): 0.000000, [0.960, 0.965): 0.000000, [0.965, 0.970): 0.000000, [0.970, 0.975): 0.000000, [0.975, 0.980): 0.000000, [0.980, 0.985): 0.000000, [0.985, 0.990): 0.000000, [0.990, 0.995): 0.000000, [0.995, 1.000): 0.000000, [1.000, inf): 0.000000, , tof_merge_quality_stats_.hist_normal_closeness_: [0.900, 0.905): 0.000000, [0.905, 0.910): 0.000000, [0.910, 0.915): 0.000000, [0.915, 0.920): 0.000000, [0.920, 0.925): 0.000000, [0.925, 0.930): 0.000000, [0.930, 0.935): 0.000000, [0.935, 0.940): 0.000000, [0.940, 0.945): 0.000000, [0.945, 0.950): 0.000000, [0.950, 0.955): 0.000000, [0.955, 0.960): 0.000000, [0.960, 0.965): 0.000000, [0.965, 0.970): 0.000000, [0.970, 0.975): 0.000000, [0.975, 0.980): 0.000000, [0.980, 0.985): 0.000000, [0.985, 0.990): 0.000000, [0.990, 0.995): 0.000000, [0.995, 1.000): 0.000000, [1.000, inf): 0.000000, , tof_merge_quality_stats_.hist_plane_distance_: [0.000, 0.010): 0.000000, [0.010, 0.020): 0.000000, [0.020, 0.030): 0.000000, [0.030, 0.040): 0.000000, [0.040, 0.050): 0.000000, [0.050, 0.060): 0.000000, [0.060, 0.070): 0.000000, [0.070, 0.080): 0.000000, [0.080, 0.090): 0.000000, [0.090, 0.100): 0.000000, [0.100, 0.110): 0.000000, [0.110, 0.120): 0.000000, [0.120, 0.130): 0.000000, [0.130, 0.140): 0.000000, [0.140, 0.150): 0.000000, [0.150, 0.160): 0.000000, [0.160, 0.170): 0.000000, [0.170, 0.180): 0.000000, [0.180, 0.190): 0.000000, [0.190, 0.200): 0.000000, [0.200, 0.210): 0.000000, [0.210, 0.220): 0.000000, [0.220, 0.230): 0.000000, [0.230, 0.240): 0.000000, [0.240, 0.250): 0.000000, [0.250, 0.260): 0.000000, [0.260, 0.270): 0.000000, [0.270, 0.280): 0.000000, [0.280, 0.290): 0.000000, [0.290, 0.300): 0.000000, [0.300, 0.310): 0.000000, [0.310, 0.320): 0.000000, [0.320, 0.330): 0.000000, [0.330, 0.340): 0.000000, [0.340, 0.350): 0.000000, [0.350, 0.360): 0.000000, [0.360, 0.370): 0.000000, [0.370, 0.380): 0.000000, [0.380, 0.390): 0.000000, [0.390, 0.400): 0.000000, [0.400, 0.410): 0.000000, [0.410, 0.420): 0.000000, [0.420, 0.430): 0.000000, [0.430, 0.440): 0.000000, [0.440, 0.450): 0.000000, [0.450, 0.460): 0.000000, [0.460, 0.470): 0.000000, [0.470, 0.480): 0.000000, [0.480, 0.490): 0.000000, [0.490, 0.500): 0.000000, [0.500, inf): 0.000000, , ms_merge_quality_stats_.Empty(): true, ms_merge_quality_stats_.hist_area_overlap_ratio_: [0.750, 0.760): 0.000000, [0.760, 0.770): 0.000000, [0.770, 0.780): 0.000000, [0.780, 0.790): 0.000000, [0.790, 0.800): 0.000000, [0.800, 0.810): 0.000000, [0.810, 0.820): 0.000000, [0.820, 0.830): 0.000000, [0.830, 0.840): 0.000000, [0.840, 0.8
01-07 20:51:12.352 25893 25983 I native  : 
01-07 20:51:12.352 25893 25983 I native  : I0000 00:00:1704657072.352431   25983 online_calibration_manager.cc:166] OnlineCalibrationManager: Discarding the new online recalibration estimates.
01-07 20:51:12.473 25893 26196 W native  : W0000 00:00:1704657072.461231   26196 estimator_impl.cc:953] RESOURCE_EXHAUSTED: Behind by: 133.719077ms, skip current frame.
01-07 20:51:12.473 25893 26196 W native  : === Source Location Trace: === 
01-07 20:51:12.473 25893 26196 W native  : third_party/redwood/perception/odometry/visual_inertial_odometry/data_manager.cc:695
01-07 20:51:15.110 25893 25983 I native  : I0000 00:00:1704657075.091325   25983 logger.h:28] DataSourceMetrics: kStopImageSubSystem: 2.66347777s
01-07 20:51:15.327 25893 25983 E native  : E0000 00:00:1704657075.322932   25983 scheduler.cc:277] INTERNAL: RET_CHECK failure (third_party/mediapipe/framework/scheduler.cc:277) state_ != STATE_NOT_STARTED (0 vs. 0) 
01-07 20:51:15.327 25893 25983 E native  : Stack trace:
01-07 20:51:15.337 25893 25983 E native  : E0000 00:00:1704657075.327574   25983 normal_detector_cpu.cc:233] Error graph_->WaitUntilIdle():INTERNAL: RET_CHECK failure (third_party/mediapipe/framework/scheduler.cc:277) state_ != STATE_NOT_STARTED (0 vs. 0) 
01-07 20:51:15.337 25893 25983 E native  : === Source Location Trace: === 
01-07 20:51:15.337 25893 25983 E native  : third_party/mediapipe/framework/scheduler.cc:277
01-07 20:51:15.337 25893 25983 E native  : third_party/mediapipe/framework/calculator_graph.cc:876
01-07 20:51:15.342 25893 25983 I native  : I0000 00:00:1704657075.340490   25983 session.cc:1781] Session::PauseWithAnalytics returning OK.
01-07 20:51:15.428 25893 25983 I native  : I0000 00:00:1704657075.420282   25983 session_manager.cc:329] ArPresto::Moving from ArPrestoStatus 100 to 102
01-07 20:51:15.794 25893 25983 I Unity   : DisconnectMsg.Process
01-07 20:51:15.794 25893 25983 I Unity   : UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
01-07 20:51:15.794 25893 25983 I Unity   : UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
01-07 20:51:15.794 25893 25983 I Unity   : UnityEngine.Logger:Log(LogType, Object)
01-07 20:51:15.794 25893 25983 I Unity   : UnityEngine.Debug:Log(Object)
01-07 20:51:15.794 25893 25983 I Unity   : UnityEngine.InputSystem.DisconnectMsg:Process(InputRemoting, Message)
01-07 20:51:15.794 25893 25983 I Unity   : UnityEngine.InputSystem.InputRemoting:System.IObserver<UnityEngine.InputSystem.InputRemoting.Message>.OnNext(Message)
01-07 20:51:15.794 25893 25983 I Unity   : UnityEngine.InputSystem.RemoteInputPlayerConnection:SendToSubscribers(MessageType, MessageEventArgs)
01-07 20:51:15.794 25893 25983 I Unity   : UnityEngine.InputSystem.RemoteInputPlayerConnection:OnDisconnected(Int32)
01-07 20:51:15.794 25893 25983 I Unity   : UnityEngine.Events.InvokableCall`1:Invoke(T1)
01-07 20:51:15.794 25893 25983 I Unity   : UnityEngine.Events.UnityEvent`1:Invoke(T0)
01-07 20:51:15.794 25893 25983 I Unity   : UnityEngine.Networking.PlayerConnection.PlayerConnection:DisconnectedCallback(Int32)
01-07 20:51:15.794 25893 25983 I Unity   : 
01-07 20:51:15.862 25893 25983 D Unity   : Sensor :        Accelerometer ( 1) ; 0.001200 / 0.00s ; ACCELEROMETER / icm4x6xx_acc 
01-07 20:51:15.942 25893 25893 D Unity   : PersistentUnitySurface.preserveContent: com.unity3d.player.a{5c2224f VFE...... .F....I. 0,0-1080,2340 #7f010003 app:id/unitySurfaceView aid=1073741824}
01-07 20:51:15.951 25893 25893 D Unity   : PersistentUnitySurface.PlaceholderView.Copy: com.unity3d.player.a{5c2224f VFE...... .F....I. 0,0-1080,2340 #7f010003 app:id/unitySurfaceView aid=1073741824}
01-07 20:51:16.310 25893 25983 D Unity   : SetWindow 0 0x0
01-07 20:51:16.335 25893 25893 I Unity   : windowFocusChanged: false
01-07 20:51:16.426 25893 25893 D Unity   : onPixelCopyFinished: 0
user@MACs-MacBook-Pro platform-tools % 
homuler commented 6 months ago

No registered object with name: FaceLandmarkFrontCpu; Unable to find Calculator "FaceLandmarkFrontCpu"

See https://github.com/homuler/MediaPipeUnityPlugin/issues/870. For now, you can also use the FaceLandmarker API. cf. https://github.com/homuler/MediaPipeUnityPlugin/blob/359fb8b4e8ff7b5c7f794c37a023cb53b69d0fc6/Assets/MediaPipeUnity/Samples/Scenes/Tasks/Face%20Landmark%20Detection/FaceLandmarkerRunner.cs

ShonubiSamuel commented 6 months ago

Thanks a lot it works now but i have a few things to ask:

  1. I know GPU calculators are only supported on Android and not Unity Editor . But from the tutorial how were you able to preview yours in the Editor. Screenshot 2024-01-08 at 16 24 28

Mine does gives me a series of GPU related errors like: EntryPointNotFoundException: mp_GpuResources_Create__Pv assembly: type: member:(null)

  1. The output Texture gotten when I use send XRCpuImage to mediapipe is alway rotated horizontally (unlike the tutorial which is rotated vertically) Meaning flipping vertically or horizontally does not help. something like:
    node: {
    calculator: "ImageTransformationCalculator"
    input_stream: "IMAGE:throttled_input_video"
    output_stream: "IMAGE:transformed_input_video"
    node_options: {
    [type.googleapis.com/mediapipe.ImageTransformationCalculatorOptions] {
      flip_vertically: true
    }
    }
    } 

What i did was to rotate Annotation Layer GameObject by 90 in the z axis which sort of fixed the rotation issue but i'm just wondering if there is better way of going about it.

  1. 😩😩 My application lags too much i really don't know what to do. When I checked my profiller, I noticed the process that takes the most Cpu resources is always around the image.Convert() and _cameraManager.TryAcquireLatestCpuImage()
Screenshot 2024-01-08 at 16 44 17

_rawTextureData.Length);

i don't know if you have any recommendation on how to go about making the app run a bit smoother. My Code is down belowπŸ‘‡. Thank for your time :

using System;
using System.Collections;
using TMPro;
using Unity.Collections;
using Unity.Collections.LowLevel.Unsafe;
using UnityEngine;
using UnityEngine.XR.ARFoundation;
using UnityEngine.XR.ARSubsystems;
using UnityEngine.UI;

using Stopwatch = System.Diagnostics.Stopwatch;

namespace Mediapipe.Unity.Tutorial
{
  public class FaceMeshGpu : MonoBehaviour
  {
    [SerializeField] private ARCameraManager _cameraManager;
    [SerializeField] private TextAsset _configAsset;
    private int _width;
    private int _height;
    [SerializeField] private MultiFaceLandmarkListAnnotationController _multiFaceLandmarksAnnotationController;

    private CalculatorGraph _graph;
    private OutputStream _multiFaceLandmarksStream;
    private ResourceManager _resourceManager;
    private Texture2D _texture;

    private NativeArray<byte> _rawTextureData;

    private IEnumerator Start()
    {
      _cameraManager.frameReceived += OnCameraFrameReceived;

      yield return new WaitUntil(() => _texture != null);
      yield return GpuManager.Initialize();

      if (!GpuManager.IsInitialized)
      {
        throw new Exception("Failed to initialize GPU resources");
      }

      _width = _texture.width;
      _height = _texture.height;
      _resourceManager = new StreamingAssetsResourceManager();
      yield return _resourceManager.PrepareAssetAsync("face_detection_short_range.bytes");
      yield return _resourceManager.PrepareAssetAsync("face_landmark_with_attention.bytes");

      var stopwatch = new Stopwatch();

      _graph = new CalculatorGraph(_configAsset.text);
      _graph.SetGpuResources(GpuManager.GpuResources);
      _multiFaceLandmarksStream = new OutputStream(_graph, "multi_face_landmarks");
      _multiFaceLandmarksStream.StartPolling();
      _graph.StartRun();
      stopwatch.Start();

      while (true)
      {
        var imageFrame = new ImageFrame(ImageFormat.Types.Format.Srgba, _width, _height, _width * 4, _rawTextureData);
        var currentTimestamp = stopwatch.ElapsedTicks / (TimeSpan.TicksPerMillisecond / 1000);
        _graph.AddPacketToInputStream("input_video", Packet.CreateImageFrameAt(imageFrame, currentTimestamp));

        var task = _multiFaceLandmarksStream.WaitNextAsync();

        yield return new WaitUntil(() => task.IsCompleted);
        var result = task.Result;

        if (!result.ok)
        {
          throw new Exception("Something went wrong");
        }

        var multiFaceLandmarksPacket = result.packet;
        if (multiFaceLandmarksPacket != null)
        {
          var multiFaceLandmarks = multiFaceLandmarksPacket.GetProtoList(NormalizedLandmarkList.Parser);

          _multiFaceLandmarksAnnotationController.DrawNow(multiFaceLandmarks);
        }
        else
        {
          _multiFaceLandmarksAnnotationController.DrawNow(null);
        }
      }
    }

    private unsafe void OnCameraFrameReceived(ARCameraFrameEventArgs eventArgs)
    {
      if (!_cameraManager.TryAcquireLatestCpuImage(out XRCpuImage image))
      {
        return;
      }

      if (_texture == null || _texture.width != image.width || _texture.height != image.height)
      {
        _texture = new Texture2D(image.width, image.height, TextureFormat.RGBA32, false);
      }

      var conversionParams = new XRCpuImage.ConversionParams(image, TextureFormat.RGBA32, m_Transformation);

      _rawTextureData = _texture.GetRawTextureData<byte>();
      try
      {
        image.Convert(conversionParams, new IntPtr(_rawTextureData.GetUnsafePtr()), _rawTextureData.Length);
      }
      finally
      {
        image.Dispose();
      }

      _texture.Apply();
    }

    [SerializeField]
    Button m_TransformationButton;

    public Button transformationButton
    {
      get => m_TransformationButton;
      set => m_TransformationButton = value;
    }

    XRCpuImage.Transformation m_Transformation = XRCpuImage.Transformation.MirrorX | XRCpuImage.Transformation.MirrorY;

    public void CycleTransformation()
    {
      m_Transformation = m_Transformation switch
      {
        XRCpuImage.Transformation.None => XRCpuImage.Transformation.MirrorX,
        XRCpuImage.Transformation.MirrorX => XRCpuImage.Transformation.MirrorY,
        XRCpuImage.Transformation.MirrorY => XRCpuImage.Transformation.MirrorX | XRCpuImage.Transformation.MirrorY,
        _ => XRCpuImage.Transformation.None
      };

      if (m_TransformationButton)
      {
        m_TransformationButton.GetComponentInChildren<TextMeshProUGUI>().text = m_Transformation.ToString();
      }
    }

    private void OnDestroy()
    {

      _multiFaceLandmarksStream?.Dispose();
      _multiFaceLandmarksStream = null;

      if (_graph != null)
      {
        try
        {
          _graph.CloseInputStream("input_video");
          _graph.WaitUntilDone();
        }
        finally
        {
          _graph.Dispose();
          _graph = null;
        }
        GpuManager.Shutdown();
      }
    }
  }
}
homuler commented 6 months ago

how were you able to preview yours in the Editor.

I usually run UnityEditor on Linux.

i'm just wondering if there is better way of going about it.

Check the orientation of the camera. If the input image is not rotated, then you need to flip it vertically. If it's rotated 90 degrees, then you need to un-rotate it and flip it vertically.

My application lags too much i really don't know what to do.

If the ARFoundation API takes long time, then please ask elsewhere. I suspect the resolution is too heigh, but if it's not, you may want to copy the image on the GPU, not the CPU.

ShonubiSamuel commented 5 months ago

Thanks for the reply; I really appreciate it. I have now successfully integrated the hand tracking solution with AR Foundation. However, I had to revert to v0.12 because I still suck at programming, and v0.12 seems a bit easier to navigate.

I acknowledge that I have a lot to learn, especially in understanding the techniques you use to write your code. I would like to know how I can create my own custom calculator, such as for edge detection or hand gestures in Mediapipe with Unity. Where should I get started?

Additionally, if you have any materials that are helpful for learning how to write code like you do, I would greatly appreciate it. Thanks.

homuler commented 5 months ago

I would like to know how I can create my own custom calculator, such as for edge detection or hand gestures in Mediapipe with Unity. Where should I get started?

First and foremost, I recommend reading the official MediaPipe documentation. If you wish to implement your own Calculator, you will need to write C++ code, so please refer to the MediaPipe documentation and code.

However, I guess what you really want to do is to implement custom CalculatorGraph by combining existing MediaPipe Calculators. In that case, please read the Tutorial and explore how to use CalculatorGraph.

On the other hand, if you want to use a Task API which has not yet been ported to plugins, it is quicker to read the pull request (PR) where Task API was implemented (cf. #997).

Additionally, if you have any materials that are helpful for learning how to write code like you do, I would greatly appreciate it.

For general advice on learning programming, I believe you can obtain more useful information by asking in other places.

denred0 commented 3 months ago

@ShonubiSamuel Hi! I see that you managed to implement hand tracking with AR Foundation. Can you share your project. It would really help me because I'm trying to solve the same problem. Thank you.