This research aims at simply deploying CNN on mobile devices, with low complexity and high speed. It supports calculation on iOS GPU, and is already adopted by Baidu APP.
百度研发的移动端深度学习框架,致力于让卷积神经网络极度简单的部署在手机端。目前正在手机百度内运行。支持iOS gpu计算。体积小,速度快。
If you want to run the demo first, or just use it quickly, without understanding implementation details, you can just scan the QR code, install the compiled apk/ipa file.
如果你想先运行demo试试效果。或者你仅仅是想快速用起来,而不关心CNN细节实现。我们已经为您编译好了安装文件, 直接扫码安装即可。
iOS-MobileNet:
Android-Googlenet:
If you want to know about the source code, please keep going. The source code is located at /examples.
如果你想看demo源码实现可以往下看。它位于examples目录。
# mac or linux:
./build.sh mac
cd build/release/x86/build
./mdlTest
#android
Copy so file to your project. According to the example of writing your code.
#ios
The example code is your code.
# After a Net instance in MDL is created, you could set its thread numbers for execution like this.
net->set_thread_num(3); # Now MDL is tuned to run in 3 parallel threads.
# android:
# prerequisite: install ndk from google
./build.sh android
cd build/release/armv-v7a/build
./deploy_android.sh
adb shell
cd /data/local/tmp
./mdlTest
# ios:
# prerequisite: install xcode from apple
./build.sh ios
copy ./build/release/ios/build/libmdl-static.a to your iOS project
#Convert model.prototxt and model.caffemodel to model.min.json and data.min.bin that mdl use
./build.sh mac
cd ./build/release/x86/tools/build
# copy your model.prototxt and model.caffemodel to this path
# also need the input data
./caffe2mdl model.prototxt model.caffemodel data
# after this command, model.min.json data.min.bin will be created in current
# some difference step you need to do if you convert caffe model to iOS GPU format
# see this:
open iOS/convert/iOSConvertREADME.md
This project is licensed under the MIT License - see the LICENSE file for details
MDL使用的是宽松的MIT开源协议。