Code Monkey home page Code Monkey logo

coreml-examples's Introduction

CoreML Examples

This project is a simple project that uses Core ML for two different classifications:

  1. Realtime image classification
  2. Prediction of income based on demographics

Realtime Image Classification

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

  1. 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
  2. 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

Income Prediction

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

Key Files

  • 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

Requirements

  1. macOS 10.13 or higher to build the iOS app
  2. macOS 10.14 or higher to rebuild the models
  3. Xcode 10 beta 1 or higher
  4. iOS 13 beta 1 or higher
  5. iPhone or iPad with iOS 14 beta 1 or higher. This code will not run on a simulator due to the use of ARKit.

coreml-examples's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.