官方教程:https://github.com/davheld/GOTURN
安装CMake: sudo apt-get install cmake
安装caffe: http://caffe.berkeleyvision.org/installation.html
安装OpenCV: sudo apt-get install libopencv-dev
安装TinyXML:sudo apt-get install libtinyxml-dev
git clone
到GOTURN文件夹下:
mkdir build
cd build
cmake ..
make
PS:安装了两次GOTURN,遇到的基本都是下面几个问题。
问题: caffe目录未找到
Caffe_DIR is /home/your dir/benchmark/caffe-master/build/
Caffe_INCLUDE_DIRS is /home/your dir/benchmark/caffe-master/include/caffe
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:
解决方法:到GOTURN-master/cmake/Modules文件夹下,FindCaffe.cmake文件,修改一下其中caffe的路径就可以了:
注意,使用的是你自己caffe的路径
set(Caffe_DIR /home/embedded/caffe)
https://github.com/davheld/GOTURN/issues/4
问题: caffe.pb.h:No such file or directory
解决方法:
一般这个问题是因为在编译caffe的时候,就没有生成这个文件。
用protoc从caffe/src/caffe/proto/caffe.proto生成caffe.pb.h和caffe.pb.cc
cd ~/caffe/src/caffe/proto
protoc --cpp_out=/home/your dir/caffe/include/caffe/ caffe.proto
http://blog.csdn.net/xmzwlw/article/details/48270225
到caffe/include/caffe/下查看生成的caffe.pb.h和caffe.pb.cc;
在caffe/include/caffe/下创建文件夹proto,将caffe.pb.h和caffe.pb.cc移动到该文件夹下,然后回到GOTURN/build下make,发现这个问题已经解决。
问题: recipe for target ‘test_tracker_alov’ failed
**解决方法:**这个问题是因为没有安装trax,这时需要下载trax并编译:
git clone https://github.com/votchallenge/trax.git
cd trax-master
mkdir build
cd build
cmake ..
make
打开/GOTURN下的CMakeList.txt,在
add_executable (test_tracker_vot src/test/test_tracker_vot.cpp)
target_link_libraries(${PROJECT_NAME} ${OpenCV_LIBS} ${Caffe_LIBRARIES} ${GLOG_LIB})
target_link_libraries (test_tracker_vot ${PROJECT_NAME})
后面添加trax的路径:
target_link_libraries(${PROJECT_NAME} /home/xpf/task1/trax-master/build/libtrax.so)
注:使用自己的路径
以上问题都解决后,到/GOTURN/build下,重新make即可。这里建议sudo make
或者sudo make all
,这样编译后文件生成的比较全。
之后,便可以按照官方git上的教程下载预训练好的模型,然后运行脚本查看GOTURN在其测试集VOT2014上的追踪结果啦。