Since the presented approach uses MatConvNet of Matlab as a preliminary training platform, the pre-trained CNN model of MatConvNet cannot be directly integrated into the Xcode platform currently. Therefore, developers need a third-party platform as a bridge, so that developers can transfer the model of Matlab to the Xcode environment and finally mount the model to an app for executing and testing on the iOS device. Apple provides developers with Core ML Tools to support the Caffe framework. Therefore, developers can convert the Caffe model into the ML model through Core ML Tools. Moreover, the Caffe provides MatCaffe for connecting Matlab and Caffe. It is apparent that developers can achieve the goal through these two bridges.
TopIos Devices And Core Ml
iOS devices are the main reason for the company of Apple rapid growth in recent years (StatCounter, 2019). The unique appearance of iOS devices is also the object of mutual imitation and competition by other related companies. They are not only updated on hardware every year, but also pursuing new features in software. For all iOS devices, we are most familiar with is the iPhone. On June 29, 2007, Apple Inc. released the iPhone (1st generation) in the United States. It is equipped with the operating system of iPhone OS 1.0, the CPU of the 620 MHz Samsung 32-bit RISC ARM 1176JZ(F)-S v1.0 (Patterson, 2008) and the Random Access Memory (RAM) of the 128 MB DRAM. For each subsequent year, Apple Inc. continued to release new iPhones. Both the hardware and the software, the iPhone is constantly improving. In particular, the iPhone 4 was first unveiled at Apples WWDC on June 7, 2010, its computing power was recognized compatible with the Cray-2 supercomputer. Today, the iPhone X and iPhone 11 are coming out one after another. Their computing power has improved the iPhone 4 more than twenty folds of the Cary-2 supercomputer. With the growth of the iPhone computing power, deep learning technology is more capable of realizing on mobile devices for pattern recognition.
In the past, we always pursued the breakthroughs and applications in deep learning technology on the Personal Computer (PC). We know that huge deep learning models must undergo a complex training process. Today, the computing power of an iPhone is on par with twenty Cary-2 supercomputers. It is no longer difficult for us to develop deep learning models on mobile devices. The well-known deep learning frameworks have also begun to extend from PC to mobile devices. The deep learning frameworks we are familiar with on PC are Caffe, Tensorflow, Pytorch, and Keras, etc. As with deep learning model training on PC, we can construct and train custom deep learning models with deep learning frameworks on mobile devices. In 2019, the mobile deep learning frameworks (Choudhury, 2019) most commonly used by developers are Caffe2, CoreML, DeepLearningKit, Mobile AI Compute Engine, Paddle Lite, Pythorch Mobile, Snapdragon Neural Processing Engine (SNPE) and TensorFlow Lite. The total solution of this book, we use Core ML to develop deep learning models for iOS devices.
At the 2017 Apple Worldwide Developers Conference (WWDC 2017), Apple officially announced Core ML, which allow developers to add machine learning model to their apps. This feature allows we to build and train machine learning or deep learning models on several specific platforms, and convert the model to ML model using Core ML afterwards, and import it into Xcode project finally. The following is an introduction of the Core ML on the official website (Apple, Machine Learning, 2018).
This new framework lets you easily build machine learning models, with no machine learning expertise required. Familiar and easy to use thanks to Swift, Create ML is integrated into playgrounds in Xcode 10 so you can view model creation workflows in real time. Just add a few lines of Swift code to leverage our Vision and Natural Language technologies and created models optimized for the Apple ecosystem for a variety of tasks, including regression, image classification, word tagging, and sentence classification. And you can use your Mac to train models from Apple with your custom data – no need for a dedicated server.