tensorflowvlad-vector

TensorFlow error "unable to get element from the feed as bytes" when using ActionVLAD


I installed TensorFlow r0.12 using Anaconda and execute the run.sh file from the action detection algorithm ActionVLAD:

Then I got this error traceback:

tensorflow.python.framework.errors_impl.InternalError:
Unable to get element from the feed as bytes.

Traceback (most recent call last):
File "get_class.py", line 7, in 
with h5py.File(sys.argv[1], 'r') as fin, open(sys.argv[2], 'r') as fin2:
File "/Users/wuhaoyang/anaconda2/envs/tf_v0.12.0rc0/lib/python2.7/site-packages/h5py/_hl/files.py", line 271, in init
fid = make_fid(name, mode, userblock_size, fapl, swmr=swmr)
File "/Users/wuhaoyang/anaconda2/envs/tf_v0.12.0rc0/lib/python2.7/site-packages/h5py/_hl/files.py", line 101, in make_fid
fid = h5f.open(name, flags, fapl=fapl)
File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper (/private/var/folders/my/m6ynh3bn6tq06h7xr3js0z7r0000gn/T/pip-wdzlRM-build/h5py/_objects.c:2840)
File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper (/private/var/folders/my/m6ynh3bn6tq06h7xr3js0z7r0000gn/T/pip-wdzlRM-build/h5py/_objects.c:2798)
File "h5py/h5f.pyx", line 78, in h5py.h5f.open (/private/var/folders/my/m6ynh3bn6tq06h7xr3js0z7r0000gn/T/pip-wdzlRM-build/h5py/h5f.c:2117)
IOError: Unable to open file (Unable to open file: name = '/tmp/actionvlad-demo/feats.h5', errno = 2, error message = 'no such file or directory', flags = 0, o_flags = 0)

How can I solve this problem and make ActionVLAD work with TensorFlow r0.12?


Solution

  • Please refer to the closed issue #3 on Github.

    The issue was that the input path for the pre-trained model was set incorrectly, and so TensorFlow could not load the pre-trained model. The solution is to change the --checkpoint_path in the file demo/ext_feats.sh to the downloaded checkpoint file. This was fixed in this commit.