您的位置:首页 > 编程语言 > Go语言

GOTURN安装与配置以及问题汇总

2017-12-12 17:06 288 查看
今天看到了Learning to Track at 100 FPS with Deep Regression Networks这篇文章的速度很高,特此跑一下作者的代码。

安装过程:

安装各项依赖:

安装CMake:

sudo apt-get install cmake

安装caffe,并且用cmake编译caffe,这个就不说了,教程很多,值得一提的是用cmake编译caffe,可以参考http://blog.csdn.net/u013832707/article/details/53159071,官方教程:http://caffe.berkeleyvision.org/installation.html

安装 OpenCV:

sudo apt-get install libopencv-dev


安装TinyXML (needed to load Imagenet annotations):

sudo apt-get install libtinyxml-dev


编译

在GOTURN根目录下编译:

mkdir build
cd build
cmake ..
make


遇到的问题汇总:

cmake时出现错误:

Caffe_LIBRARIES HINTS is /build/lib
Caffe_LIBRARIES is Caffe_LIBRARIES-NOTFOUND
Caffe_DEFINITIONS is
Caffe_DIR is
Caffe_INCLUDE_DIRS is Caffe_INCLUDE_DIRS-NOTFOUND
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
Caffe_INCLUDE_DIRS
used as include directory in directory /home/sammy/GOTURN
used as include directory in directory /home/sammy/GOTURN
used as include directory in directory /home/sammy/GOTURN
used as include directory in directory /home/sammy/GOTURN
used as include directory in directory /home/sammy/GOTURN
used as include directory in directory /home/sammy/GOTURN
used as include directory in directory /home/sammy/GOTURN
used as include directory in directory /home/sammy/GOTURN
used as include directory in directory /home/sammy/GOTURN
used as include directory in directory /home/sammy/GOTURN
used as include directory in directory /home/sammy/GOTURN
Caffe_LIBRARIES
linked by target "GOTURN" in directory /home/sammy/GOTURN
linked by target "GOTURN" in directory /home/sammy/GOTURN

9920
linked by target "GOTURN" in directory /home/sammy/GOTURN
linked by target "GOTURN" in directory /home/sammy/GOTURN
linked by target "GOTURN" in directory /home/sammy/GOTURN
linked by target "GOTURN" in directory /home/sammy/GOTURN

-- Configuring incomplete, errors occurred!
See also "/home/sammy/GOTURN/build/CMakeFiles/CMakeOutput.log".
See also "/home/sammy/GOTURN/build/CMakeFiles/CMakeError.log".


原因:没有找到caffe目录

解决:修改 /GOTURN/cmake/Modules/FindCaffe.cmake文件第5行,将caffe绝对路径加上即可。

如下:

### Set the variable Caffe_DIR as the root of your caffe directory
set(Caffe_DIR /home/改成你自己的/caffe)


2.make时遇到错误:

[ 71%] Linking CXX executable test_tracker_vot
libGOTURN.a(vot.cpp.o):在函数‘VOT::vot_initialize()’中:
vot.cpp:(.text+0x25c):对‘trax_server_setup’未定义的引用
vot.cpp:(.text+0x274):对‘trax_server_wait’未定义的引用
vot.cpp:(.text+0x27e):对‘trax_image_get_path’未定义的引用
vot.cpp:(.text+0x29a):对‘trax_server_reply’未定义的引用
vot.cpp:(.text+0x2de):对‘trax_region_get_rectangle’未定义的引用
vot.cpp:(.text+0x2e8):对‘trax_region_release’未定义的引用
vot.cpp:(.text+0x2f2):对‘trax_image_release’未定义的引用
libGOTURN.a(vot.cpp.o):在函数‘VOT::vot_frame()’中:
vot.cpp:(.text+0x64d):对‘trax_server_wait’未定义的引用
vot.cpp:(.text+0x660):对‘trax_image_get_path’未定义的引用
vot.cpp:(.text+0x675):对‘trax_image_release’未定义的引用
libGOTURN.a(vot.cpp.o):在函数‘VOT::vot_report(vot_region*)’中:
vot.cpp:(.text+0x6e6):对‘trax_region_create_rectangle’未定义的引用
vot.cpp:(.text+0x6f9):对‘trax_server_reply’未定义的引用
vot.cpp:(.text+0x703):对‘trax_region_release’未定义的引用
libGOTURN.a(vot.cpp.o):在函数‘VOT::vot_quit()’中:
vot.cpp:(.text+0x4cc):对‘trax_cleanup’未定义的引用
collect2: error: ld returned 1 exit status
CMakeFiles/test_tracker_vot.dir/build.make:134: recipe for target 'test_tracker_vot' failed
make[2]: *** [test_tracker_vot] Error 1
CMakeFiles/Makefile2:141: recipe for target 'CMakeFiles/test_tracker_vot.dir/all' failed
make[1]: *** [CMakeFiles/test_tracker_vot.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2


解决:

第一步,下载trax,并且编译,在trax根目录下:

mkdir build
cd build
cmake ..
make


第二步,修改 GOTURN下的CMakeLists.txt 文件的第84行:

手动去掉下面这句话的注释:

target_link_libraries(${PROJECT_NAME} /home/你自己的路径/GOTURN/src/native/trax/build/libtrax.so)


参考:https://github.com/davheld/GOTURN/issues/1

编译通过!!!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: