tucan9389 / PoseEstimation-CoreML

The example project of inferencing Pose Estimation using Core ML
https://github.com/motlabs/awesome-ml-demos-with-ios
MIT License
680 stars 136 forks source link

Minimal example for image inference #40

Open yonatanbitton opened 3 years ago

yonatanbitton commented 3 years ago

Hello

I am trying to use other model and it gets complicated.

I was wondering whether someone haev minimal example on how to run inference on existing image from memory? This way it will be simpler to understand how to adapt different model.

Thanks for the repo!

tucan9389 commented 3 years ago

@yonatanbitton Does the "existing image from memory" mean UIImage type on iOS? or CVPixelBuffer? Please tell me more detail about your issues.

yonatanbitton commented 3 years ago

Thanks for the response. I've managed to run your app with my model, this is very helpful, thanks! Now I want to run it on a list of png images. I am wondering how to adapt the existing code to use single image from memory. I am not sure if it should be UIImage or CVPixelBuffer. This way I am looking for some reference about how to do it.

tucan9389 commented 3 years ago

Hmm.. in this repo, there is no minimal method for inferencing just images without launching the app. When you make that kind of function, I'll appreciate it if you make PR 🙃

Here is the Q&A that looks like what you want https://developer.apple.com/forums/thread/79976

I hope it could be helpful to you.