深度学习(五十七)tensorflow andorid yolo物体检测测试

来源:互联网 发布:阿里云速度 编辑:程序博客网 时间:2024/05/18 22:17

一、修改tensorflow/workspace文件,取消android相关注释:

# Uncomment and update the paths in these entries to build the Android demo.android_sdk_repository(    name = "androidsdk",    api_level = 24,    # Ensure that you have the build_tools_version below installed in the     # SDK manager as it updates periodically.    build_tools_version = "25.0.2",    # Replace with path to Android SDK on your system    path = "/home/research/Android/Sdk",)## Android NDK r12b is recommended (higher may cause issues with Bazel)android_ndk_repository(    name="androidndk",    path="/home/research/Android/Sdk/ndk-bundle",    # This needs to be 14 or higher to compile TensorFlow.     # Note that the NDK version is not the API level.    api_level=14)

二、修改 android:build.gradle 中bazel路径,默认的是如下的:

def bazelLocation = '/usr/local/bin/bazel'

但是在该路径下并没有bazel,因此会报如下错:
Error:Execution failed for task ':buildNativeBazel'.A problem occurred starting process 'command '/usr/local/bin/bazel''
此时只需要把路径改成你的bazel路径就好,比如我的是:

def bazelLocation = '/usr/bin/bazel'

三、代码结构
基类Classifier.java,三个子类:




阅读全文
0 0
原创粉丝点击