coreML 初窥

coreML 初窥

本文章主要介绍对于CoreML Foundation的简单实用,不深入涉及Machine Learn(自己对于ML知识还很浅):

  • CoreML相关简介

  • 例子使用讲解


CoreML相关简介

2017-06-06 Apple 在WWDC2017大会上推出CoreML框架

  • Core ML lets you integrate a broad variety of machine learning model types into your app. In addition to supporting extensive deep learning with over 30 layer types, it also supports standard models such as tree ensembles, SVMs, and generalized linear models. Because it’s built on top of low level technologies like Metal and Accelerate, Core ML seamlessly takes advantage of the CPU and GPU to provide maximum performance and efficiency. You can run machine learning models on the device so data doesn’t need to leave the device to be analyzed.

  • 以上内容大概翻译过来就是:CoreML可以集成多种机器学习模型类型到您的应用程序。它除了支持超多30 layer的机器学习,还支持多种标准的模型,比如: tree ensembles, SVMs, and generalized linear models。它建立于底层的技术类似Metal 和 Accelertate,因此能最大的利用CPU和GPU提供性能和效率。并且您可以直接在设备上直接运行机器模型,不需要数据离开设备进行分析。


例子使用讲解

  • 建立的工程导入CoreML 框架

  • 导入*.mlmodel, 通过Xcode可以看到这个mlmodel的相关信息,包括model的类型,作者,Model Class ,输入参数,输出参数等信息;这里写图片描述

  • 根据Apple的说法,导入mlmodel后,Xcode也根据model信息自动生成一个自定义编程接口模型,可以用它来与模型交互的代码。具体它什么时候转出代码,目前我还没找到。刚开始我根据它的swift例子编写obj例子,我把mlmodel导入的时候,然后编译了好久都没看到自动生成的接口model,然后我就不停的command+b,突然我就能看到了。然后在我的一个新项目中,使用了另外一个mlmodel,编译好久也还没看到生成的接口模型。这里比较奇怪,也还没找到对应的说法,也可能是xcode问题,稍后会研究。

[1]: https://developer.apple.com/machine-learning/ apple关于machine learning的介绍

[2]: https://developer.apple.com/documentation/coreml/integrating_a_core_ml_model_into_your_app apple 关于coreML例子

[3]: https://github.com/hxming2919/IntegratingaCoreMLModelintoYourApp_obj 使用obj重写apple coreML例子

Leverage the power of Apple's Core ML to create smart iOS apps Key Features Explore the concepts of machine learning and Apple's Core ML APIs Use Core ML to understand and transform images and videos Exploit the power of using CNN and RNN in iOS applications Book Description Core ML is a popular framework by Apple, with APIs designed to support various machine learning tasks. It allows you to train your machine learning models and then integrate them into your iOS apps. Machine Learning with Core ML is a fun and practical guide that not only demystifies Core ML but also sheds light on machine learning. In this book, you'll walk through realistic and interesting examples of machine learning in the context of mobile platforms (specifically iOS). You'll learn to implement Core ML for visual-based applications using the principles of transfer learning and neural networks. Having got to grips with the basics, you'll discover a series of seven examples, each providing a new use-case that uncovers how machine learning can be applied along with the related concepts. By the end of the book, you will have the skills required to put machine learning to work in their own applications, using the Core ML APIs What you will learn Understand components of an ML project using algorithms, problems, and data Master Core ML by obtaining and importing machine learning model, and generate classes Prepare data for machine learning model and interpret results for optimized solutions Create and optimize custom layers for unsupported layers Apply CoreML to image and video data using CNN Learn the qualities of RNN to recognize sketches, and augment drawing Use Core ML transfer learning to execute style transfer on images Who This Book Is For Machine Learning with Core ML is for you if you are an intermediate iOS developer interested in applying machine learning to your mobile apps. This book is also for those who are machine learning developers or deep learning practitioners who want to bring the power of neural networks in their iOS apps. Some exposure to machine learning concepts would be beneficial but not essential, as this book acts as a launchpad into the world of machine learning for developers. Table of Contents Introduction to Machine Learning Introduction to Apple Core ML Recognising objects in the world Locating Objects in the World Facial Emotion Detection with Convolutional Neural Networks Transfer Learning - Creating art with style transfer Assisted drawing with Convolutional Neural Networks Assisted drawing with Recurrent Neural Networks Object segmentation using neural networks An introduction to Create ML
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值