Tutorial – Using DeepLearningKit with iOS for iPhone and iPad

Update 2016-Feb-15 – recommend looking at the tutorial video below, it is an easier and more accurate way to get started with DeepLearningKit for iOS than the tutorial below, but the tutorial below can be used as supporting material.

  1. Clone DeepLearningKit:  git clone https://github.com/DeepLearningKit/DeepLearningKit.git

Screen Shot 2015-12-28 at 14.48.05

2. Open DeepLearningKitForiOSDemoApp.xcodeproj in xcode (e.g. from Finder)

Screen Shot 2015-12-28 at 14.49.20

3. Have a look at ViewController.swift – notice that import DeepLearningKitForiOS gives an error (in red)

Screen Shot 2015-12-28 at 14.50.17

Screen Shot 2015-12-28 at 14.50.44

4. Open Finder and Drag DeepLearningForiOS.xcodeproj over to the demo app in xcode

Screen Shot 2015-12-28 at 14.52.15

5. Highlighted line below shows how the framework DeepLearningForiOS.xcodeproj can be included

Screen Shot 2015-12-28 at 14.52.55

6. Click on app settings (highlighted line in left part of Xcode) and go the General tab on the right

Screen Shot 2015-12-28 at 15.48.44

7. Scroll down to embedded binaries in General tab and add DeepLearningKitforiOS.frameworkiOS

Screen Shot 2015-12-28 at 15.21.28

8. Result afterwards should look something like this – embedded binaries down to the right

Screen Shot 2015-12-28 at 15.21.41

9. Drag the Shaders.metal file from DeepLearningKitForiOS into top project

(not quite sure why this needs to be done, but anyway)

Screen Shot 2015-12-28 at 15.56.09

Screen Shot 2015-12-28 at 15.56.18

10. Connect iPhone to your Mac (e.g. iPhone 6S), compile and run, should get something like this

Screen Shot 2015-12-28 at 15.32.35

Best regards,
Amund Tveit