- 모델 변환
- 앱 실행
- 아나콘다 설치 (
training
,app-server
와 동일한 방법)
# TensorFlow Lite 모델로 변환
(tf2_mnist_mobile_env) $ python convert_tf2_to_tflite.py
# Core ML 모델로 변환 (문제가 있습니다..)
# (tf2_mnist_mobile_env) $ python convert_tf2_to_mlmodel.py
- macOS 필요
- iOS 11+
- Xcode 설치
- Cocoapods 설치
$ cd ~/mnist-ml-to-mobile/app-mobile/ios
$ pod install
MNIST-TFLiteSwift.xcworkspace
열어서 변환된 tflite 모델을 Xcode 프로젝트에 추가.
모델 이름이 mnist.tflite
와 다르면, MNISTImageClassifier.swift
파일의 modelName
값을 추가된 모델 파일 이름과 동일하게 지정해주어야 합니다.
좌측 상단의 실행버튼 클릭 (혹은 ⌘ + R 단축키)
gif | screenshot-1 | screenshot-2 | screenshot-3 |
---|---|---|---|
준비중...