This project is a simple project that uses Core ML for two different classifications:
- Realtime image classification
- Prediction of income based on demographics
This code is loosely based on the example provided by Apple at https://developer.apple.com/documentation/arkit/using_vision_in_real_time_with_arkit
This example simplified the code to focus on the machine learning and added functionality to support image classification against 2 models to compare the results.
The models are
- InceptionV3 model included with the original example from Apple. This model file is around 100Mb in size and was build with Core ML under macOS 10.13
- Custom model built using CreateML on macOS 10.14 which was trained on CalTech 256 dataset which contains about 30,000 images. The resulting model, using transfer learning and quantization is about 4Mb
This code uses census information regarding incomes from almost 49,000 adults in 1994 to predict a person's income level based on a small set of demographic data. Information about the dataset can be found at https://archive.ics.uci.edu/ml/datasets/Adult
- CoreML Examples.xcodeproj - The Xcode project for the runtime.
- AdultIncomePlayground.playground - An Xcode 10 playground to build the adult income classification model. This playground includes the dataset required to train the model.
- ImageRecogPlaygroud.playground - An Xcode 10 playground to train an image recognition model. You must download the images used by this playground from CalTech 256
- macOS 10.13 or higher to build the iOS app
- macOS 10.14 or higher to rebuild the models
- Xcode 10 beta 1 or higher
- iOS 13 beta 1 or higher
- iPhone or iPad with iOS 14 beta 1 or higher. This code will not run on a simulator due to the use of ARKit.