3 C
New York
Tuesday, January 28, 2025

xcode – PoseLandmarker iOS Instance


I am making an attempt to create a library wrapper for the MediaPipeTasksVision.framework in xcode, the wrapper is for a programming language referred to as B4X which is a cross platform programming language and it is syntax is just like Primary, I’ve created many different wrappers earlier than for the B4X neighborhood, nonetheless I’m having some points when implementing the wrapper for MediaPipeTasksVision.framework in a B4X undertaking, I assumed I might put up right here to get your professional advise on a difficulty I’m having.

I’ve a small B4i undertaking simply to check the library wrapper however I’m seeing the next Errors when operating the undertaking.

NOT_FOUND: ValidatedGraphConfig Initialization failed.
No registered object with title: mediapipe::duties::imaginative and prescient::pose_landmarker::PoseLandmarkerGraph; Unable to seek out Calculator “mediapipe.duties.imaginative and prescient.pose_landmarker.PoseLandmarkerGraph”

I do know the .job file is being discovered based on the next logs

Mannequin path: /personal/var/containers/Bundle/Utility/B773963F-D4D6-438E-BAF6-FA0911F44C6F/tros.ai.app/pose_landmarker_heavy.job

I’ve all the required referenced libraries included in my undertaking however can not seem to discover why I’m seeing that error, here is the code the place the MPPPoseLandmarkerOptions are being initialized in my library wrapper.

`- (MPPPoseLandmarker *)createOptions: (NSString *)tasfilePath :(float)minPoseDetectionConfidence :(float)minPosePresenceConfidence :(float)minTrackingConfidence{
    NSError *optionsError = nil;
    NSString *modelPath = [[NSBundle mainBundle] pathForResource:tasfilePath ofType:@"job"];
    
    if (!modelPath) {
        NSLog(@"Error: .job file not present in DirAssets.");
    } else {
        NSLog(@"Mannequin path: %@", modelPath);
    }
    
    
    MPPPoseLandmarkerOptions *choices = [[MPPPoseLandmarkerOptions alloc] init];
    choices.baseOptions.modelAssetPath = modelPath;
    choices.baseOptions.delegate = 0;
    choices.runningMode = MPPRunningModeImage;
    choices.minPoseDetectionConfidence = minPoseDetectionConfidence;
    choices.minPosePresenceConfidence = minPosePresenceConfidence;
    choices.minTrackingConfidence = minTrackingConfidence;
    choices.shouldOutputSegmentationMasks = false;
    choices.numPoses = 1;

    MPPPoseLandmarker *landmarker = [[MPPPoseLandmarker alloc] initWithOptions:choices error:&optionsError];

    if (optionsError){
        NSLog(@"optionsError: %@", optionsError.localizedDescription);
    }
    return landmarker;
    
    
}`

I am hoping I can get some perception from somebody right here, I’ve been engaged on this for nearly per week now however cannot discover why this error is occurring, earlier than anybody jumps on my throat, I’m not asking for assistance on how B4X is meant to work, I’m searching for assist in particularly concerning the MediaPipe framework and the MediaPipeTasksVision framework, thanks prematurely for any advise or recommendations on what to examine.

Walter

I’ve made certain all of the dependencies are linked in my library, I’ve made certain the .job file just isn’t corrupted, and likewise made certain the graph file is within the undertaking, the title of the graph file is MediaPipeTasksCommon_device_graph.a and additionally it is being discovered, if I take away the reference to this file then my undertaking would not compile and it complains about this particular file.

As I discussed, the B4X/B4i undertaking compiles simply effective on my system however when i initialize the BaseOptions half that is after I see the error.

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles