Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
321 views
in Technique[技术] by (71.8m points)

android - MediaPipe how to use the BoxTracking aar?

Being new to MediaPipe, I am not familiar with concept of graph, node, subgraph etc.

After building an aar file of BoxTracking, unable to run it within a Android Studio gradle based project due to some unknown input and output parameters required by model

On comparing HandTracking graph and BoxTracking graph using the visualizer tool and with a working project of HandTracking with aar file added as lib, I added new required input streams and side packets as seen in the graph.

Results are always some errors, mainly due to something wrong in inputs or BoxTracking being a subgraph which is used directly. How to know which input is required and data type of input to run this?

2021-02-05 21:15:23.477 22514-22564/com.example.mediapipemultihandstrackingapp E/FrameProcessor: Mediapipe error: 
com.google.mediapipe.framework.MediaPipeException: internal: Graph has errors: 
Calculator::Open() for node "objectdetectionsubgraphgpu__TfLiteInferenceCalculator" failed: ; could not read asset: ssdlite_object_detection.tfliteer_util.cc:158) 
    at com.google.mediapipe.framework.Graph.nativeMovePacketToInputStream(Native Method)
    at com.google.mediapipe.framework.Graph.addConsumablePacketToInputStream(Graph.java:360)
    at com.google.mediapipe.components.FrameProcessor.onNewFrame(FrameProcessor.java:442)
    at com.google.mediapipe.components.ExternalTextureConverter$RenderThread.renderNext(ExternalTextureConverter.java:364)
    at com.google.mediapipe.components.ExternalTextureConverter$RenderThread.lambda$onFrameAvailable$0$ExternalTextureConverter$RenderThread(ExternalTextureConverter.java:309)
    at com.google.mediapipe.components.-$$Lambda$ExternalTextureConverter$RenderThread$Y1vV_XyLsWZ0ebOvq-iwjQ0H3Sw.run(Unknown Source:4)
    at android.os.Handler.handleCallback(Handler.java:883)
    at android.os.Handler.dispatchMessage(Handler.java:100)
    at android.os.Looper.loop(Looper.java:237)
    at com.google.mediapipe.glutil.GlThread.run(GlThread.java:141)
question from:https://stackoverflow.com/questions/66066560/mediapipe-how-to-use-the-boxtracking-aar

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Datatypes required as input and output was not included in the default build, the build configurations has to be modified to include box_tracker.proto and its dependencies.

https://github.com/google/mediapipe/issues/1624


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...