Using Vision is a three-step process—creating a request, creating a request handler, and dealing with the observations you get as results. So, before you start drawing any rectangles, you need to define a VNDetectRectanglesRequest and configure it. Then, prepare a function that handles the the results from your VNDetectRectanglesRequest.
- [Instructor] We are now going to take…the first steps with the Vision framework…and if you remember the presentation…about Vision from the beginning of this course…then you might also remember that working…with Vision is a three step process.…So we have to do three things:…we have to create a request which is the first element…here in this slide.…Then we're going to create a request handler…that is called by the request when it's finished.…And in the request handler we can deal with observations,…and the important thing about the request handler…is when you create a function for that…that it has two parameters.…
A request which is a VN request object and an error object,…and we are going to start with all these three…things right now.…So let's open up our X code project again…and I'm going to ViewController.swift here…and the first thing I'd like to do is creating…a property that holds all of my requests.…So let's define a property here requests…which is going to be an array of VN, so Vision request,…and I'm directly initializing that here.…
- 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