Skip to content

Commit

Permalink
update model
Browse files Browse the repository at this point in the history
  • Loading branch information
hiennguyen92 committed Jul 14, 2021
1 parent 0377b91 commit 830def9
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 13 deletions.
4 changes: 2 additions & 2 deletions assets/labels.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
0 WithMask
1 WithoutMask
WithMask
WithoutMask
Binary file added assets/model.tflite
Binary file not shown.
Binary file removed assets/model_unquant.tflite
Binary file not shown.
6 changes: 2 additions & 4 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ PODS:
- camera (0.0.1):
- Flutter
- Flutter (1.0.0)
- TensorFlowLiteC (2.5.0):
- TensorFlowLiteC/Core (= 2.5.0)
- TensorFlowLiteC/Core (2.5.0)
- TensorFlowLiteC (2.2.0)
- tflite (1.1.2):
- Flutter
- TensorFlowLiteC
Expand All @@ -29,7 +27,7 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
camera: 3164201dc344383e62282964016528c4f5a9ad50
Flutter: 434fef37c0980e73bb6479ef766c45957d4b510c
TensorFlowLiteC: 9115580176f050caa70fea478dba3d5a75c612a4
TensorFlowLiteC: b3ab9e867b0b71052ca102a32a786555b330b02e
tflite: 7acd11db0915e2d90ab90474413068568eb605f0

PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c
Expand Down
13 changes: 8 additions & 5 deletions ios/Runner/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="18122" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="18093"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--Flutter View Controller-->
Expand All @@ -14,13 +16,14 @@
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="116" y="-57"/>
</scene>
</scenes>
</document>
2 changes: 2 additions & 0 deletions ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>NSCameraUsageDescription</key>
<string>Camera usage description</string>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
</dict>
Expand Down
3 changes: 2 additions & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,9 @@ class _MainPageState extends State<MainPage> {
}

void loadModel() async {
Tflite.close();
await Tflite.loadModel(
model: "assets/model_unquant.tflite", labels: "assets/labels.txt");
model: "assets/model.tflite", labels: "assets/labels.txt");
}

void runModel() async {
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ flutter:
# To add assets to your application, add an assets section, like this:
assets:
- assets/labels.txt
- assets/model_unquant.tflite
- assets/model.tflite

# An image asset can refer to one or more resolution-specific "variants", see
# https://flutter.dev/assets-and-images/#resolution-aware.
Expand Down

0 comments on commit 830def9

Please sign in to comment.