Issue
guys, I am new to Stackoverflow
A question about using Tensorflow lite in AS4.1
As I "new" -> "other" -> "tensorflow lite model" and import a new .tflite file
The project automatically generate a PosenetMobilenetFloat0751Metadata1.java file
Then "build" -> "Make project", it shows error:
package org.tensorflow.lite.support.metadata does not exist import org.tensorflow.lite.support.metadata.MetadataExtractor;
The error happens in PosenetMobilenetFloat0751Metadata1.java:
import org.tensorflow.lite.support.metadata.MetadataExtractor;
This error seems come from I don't have this dependency,
following is my dependencies in build.gradle
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation project(":posenet")
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.core:core-ktx:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'org.tensorflow:tensorflow-lite:1.12.0'
implementation 'org.tensorflow:tensorflow-lite-gpu:2.2.0'
implementation 'org.tensorflow:tensorflow-lite-support:0.0.0-nightly'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}
Can Someone help me how to go next?
Solution
I think you need to use implementation 'org.tensorflow:tensorflow-lite-metadata:0.1.0-rc2'
.
Answered By - prostý člověk
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.