Skip to content

Latest commit

 

History

History

app-mobile

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

MNIST 모바일 앱 예제

  1. 모델 변환
  2. 앱 실행

모델 변환

환경 세팅

변환

# TensorFlow Lite 모델로 변환
(tf2_mnist_mobile_env) $ python convert_tf2_to_tflite.py

# Core ML 모델로 변환 (문제가 있습니다..)
# (tf2_mnist_mobile_env) $ python convert_tf2_to_mlmodel.py

앱 실행

iOS

환경 세팅

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
mnist-ios-demo

Android

준비중...