4

我正在尝试创建一个 android 应用程序,它可以识别图像中的对象并将其名称作为结果。我知道 caffe-library 可以用于此,但是当我运行 ./build.py 时出现错误。

命令 :

user_name@sysetm_name:~/caffe-android-lib$ ./build.py /bin/android-ndk-r10d/ndk-build

错误 :

Traceback (most recent call last):
File "./build.py", line 102, in <module>
main(sys.argv[1:])
File "./build.py", line 94, in main
setup()
File "./build.py", line 24, in setup
call(['curl', '-O', PROTOBUF_URL])
File "/usr/lib/python2.7/subprocess.py", line 522, in call
return Popen(*popenargs, **kwargs).wait()
File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
4

1 回答 1

5

确保克隆是递归的以包含依赖项:

*** caffe-android-lib 依赖:
Boost-for-Android
protobuf
Eigen

例如:

git clone --recursive https://github.com/sh1r0/caffe-android-lib.git
cd caffe-android-lib
./build.py $(NDK_PATH)

或者您是否尝试过从源代码安装依赖项(尤其是 protobuf)?

鉴于正确安装了依赖项,那么您将成功构建 caffe-android:

例如:

https://gist.github.com/melvincabatuan/6b5e37444b77326ae7b3
...更新了10980个目标...
完成!
...
[armeabi-v7a] 安装:libcaffe_jni.so => libs/armeabi-v7a/libcaffe_jni.so

于 2015-05-05T20:44:41.370 回答