Preprocess photos using the Vision framework and classify them with a Core ML model.
This code is a rewritten version of the sample code provided by Apple using SwiftUI.
This sample code project runs on iOS 14+. However, you can also use Vision and Core ML in your own apps on macOS 10.13, iOS 11, or tvOS 11.
For more information on how to use Vision, please see Apple's documentation: Classifying Images with Vision and Core ML
Left: using SwiftUI, Right: using Storyboard