Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example App Not working #29

Closed
RizanPSTU opened this issue Apr 27, 2019 · 2 comments
Closed

Example App Not working #29

RizanPSTU opened this issue Apr 27, 2019 · 2 comments

Comments

@RizanPSTU
Copy link

Performing hot restart...
Running "flutter packages get" in example...
Syncing files to device Redmi 7...
Restarted application in 15,854ms.
I/Choreographer( 6138): Skipped 61 frames! The application may be doing too much work on its main thread.
W/Looper ( 6138): Slow Frame: doFrame is 1018ms late
I/Timeline( 6138): Timeline: Activity_launch_request time:307300050
E/MethodChannel#tflite( 6138): Failed to handle method call
E/MethodChannel#tflite( 6138): java.lang.IllegalArgumentException: Unsupported value: java.lang.RuntimeException: Interpreter busy
E/MethodChannel#tflite( 6138): at io.flutter.plugin.common.StandardMessageCodec.writeValue(StandardMessageCodec.java:289)
E/MethodChannel#tflite( 6138): at io.flutter.plugin.common.StandardMethodCodec.encodeErrorEnvelope(StandardMethodCodec.java:70)
E/MethodChannel#tflite( 6138): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler$1.error(MethodChannel.java:209)
E/MethodChannel#tflite( 6138): at sq.flutter.tflite.TflitePlugin.onMethodCall(TflitePlugin.java:82)
E/MethodChannel#tflite( 6138): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:201)
E/MethodChannel#tflite( 6138): at io.flutter.view.FlutterNativeView$PlatformMessageHandlerImpl.handleMessageFromDart(FlutterNativeView.java:188)
E/MethodChannel#tflite( 6138): at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:202)
E/MethodChannel#tflite( 6138): at android.os.MessageQueue.nativePollOnce(Native Method)
E/MethodChannel#tflite( 6138): at android.os.MessageQueue.next(MessageQueue.java:326)
E/MethodChannel#tflite( 6138): at android.os.Looper.loop(Looper.java:165)
E/MethodChannel#tflite( 6138): at android.app.ActivityThread.main(ActivityThread.java:6810)
E/MethodChannel#tflite( 6138): at java.lang.reflect.Method.invoke(Native Method)
E/MethodChannel#tflite( 6138): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)
E/MethodChannel#tflite( 6138): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:873)
E/flutter ( 6138): [ERROR:flutter/lib/ui/ui_dart_state.cc(148)] Unhandled Exception: PlatformException(error, Unsupported value: java.lang.RuntimeException: Interpreter busy, null)
E/flutter ( 6138): #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:564:7)
E/flutter ( 6138): #1 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:302:33)
E/flutter ( 6138):
E/flutter ( 6138): #2 Tflite.runModelOnImage (package:tflite/tflite.dart:28:27)
E/flutter ( 6138):
E/flutter ( 6138): #3 _MyAppState.recognizeImage (package:tflite_example/main.dart:152:37)
E/flutter ( 6138):
E/flutter ( 6138): #4 _MyAppState.predictImage (package:tflite_example/main.dart:63:15)
E/flutter ( 6138):
E/flutter ( 6138): #5 _MyAppState.predictImagePicker (package:tflite_example/main.dart:46:5)
E/flutter ( 6138):
E/flutter ( 6138): #6 _InkResponseState._handleTap (package:flutter/src/material/ink_well.dart:513:14)
E/flutter ( 6138): #7 _InkResponseState.build. (package:flutter/src/material/ink_well.dart:568:30)
E/flutter ( 6138): #8 GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:120:24)
E/flutter ( 6138): #9 TapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:242:9)
E/flutter ( 6138): #10 TapGestureRecognizer.acceptGesture (package:flutter/src/gestures/tap.dart:204:7)
E/flutter ( 6138): #11 GestureArenaManager.sweep (package:flutter/src/gestures/arena.dart:156:27)
E/flutter ( 6138): #12 _WidgetsFlutterBinding&BindingBase&GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:218:20)
E/flutter ( 6138): #13 _WidgetsFlutterBinding&BindingBase&GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:192:22)
E/flutter ( 6138): #14 _WidgetsFlutterBinding&BindingBase&GestureBinding._handlePointerEvent (package:flutter/src/gestures/binding.dart:149:7)
E/flutter ( 6138): #15 _WidgetsFlutterBinding&BindingBase&GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:101:7)
E/flutter ( 6138): #16 _WidgetsFlutterBinding&BindingBase&GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:85:7)
E/flutter ( 6138): #17 _rootRunUnary (dart:async/zone.dart:1136:13)
E/flutter ( 6138): #18 _CustomZone.runUnary (dart:async/zone.dart:1029:19)
E/flutter ( 6138): #19 _CustomZone.runUnaryGuarded (dart:async/zone.dart:931:7)
E/flutter ( 6138): #20 _invoke1 (dart:ui/hooks.dart:223:10)
E/flutter ( 6138): #21 _dispatchPointerDataPacket (dart:ui/hooks.dart:144:5)
E/flutter ( 6138):
W/System ( 6138): A resource failed to call close.
I/chatty ( 6138): uid=10202(sq.flutter.tfliteexample) FinalizerDaemon identical 1 line
W/System ( 6138): A resource failed to call close.
W/Looper ( 6138): Slow Frame: doFrame is 311ms late

@RizanPSTU
Copy link
Author

name: tflite_example
description: Demonstrates how to use the tflite plugin.

The following defines the version and build number for your application.

A version number is three numbers separated by dots, like 1.2.43

followed by an optional build number separated by a +.

Both the version and the builder number may be overridden in flutter

build by specifying --build-name and --build-number, respectively.

Read more about versioning at semver.org.

version: 1.0.0+1

environment:
sdk: ">=2.0.0-dev.68.0 <3.0.0"

dependencies:
flutter:
sdk: flutter

The following adds the Cupertino Icons font to your application.

Use with the CupertinoIcons class for iOS style icons.

cupertino_icons: ^0.1.2

dev_dependencies:
flutter_test:
sdk: flutter

image_picker: ^0.4.10

image: ^2.0.5

tflite:
path: ../

For information on the generic Dart part of this file, see the

following page: https://www.dartlang.org/tools/pub/pubspec

The following section is specific to Flutter.

flutter:

The following line ensures that the Material Icons font is

included with your application, so that you can use the icons in

the material Icons class.

uses-material-design: true

To add assets to your application, add an assets section, like this:

assets:

  • assets/mobilenet_v1_1.0_224.txt
  • assets/mobilenet_v1_1.0_224.tflite
  • assets/yolov2_tiny.tflite
  • assets/yolov2_tiny.txt
  • assets/ssd_mobilenet.tflite
  • assets/ssd_mobilenet.txt
  • assets/deeplabv3_257_mv_gpu.tflite
  • assets/deeplabv3_257_mv_gpu.txt

An image asset can refer to one or more resolution-specific "variants", see

https://flutter.io/assets-and-images/#resolution-aware.

For details regarding adding assets from package dependencies, see

https://flutter.io/assets-and-images/#from-packages

To add custom fonts to your application, add a fonts section here,

in this "flutter" section. Each entry in this list should have a

"family" key with the font family name, and a "fonts" key with a

list giving the asset and other descriptors for the font. For

example:

fonts:

- family: Schyler

fonts:

- asset: fonts/Schyler-Regular.ttf

- asset: fonts/Schyler-Italic.ttf

style: italic

- family: Trajan Pro

fonts:

- asset: fonts/TrajanPro.ttf

- asset: fonts/TrajanPro_Bold.ttf

weight: 700

For details regarding fonts from package dependencies,

see https://flutter.io/custom-fonts/#from-packages

@RizanPSTU
Copy link
Author

Just select the model first. :))

Solution #21

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant