继PaddlePaddle之后,百度研发的移动端深度学习框架也加入Github开源网站啦!百度方面表示,这一框架致力于让卷积神经网络可极度简单的部署在手机端。目前正在手机百度内运行。支持iOS gpu计算,体积小,速度快。
我们先来看看运行效果: 看完Demo,如果你想了解demo源码实现可以往下看,它位于examples目录中。 运行examples文件
开发或使用要求
如何使用MDL lib 在OSX或者Linux上运行测试 在项目中使用MDL lib 在MDL lib使用多线程 开发 编译android的MDL源码 编译iOS的MDL源码 模型转换 MDL需要兼容的型号才能使用。要获得MDL兼容模型,程序员可以使用百度的脚本将其他深度学习工具训练的模型转换为MDL模型。 百度方面强烈建议使用PaddlePaddle模型。 将PaddlePaddle模型转换为mdl格式 Paddlepaddle型号可以转换为MDL型号 将caffemodel转换为mdl格式 #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 ./caffe2mdl model.prototxt model.caffemodel # if you want to test the model produced by this script, provide color value array of an image as the third parameter ,like this: ./caffe2mdl model.prototxt model.caffemodel data # the color value should in order of rgb,and transformed according to the model. # then you will get a new data.min.bin with test data inside # 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 特征
MDL使用的是宽松的MIT开源协议。 如果你不想了解CNN细节实现,百度在项目开源页面(https://github.com/baidu/mobile-deep-learning)也附加了安装的二维码,可以直接扫码安装。 |