Create ML Tutorial: Getting Started

what images are you using?

Hi Audrey

Can you made a video for the recommendation system purely in swift?
I cant find the videos or any resources complete to build it on Swift?
I do hope you will make one?

Thanks

hi seng keat: recommender system is in Turi Create, not (yet?) in Create ML, but it really isn’t hard to do it in Turi Create. Follow the instructions in this tutorial to install Anaconda and turienv, then try out Apple’s example. There are very few lines of code. The trickiest part is getting your data set up correctly, and you’d have to do that in Create ML too 
 if you could do recommenders in Create ML ;]

Hi Audrey,

Thanks for the tutorial. The main question after this tutorial is how to control when you enter a waterfall picture and you get 100% Dog. Any direction that you could point out?

Thanks

hi! Some image classifiers let you supply a negative class: images that are not any of the classes you want; so you could put waterfalls or those fried chicken puffs that look like poodle pups into this negative class, so the model learns they’re not dogs. But I don’t know of any way to do this with Create ML or Turi Create :frowning:

In that case would you recommend to re-train an already trained model, with the data that I want to predict?
Any direction how to do this?

if you want an image or text classifier, use Create ML. If you need something that only Turi Create does, look at those examples.

these models will work pretty well on new data that’s similar to your training data, but they won’t be able to tell you a waterfall is a waterfall, unless you include waterfall as one of your classes. They’ll try to fit new data into the classes they know about.

good luck!

Hi Audrey,

thank you for this amazing tutorial on both CreateML and TuriCreate.

I had played with CreateML with a datasets of images that are absolutely not what one would call “real world object” : very close zoomed images of skin moles. I use a dataset of moles either malignant or benign. According to dermatologists, you can visually tell if a mole is malignant or not so Image Classification is a great fit.

Both CreateML Image Classifier and Turi Create Image classifier use pre-trained model ( VisionFeaturePrint_Screen only for CreateML) and I initially thought that since this model is pretrained on “real world objects”, creating a model with moles would not be possible.

But after further reading TuriCreate documentation (How it works section of Image Classification), it appears that it’s not a problem :

“What’s more, this technique is effective even if your Stage 3 classification task is relatively unrelated to the task Stage 1 is trained on.”

Did I understood it right? Can I really use CreateML to train a model on say skin mole images?

Thank you for your time answering this and sorry for the bad English because I’m French :wink:

Thanks again for this tutorial I learned a ton from it !!!

@audrey Can you please help with this when you get a chance? Thank you - much appreciated! :]

hi Matthieu,

it should be possible 
 VisionFeaturePrint_Screen’s documentation warns against using it for “character recognition, for example, where the input images are highly binary in nature (pixels are either on or off)” but skin moles don’t have this problem.

VisionFeaturePrint_Screen extracts 2048 features from each image. The classifier-training step calculates how to weight each feature to accurately classify your training set. The weights to classify flowers or animals will be different from those for skin moles.

Note this other caution from the documentation: “scene print works best if the source of your training data matches the source of the images you want to classify. For example, if your app classifies images captured with an iPhone camera, train your model using images captured the same way, if possible” — your dataset was probably captured with “proper” cameras? but your app will use the iPhone camera? still, iPhone X* cameras are pretty amazing, so that might not be an issue. Take note of the section Use Registration for Scene Stability in the flower classification article.

It’s a great idea for an app! Please let us know how you go?

Also, your English is great! :+1:

Thank you very much for your answer. Now one last thing I having hard times to understand is :

Is there any interest of using Turi or Keras rather than CreateML regarding image classification only? Do these APIs have more features than CreateML for image classification or really not? One thing I think I get is maybe with Keras/Turi/Other can we train a model with some set of images, saving the model, and re-training with another set of images starting where we saved the trained model before, rather than starting from the beginning like we must do with CreateML?

hi Matthieu: yes, you can tinker with the code in Turi and even more in Keras, to save the best model during training, even if it isn’t the final model, and to restart from that model. You can also save the extracted features, to experiment with regularisation parameters without having to wait for the feature extraction all over again. The ML book shows how to do this.

edited to add: I think you should start with Create ML first, though, as a feasibility check, because it’s the easiest way to start.

This tutorial is more than six months old so questions are no longer supported at the moment for it. Thank you!