The mobileNet is trained by Caffe on Server, and then convert the weights to MPSCNN weight format. This part is finished by my colleague.
For ordinary convolution in MPSCNN, weight format is [outputChannel][kernelHeight][kernelWidth][inputChannel] For depthwise convolution, weight format is [kernelHeight][kernelWidth][featureChannels]
The trained mobileNet model is 16.9M, which is pretty small. And the inference time on iphone 6s plus is about 50ms, it's pretty fast. For iphone 7, it must be faster.
Requirements
Xcode 8.0
iOS 10.0+
Example
Notice
This project can't run on iOS simulator, as iOS simulator don't support metal.