LossNAN / I3D-Tensorflow

Train I3D model on ucf101 or hmdb51 by tensorflow
Apache License 2.0
112 stars 28 forks source link

train_ucf_rgb s_index problem #14

Open hyfalex opened 5 years ago

hyfalex commented 5 years ago

Hi I was trying to train on UCF101. With python 2.7 and encounter this problem File "../../input_data.py", line 65, in get_data s_index = random.randint(0, len(filenames) - num_frames_per_clip) File "/home/alex/anaconda3/envs/py27/lib/python2.7/random.py", line 244, in randint return self.randrange(a, b+1) File "/home/alex/anaconda3/envs/py27/lib/python2.7/random.py", line 220, in randrange raise ValueError, "empty range for randrange() (%d,%d, %d)" % (istart, istop, width) ValueError: empty range for randrange() (0,-63, -63)

Since len(filenames) - num_frames_per_clip could be smaller than 0, I am not sure how to solve it. I try to make it a positive number later I encounter

File "../../input_data.py", line 67, in get_data image_name = str(filename) + '/' + str(filenames[int(i*sample_rate)+s_index]) IndexError: list index out of range

Do you have any suggestions? Thank you.

bhkim1020 commented 5 years ago

if you don't have image files in related folders, that message shows.

Firstly, folder and file name check.

ilkarman commented 5 years ago

Could be to do with the invalid file-names, e.g. https://github.com/LossNAN/I3D-Tensorflow/blob/master/list/ucf_list/train.list#L160

I had to remember these lines (I wanted to use the original split to match accuracy)

MunanKing commented 4 years ago

has the problem been solved?