LossNAN / I3D-Tensorflow

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

Dear author According to the README I have encountered some problems. python train_ucf_flow.py Is there a problem with my list file format? #10

Open Jiangchitang opened 5 years ago

Jiangchitang commented 5 years ago

Traceback (most recent call last): File "/home/jhy/3DCNN/I3D-Tensorflow-master/experiments/ucf-101/train_ucf_flow.py", line 183, in tf.app.run() File "/home/jhy/yes/envs/I3D/lib/python2.7/site-packages/tensorflow/python/platform/app.py", line 125, in run _sys.exit(main(argv)) File "/home/jhy/3DCNN/I3D-Tensorflow-master/experiments/ucf-101/train_ucf_flow.py", line 179, in main run_training() File "/home/jhy/3DCNN/I3D-Tensorflow-master/experiments/ucf-101/train_ucf_flow.py", line 133, in run_training shuffle=True File "../../input_data.py", line 194, in read_clip_and_label tmp_label = line[1] IndexError: list index out of range

opababy commented 5 years ago

I have the same problem, can someone fix it?

Jiangchitang commented 5 years ago

no

JwDong2019 commented 5 years ago

I also encounter the problem. I have solved the problem,you can edit the 'read_clip_and_label()' function like this:"
lines = open(filename, 'r') read_dirnames = [] rgb_data = [] flow_data = [] label = [] batch_index = 0 next_batch_start = -1 lines = list(lines)

lines = filename"

but later I get such problem."ValueError: Cannot feed value of shape (16, 4, 224, 224, 3) for Tensor u'Placeholder:0', which has shape '(16, 16, 224, 224, 3)'" Do you know how to solve it?

sudonto commented 5 years ago

@JianweiDong change your sampling size, from 4 -> 16

JwDong2019 commented 5 years ago

@sudonto Thank you ,I have soved the problem by changing the input_data.read_clip_and_label(num_frames_per_clip=FLAGS.num_frame_per_clib*sample_rate) in the train function, and define the sample_rate in the train function the same as input_data python file.

JwDong2019 commented 5 years ago

@sudonto you just change the sample_rate in input_data python file? Can you tell more detailed?

sudonto commented 5 years ago

Actually, I even still has problem running train_ucf_flow.py. Still manage to solve this problem..

onesour commented 5 years ago

@sudonto Hello,did you solve your problem?I also have problem running train_ucf_flow.py.Its about the data_process function in input_data.py.When processing flow data,it show the error call cannot handle this data type.Its seem the error in Image.fromarray.Do you know that?

taojiashu commented 5 years ago

@sudonto you just change the sample_rate in input_data python file? Can you tell more detailed?

You can change the default value of sample_rate in read_clip_and_labe from 4 to 1 in input_data.py. This issue arises because the placeholder is of dimension [batch_size, num_frames_per_clip, crop_size, crop_size, 3 (2 for flow)]. The input data, on the other hand, is of dimension [batch_size, num_frames_per_clip / sample_rate, crop_size, crop_size, 3 (2 for flow)]. So I think either modify the input dimension by setting the sample_rate to 1, or change the placeholder dimension by setting the second dimension to "num_frames_per_clip / sample rate".