0

I do some experiments with google.mediapipe framework and observing next issue... if some instance/task was initialized, it's impossible to create another instance of inference task after.

For example, I run mediapipe task with pose detection model, and when I try to initialize TextEmbedder instance I receive following exception:

com.google.mediapipe.framework.MediaPipeException: not found: ValidatedGraphConfig Initialization failed. No registered object with name: mediapipe::tasks::text::text_embedder::TextEmbedderGraph; Unable to find Calculator "mediapipe.tasks.text.text_embedder.TextEmbedderGraph" at com.google.mediapipe.framework.Graph.nativeStartRunningGraph(Native Method) at com.google.mediapipe.framework.Graph.startRunningGraph(Graph.java:336) at com.google.mediapipe.tasks.core.TaskRunner.create(TaskRunner.java:72) at com.google.mediapipe.tasks.text.textembedder.TextEmbedder.createFromOptions(TextEmbedder.java:159)

I run codebase from their examples (pose detection) and added text tasks dependencies to the project. Instantiation:

BaseOptions.Builder baseOptionsBuilder = BaseOptions.builder();
             baseOptionsBuilder.setModelAssetPath("universal_sentence_encoder.tflite");
TextEmbedder.TextEmbedderOptions options =
                            TextEmbedder.TextEmbedderOptions.builder()
                                    .setBaseOptions(baseOptionsBuilder.build())
                                                                            .build();
mTextEmbedder = TextEmbedder.createFromOptions(context, options);

I tried different versions/combinations (vision & text) so far but no luck so far...

I'm wonder if it's even possible to run 2 instances simultaneously?

UPD: 2 simultaneous instances works fine on iOS

2
  • Similar to: github.com/google-ai-edge/mediapipe/issues/3472 Commented Mar 4 at 23:21
  • @MorrisonChang unfortunately it's not similar. Your reference seems like have compilation issue, where in my case the issue occurs in runtime Commented Mar 5 at 15:53

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.