Skip to content

ZwX1616/ios_mx_deploy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deploy deep learning models on your iPhone/iPad

using the mxnet c predict api

Initially I tried to run a 50MB ssd object detection network on the iPhone and failed due to insufficient RAM. It currently runs a 5MB mobilenet (from the model zoo) for classification among 1000 classes. In order to detect objects (or even do segmentation), small networks like tinyyolo or tinyssd are essential for mobile devices.

Mxnet is used here because it is the main deep learning framework I learn and use, and it has a rich model zoo (gluoncv.model_zoo) to offer. It is also a lightweight framework to be used anywhere and, for example, I can train a model with it on some workstation/AWS and easily deploy this model onto the end-use device (e.g. a phone) without the need/pain to convert it.


(tested on iPhoneX)
how to run on your iPhone: (files in step 2,3 are not included for being too large)

  1. clone and open the Xcode project and
  2. put opencv2.framework (downloadable from official website) in folder 'ios_mx_det/opencv'
  3. compile the mxnet prediction api (static library libmxnet_ios_lib.a file) for iOS and put it in 'ios_mx_det/mxnet'
    (I used mxnet 1.2.0 since 1.3 doesn't work for some reason. Refer to apache/mxnet#11184 or https://www.jianshu.com/p/8f703c10540e)
  4. build and run on device


About

deploy deep learning models on iOS with mxnet

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published