[reading notes] Action Tubelet Detector for Spatio-Temporal Action Localization

1. paper

https://hal.inria.fr/hal-01519812/document

Vicky Kalogeiton, Philippe Weinzaepfel, Vittorio Ferrari, Cordelia Schmid. Action Tubelet Detector

for Spatio-Temporal Action Localization. ICCV - IEEE International Conference on Computer Vision,
Oct 2017, Venice, Italy.

2. code

https://github.com/vkalogeiton/caffe/tree/act-detector

3. over view of action recognition

https://github.com/jinwchoi/awesome-action-recognition

4. my instruction for  install


1,/include/caffe/data_transformer.hpp:69:24: error: ‘AnnotatedDatum’ does not name a type


https://blog.csdn.net/jonaspku/article/details/72637523


经过一系列痛苦的debug,原因在于Makefile 里面的一句话:

COMMON_FLAGS += $(foreach includedir,$(INCLUDE_DIRS),-isystem $(includedir))


注意蓝色字部分,

-isystem 是gcc的参数,表示引用路径,但是但是但是:

If a standard system include directory, or a directory specified with-isystem, is also specified with-I, the -Ioption is ignored. The directory is still searched but as asystem directory at its normal position in the system include chain. This is to ensure that GCC's procedure to fix buggy system headers andthe ordering for theinclude_next directive are not inadvertently changed. If you really need to change the search order for system directories,use the-nostdinc and/or -isystem

 options.

大意就是-isystem里面如果和-I里面的头文件有冲突,会忽略-I!!!!!!!!


也就是,如果系统中(比如/usr/local/include)等地方有同名文件,会不进行本地(比如/home/XXX/caffe/include)的头文件搜索。

巧合的是,我之前安装caffe的时候又一次用了cmake,手贱写了make install。。。。。。于是我系统里确实有一套基础caffe环境,和ssd不同。。。。。。

至此,


改了几个字母:-isystem ---->-I

问题解决。


然而,这几个字母却花了我两天的时间,虽然不是全在搞这个,但也想想都心痛。

-----------------------------------------------------------------------------------

2,src/caffe/layers/hdf5_data_layer.cpp:13:18: fatal error: hdf5.h: No such file or directory


“fatal error: hdf5.h: 没有那个文件或目录”解决方法

参考自http://blog.csdn.net/hongye000000/article/details/51043913
Step 1

在Makefile.config文件的第85行,添加/usr/include/hdf5/serial/ 到 INCLUDE_DIRS,也就是把下面第一行代码改为第二行代码。

INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include

INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include /usr/include/hdf5/serial/

Step 2

在Makefile文件的第173行,把 hdf5_hl 和hdf5修改为hdf5_serial_hl 和 hdf5_serial,也就是把下面第一行代码改为第二行代码。

LIBRARIES += glog gflags protobuf boost_system boost_filesystem m hdf5_hl hdf5

LIBRARIES += glog gflags protobuf boost_system boost_filesystem m hdf5_serial_hl hdf5_serial


---------------------------------------------------------------------------------------------------------------------

3,Makefile:567: recipe for target '.build_release/lib/libcaffe.so.1.0.0-rc3' failed

/usr/bin/ld: cannot find -lhdf5_hl
/usr/bin/ld: cannot find -lhdf5
/usr/bin/ld: cannot find -lopenblas
collect2: error: ld returned 1 exit status
Makefile:567: recipe for target '.build_release/lib/libcaffe.so.1.0.0-rc3' failed
make: *** [.build_release/lib/libcaffe.so.1.0.0-rc3] Error 1

https://www.cnblogs.com/wangxiaocvpr/p/5385961.html

怎么破?

do as issue 12. Change the Makefile.config:

# Whatever else you find you need goes here.
INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include   /usr/include/hdf5/serial  
LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib  /usr/lib/x86_64-linux-gnu/hdf5/serial




---------------------------------------------------------------------------------------------------------------------------

4, “/usr/bin/ld: cannot find -lopenblas” error in Caffe compilation


AR -o .build_release/lib/libcaffe.a
LD -o .build_release/lib/libcaffe.so
/usr/bin/ld: cannot find -lopenblas
collect2: ld devolvió el estado de salida 1
make: *** [.build_release/lib/libcaffe.so] Error 1

https://blog.csdn.net/u014696921/article/details/56678520?locationNum=10&fps=1

解决方案:

apt install liblapack-dev liblapack3 libopenblas-base libopenblas-dev

-----------------------------------------------------------------------------------------------------------------------------

5, undefined symbol: _ZN2cv6imshowERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_11_InputArrayE


https://blog.csdn.net/10km/article/details/65936155?locationNum=14&fps=1
ldd命令列出libcaffe.so.1.0.0-rc5依赖的动态库,发现了问题,如下图:

https://blog.csdn.net/eliudragon/article/details/78836490



https://blog.csdn.net/eliudragon/article/details/78836490
本来跑的好好的pycaffe突然import出错

整整一天找不到原因

怀疑实验室服务器有毒

最后发现是opencv的问题

然后conda list发现opencv的版本是2.4.11

而Ubunto 16.04系统的apt-get得到的opencv是2.4.9(pkg-config --modversion opencv 查看opencv版本)

所以果断conda remove opencv

然后sudo apt-get install libcv-dev

然后 sudo apt-get install python-opencv

然后发现import cv2出错

最后pip install opencv-python

问题解决



----------------------------------------------------

6,  # Make sure to include $CAFFE_ROOT/python to your PYTHONPATH.

echo $PYTHONPATH
export PYTHONPATH=/media/xsf/work/a.1.myStudy/7.action_localization/3.code/xu_act_caffe/caffe/python:$PYTHONPATH





你可能感兴趣的:([reading notes] Action Tubelet Detector for Spatio-Temporal Action Localization)