You already dealt with vision observations to implement the rectangle detection. Now you need to process the observations coming from your Inceptionv3 machine learning model. VNClassificationObservation is a powerful class that delivers a standardized way to access both the confidence and the identifier—this could be a specific object that was detected—of a predicted observation.
- [Instructor] We have already achieved a lot.…With our VisionML application, we can already detect…rectangles live from the camera,…we are doing on device processing which is really cool,…and now we have added our Machine Learning Model…which detects the dominant objects present…in an image from a set of 1000 categories…such as trees, animals, and so on.…And we have already created our request…for the classification here with the VNCoreMLRequest…using our CoreMLModel Inception 3…and now all that's left to do for us…is actually handle this classification…using the observations that we get…and to do that, I'm going to continue…writing some code here in our…handleClassification function in line 78…in our ViewController.swift file…and I'm starting with a guard statement creating…a new object called observations.…
And we're going to find these observations…in our request and its results error…and if this fields, then what we should do is…print our error first, let's say no results…and let's also append the error and it's…
- What are machine learning, Core ML, Vision, and NLP?
- Adding a machine learning model to a project
- Getting predictions from machine learning models
- Converting existing machine learning models for Core ML
- Classifying images and detecting objects with Vision and Core ML
- Analyzing natural language text with NSLinguisticTagger