Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Machine Learning with Core ML

You're reading from   Machine Learning with Core ML An iOS developer's guide to implementing machine learning in mobile apps

Arrow left icon
Product type Paperback
Published in Jun 2018
Publisher Packt
ISBN-13 9781788838290
Length 378 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Toc

Table of Contents (16) Chapters Close

Title Page
Packt Upsell
Contributors
Preface
1. Introduction to Machine Learning FREE CHAPTER 2. Introduction to Apple Core ML 3. Recognizing Objects in the World 4. Emotion Detection with CNNs 5. Locating Objects in the World 6. Creating Art with Style Transfer 7. Assisted Drawing with CNNs 8. Assisted Drawing with RNNs 9. Object Segmentation Using CNNs 10. An Introduction to Create ML 1. Other Books You May Enjoy Index

Preparing the data


For our task, we require a collection of labeled photos of fruits. As you may recall from Chapter 1Introduction to Machine Learning, this type of machine learning problem is known as supervised learning. We need our model to take in an image and return the label of what it thinks the image is, also known as multi-class classification

Go ahead and collect photos of fruits. Create ML allows for multiple ways of organizing your data, but I find that ad hoc collection is easiest done by organizing it in folders, as shown here:

Source: http://www.image-net.org/ 

Here, we have organized our data into folders, where the folder name is used as a label for its contents. An alternative is labeling each image, where each instance of a specific class has a suffix number, for example banana.0.jpg, banana.1.jpg, and so on. Or you can simply pass in a dictionary of labels with their associated list of image URLs.

At this stage, you may be wondering how many images you should get. Apple...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at £13.99/month. Cancel anytime
Visually different images