I3D-Tensorflow icon indicating copy to clipboard operation
I3D-Tensorflow copied to clipboard

train_ucf_rgb s_index problem

Open hyfalex opened this issue 5 years ago • 3 comments

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.

hyfalex avatar Jun 30 '19 05:06 hyfalex

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

Firstly, folder and file name check.

bhkim1020 avatar Jun 30 '19 23:06 bhkim1020

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)

ilkarman avatar Aug 29 '19 20:08 ilkarman

has the problem been solved?

MunanKing avatar Oct 10 '19 08:10 MunanKing