You can already detect rectangles, but now you also classify the dominant object currently present in your camera image. Therefore, you need a machine learning model that helps you with the classification. Use the Inception v3 model that allows you to classify dominant objects present in an image from a set of 1000 categories, such as trees, animals, food, vehicles, and people.
- [Instructor] We have already achieved a lot.…We can get a live camera feed from the camera.…We can use the Vision framework…to process that image and detect rectangles,…and even draw these rectangles on screen and identify them.…So that a user has a visualization…of where a rectangle really is.…In the last video,…we have initialized our image request handler…with VNImageRequestHandler and a cvPixelBuffer…which is ideal if we are dealing with live video.…
But in case you should be using something like…a standard image, you can also initialize…your image request handler with a ciImage,…or even a cgImage.…And also pass along the information you need.…So this a little bit more complicated approach…that we took here with the CMSampleBuffer, and so on.…This is only required if you're really processing…video data from the camera, or from another video.…But now that we have that,…and now that we can process a video feed,…we can actually do even more…and start with object classification.…
You will find a model that you can also download…
- 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