Приложение Tensorflow Lite - PullRequest
       10

Приложение Tensorflow Lite

0 голосов
/ 24 апреля 2020

Как применить пользовательскую модель к tenorflowlite? В инструкции я должен был вставить модель в ресурсы и удалить загрузку модели загрузки, но когда она была применена, приложение просто переместилось вниз sh, в чем проблема?

Отредактировано:

Я следую инструкции при использовании пользовательского поезда в tenorflow lite, но после изменения файла модели api на мою модель и комментирования загружаемой модели включаю приложение просто cra sh. Я попытался использовать пользовательский интерфейс Microsoft General Compact и Compact [s1] и следовал инструкциям https://medium.com/datadriveninvestor/how-to-train-your-own-custom-model-with-tensorflow-object-detection-api-and-deploy-it-into-android-aeacab7fa76f, оба не работают, компактный [s1] делает приложение беспорядочным, а cra sh полностью компактным cra sh Итак, в чем проблема, пользовательский интерфейс просто не может быть использован в tenorflowlite?

эта вещь появляется в режиме отладки:

    java.lang.IllegalArgumentException: Internal error: Failed to apply delegate: Regular TensorFlow ops are not supported by this interpreter. Make sure you apply/link the Flex delegate before inference.
    Node number 328 (FlexNonMaxSuppressionV4) failed to prepare.

        at org.tensorflow.lite.NativeInterpreterWrapper.applyDelegate(Native Method)
        at org.tensorflow.lite.NativeInterpreterWrapper.applyDelegates(NativeInterpreterWrapper.java:324)
        at org.tensorflow.lite.NativeInterpreterWrapper.init(NativeInterpreterWrapper.java:82)
        at org.tensorflow.lite.NativeInterpreterWrapper.<init>(NativeInterpreterWrapper.java:63)
        at org.tensorflow.lite.Interpreter.<init>(Interpreter.java:237)
        at org.tensorflow.lite.examples.detection.tflite.TFLiteObjectDetectionAPIModel.create(TFLiteObjectDetectionAPIModel.java:140)
        at org.tensorflow.lite.examples.detection.DetectorActivity.onPreviewSizeChosen(DetectorActivity.java:112)
        at org.tensorflow.lite.examples.detection.CameraActivity.onPreviewFrame(CameraActivity.java:200)
        at android.hardware.Camera$EventHandler.handleMessage(Camera.java:1222)
        at android.os.Handler.dispatchMessage(Handler.java:102)
        at android.os.Looper.loop(Looper.java:154)
        at android.app.ActivityThread.main(ActivityThread.java:6316)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:872)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:762)```

Edited v2:
Yes, it show up in netron.
[![this is the image of the other persons model][1]][1]
[![this one is my model in microsoft compact[s1][2]][2]
the other model of microsoft compact is to big for png so, it was saved as svg don't know how to show it here.

[![here is the properties of compact[s1][3]][3]
[![here is the properties of compact][4]][4]
[![here is the properties of other person][5]][5]


  [1]: https://i.stack.imgur.com/BtkZ1.jpg
  [2]: https://i.stack.imgur.com/ffnOU.png
  [3]: https://i.stack.imgur.com/mx7dx.png
  [4]: https://i.stack.imgur.com/AyXrt.png
  [5]: https://i.stack.imgur.com/K1odl.png

1 Ответ

0 голосов
/ 24 апреля 2020

Операторы, используемые вашей моделью, не поддерживаются TensorFlow Lite. Вот список поддерживаемых операций .

. Вы можете увидеть, как создать модель , легко конвертируемую в TensorFlow Lite .

...