1/ PSA/rant: If your'e a developer trying to port a deep learning model from Onnx to Core ML and are finding that Apple's onnx-coreml conversion script isn't working out of the box- you aren't alone. While iOS13 has brought about great improvements to what you can do in Core ML,
-
Show this thread
-
/7 Also also.... Just put all your image normalization/denormalization code in additional layers sandwiching your model before converting it to Onnx. It's easier to reason about and do correctly where as Apple's code again is strange and not quite right.
2 replies 0 retweets 7 likesShow this thread -
Replying to @citnaj
Hey there, I’m planning to follow a similar path but wondering if it’s possible to just rebuild the model entirely in swift, so as to fully utilize all of apple’s hardware magic?
1 reply 0 retweets 0 likes -
Replying to @DrRaviPatel
You mean like train it and everything else? Honestly I haven’t bothered digging into that because I’m very happy with FastAI and haven’t seen any compelling reason to move off it. I (superficially) think you may be able to but not sure if it would be worth it....
2 replies 0 retweets 0 likes -
Replying to @citnaj @DrRaviPatel
coreml (not swift) is pretty much required if you want to “utilize all of apple’s hardware magic“
1 reply 0 retweets 0 likes -
I am about to write a follow-up blog post providing an end-to-end example of how to go from fastai to a react-native coreml app. If you need something right away see unfinished project https://github.com/davidpfahler/react-native-ml-app … and notebookhttps://colab.research.google.com/drive/1LrS6Sn-B7bU_YE_zIOXIysXCsW1-4iCM …
1 reply 3 retweets 6 likes -
Replying to @davidpfahler @julien_c and
Here it is:https://davidpfahler.com/fastai-in-ios
1 reply 1 retweet 3 likes
Great, thanks!
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.