From the course: Machine Learning in Mobile Applications
Unlock the full course today
Join today to access over 24,000 courses taught by industry experts.
Client tied to a visual recognition model
From the course: Machine Learning in Mobile Applications
Client tied to a visual recognition model
We now want to implement our image classification model. Once again, the Core ML models will only work on iOS or macOS. Not only that, I found this is one of the weird cases where things do not work on the simulator the way they work on a real device. If you are trying this on the simulator, be aware that the predictions will likely not be accurate. So the code we want to change is in the VisualRecognition ViewModel. And we're going to look for the GetTreeTypeAsync method, which is right here. If we look at the start code of this chapter, we can see that there's a couple of new methods for dealing with images in iOS. And they require you to get images we want to test in a format that the model expects. So we've already got this in here, so we've got this "# iOS" here that's going in and pulling up these images in the correct format that iOS expects. So this is going to be another example of code that we really only want to run on iOS. So we're going to use "#if __iOS__". And we'll do…
Contents
-
-
-
-
-
-
(Locked)
Core ML overview2m 43s
-
(Locked)
Core ML: Create a natural language model3m 53s
-
(Locked)
Core ML: Create a visual recognition model3m 23s
-
(Locked)
Core ML: Create a regression model2m 43s
-
(Locked)
Client tied to a natural language model10m 54s
-
(Locked)
Client tied to a visual recognition model10m 5s
-
(Locked)
Client tied to a regression model6m 26s
-
(Locked)
Running the app3m 8s
-
(Locked)
Challenge: Create a custom model46s
-
(Locked)
Solution: Create a custom model3m 36s
-
(Locked)
-
-
-