Skip to content

Mediapipe pose abort issue  #5495

Open
Open
@janaki112

Description

@janaki112

Have I written custom code (as opposed to using a stock example script provided in MediaPipe)

None

OS Platform and Distribution

macOs Sonoma 14.4.0 version

Mobile device if the issue happens on mobile device

No response

Browser and version if the issue happens on browser

Google chrome 125.0.6422.142

Programming Language and version

Javascript

MediaPipe version

0.10.13

Bazel version

No response

Solution

Pose

Android Studio, NDK, SDK versions (if issue is related to building in Android environment)

No response

Xcode & Tulsi version (if issue is related to building for iOS)

No response

Describe the actual behavior

To use smooth landmarks i'm using mediapipe@pose package and for hands i'm using mediapipe task vision solutions , It's causing abort error and sometimes it's giving module.arguments replaced with plain arguments , sometimes memory out of bounds error

Describe the expected behaviour

I should work without any errors

Standalone code/steps you may have used to try to get what you need

For loading pose , i'm using this mediapipe pose is the latest version i'm using 
 loadPoseWeights({url,taskVisionUrl,clientPrompt,componentName}:{url?:string,taskVisionUrl?:string,clientPrompt?:ClientPrompts,componentName:ComponentNames}={componentName:ComponentNames.UNKNOWN}): Observable<{ pose: Pose }> {
    const poseInstance = new Pose({locateFile: (file) => {
      return `https://cdn.jsdelivr.net/npm/@mediapipe/pose/${file}`;
    }});
    poseInstance.setOptions({
      modelComplexity: 2,
      smoothLandmarks: true,
      enableSegmentation: false,
      smoothSegmentation: true,
      minDetectionConfidence: 0.5,
      minTrackingConfidence: 0.5
    });
    return of({pose:poseInstance});
  }
}
For loading hands - 
public handLoadWeights({url,taskVisionUrl,clientPrompt,componentName}:{url?:string,taskVisionUrl?:string,clientPrompt?:ClientPrompts,componentName:ComponentNames}): Observable<{ handPoseLandmarker: HandLandmarker }> {
    return from(tensorFlow.setBackend("webgl")).pipe(
      switchMap(() => (from(FilesetResolver.forVisionTasks(
        taskVisionUrl?taskVisionUrl:ModelWeightsUrls.TASK_VISION
      )))),
      switchMap((vision) => (from(HandLandmarker.createFromOptions(vision, {
        baseOptions: {
          modelAssetPath: url?url:ModelWeightsUrls.HAND
        },
        numHands: 2
      })))),
      map((detector) => ({ handPoseLandmarker: detector })),
      catchError((error) => {
        try{
          this.handleErrorService.handleErrors(EventNames.MEDIAPIPE,componentName,EventsInstants.BEFORE_LOADING,error,clientPrompt?clientPrompt:ClientPrompts.GAME_DELAY,"HAND");
              }
        catch(error){
    
         if(error instanceof CdnError){
          if(error.repeatCount){
            switch(error.name){
              case ErrorNames.TASK_VISION:
                return this.handLoadWeights({taskVisionUrl:error.altUrl,componentName:componentName,clientPrompt:clientPrompt})
              case ErrorNames.WEIGHTS:
                return this.handLoadWeights({url:error.altUrl,componentName:componentName,clientPrompt:clientPrompt});
            }            
          }else{
            this.handleErrorService.handleErrors(EventNames.MEDIAPIPE,componentName,EventsInstants.BEFORE_LOADING,new EndOfRepeatCount(ErrorNames.END_OF_REPEAT_COUNT,ErrorMessages.END_OF_REPEAT_COUNT,ClientPrompts.END_OF_REPEAT_COUNT),ClientPrompts.END_OF_REPEAT_COUNT,"HAND");
          }
           
        }
        }
        return of(error);
      })
    )
  }

Other info / Complete Logs

Uncaught (in promise): RuntimeError: Aborted(Module.arguments has been replaced with plain arguments_ (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name))
RuntimeError: Aborted(Module.arguments has been replaced with plain arguments_ (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name))
Uncaught Error: Uncaught (in promise): RuntimeError: memory access out of bounds
RuntimeError: memory access out of bounds
 RuntimeError: Aborted(native code called abort())
RuntimeError: Aborted(native code called abort())

Metadata

Metadata

Assignees

Labels

legacy:posePose Detection related issuesplatform:javascriptMediaPipe Javascript issuesstat:awaiting googlerWaiting for Google Engineer's Responsetype:bugBug in the Source Code of MediaPipe Solution

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions