xcode – PoseLandmarker iOS Instance

xcode – PoseLandmarker iOS Instance


I am attempting to create a library wrapper for the MediaPipeTasksVision.framework in xcode, the wrapper is for a programming language known 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, nevertheless I’m having some points when implementing the wrapper for MediaPipeTasksVision.framework in a B4X mission, I believed I would submit right here to get your knowledgeable advise on a problem I’m having.

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

NOT_FOUND: ValidatedGraphConfig Initialization failed.
No registered object with identify: 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 .process file is being discovered based on the next logs

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

I’ve all the mandatory referenced libraries included in my mission 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:@"process"];
    
    if (!modelPath) {
        NSLog(@"Error: .process 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 going on, 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 verify.

Walter

I’ve made certain all of the dependencies are linked in my library, I’ve made certain the .process file isn’t corrupted, and likewise made certain the graph file is within the mission, the identify of the graph file is MediaPipeTasksCommon_device_graph.a and it is usually being discovered, if I take away the reference to this file then my mission does not compile and it complains about this particular file.

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

author avatar
roosho Senior Engineer (Technical Services)
I am Rakib Raihan RooSho, Jack of all IT Trades. You got it right. Good for nothing. I try a lot of things and fail more than that. That's how I learn. Whenever I succeed, I note that in my cookbook. Eventually, that became my blog. 
rooshohttps://www.roosho.com
I am Rakib Raihan RooSho, Jack of all IT Trades. You got it right. Good for nothing. I try a lot of things and fail more than that. That's how I learn. Whenever I succeed, I note that in my cookbook. Eventually, that became my blog. 

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here


Latest Articles

author avatar
roosho Senior Engineer (Technical Services)
I am Rakib Raihan RooSho, Jack of all IT Trades. You got it right. Good for nothing. I try a lot of things and fail more than that. That's how I learn. Whenever I succeed, I note that in my cookbook. Eventually, that became my blog.