facebookarchive / caffe2

Caffe2 is a lightweight, modular, and scalable deep learning framework.
https://caffe2.ai
Apache License 2.0
8.42k stars 1.94k forks source link

Can we use Caffe2 for iOS/CoreML? #869

Open leemgs opened 7 years ago

leemgs commented 7 years ago

Recently, Apple announced CoreML support in their iOS devices on Jun 9, 2017 - At WWDC 2017 . The developers can convert their trained models to CoreML as following:

The below content is models and third-party tools supported by CoreML Tools. BTW, In case of Caffe2, How can we use CoreML Tool?

CoremlTools 0.3.0 https://pypi.python.org/pypi/coremltools Core ML is an Apple framework which allows developers to simply and easily integrate machine learning (ML) models into apps running on Apple devices (including iOS, watchOS, macOS, and tvOS). Core ML introduces a public file format (.mlmodel) for a broad set of ML methods including deep neural networks (both convolutional and recurrent), tree ensembles with boosting, and generalized linear models. Models in this format can be directly integrated into apps through Xcode.

barrylachapelle commented 7 years ago

+1 Has anyone tried yet?

milewis1 commented 7 years ago

I’ve used CoreML extensively. I don’t think it has much use for Caffe2. Specifically it aims to supplant Caffe2 on iOS devices. Most people, self included, will just convert their Caffe models to CoreML and skip Caffe2 entirely. Perhaps in the future there will be a Caffe2 to CoreML converter which would be useful because we could use Caffe2’s distributed training and then use CoreML to run on iOS devices.

That said CoreML is backed by metal performance shaders that now support hardware acceleration for everything Caffe2’s operators need. So they could be used to have hardware acceleration on iOS and MacOS for Caffe2.

– Mike

On Thu, Jul 13, 2017 at 7:24 PM Barry Lachapelle notifications@github.com wrote:

+1 Has anyone tried yet?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/caffe2/caffe2/issues/869#issuecomment-315228476, or mute the thread https://github.com/notifications/unsubscribe-auth/AC2ETdaRSaI8mMjfbyGmL4uC7yZEG7kiks5sNqc-gaJpZM4OFA5D .

leemgs commented 7 years ago

\CC: @myungjoo , @jijoongmoon