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

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?

Open Jiangchitang opened this issue 6 years ago • 9 comments

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

Jiangchitang avatar Jan 29 '19 15:01 Jiangchitang

I have the same problem, can someone fix it?

opababy avatar Feb 20 '19 06:02 opababy

no

Jiangchitang avatar Feb 20 '19 06:02 Jiangchitang

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?

JwDong2019 avatar Feb 21 '19 06:02 JwDong2019

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

sudonto avatar Mar 01 '19 09:03 sudonto

@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 avatar Mar 01 '19 09:03 JwDong2019

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

JwDong2019 avatar Mar 01 '19 09:03 JwDong2019

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

sudonto avatar Mar 01 '19 11:03 sudonto

@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?

onesour avatar May 14 '19 03:05 onesour

@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".

taojiashu avatar Jul 17 '19 09:07 taojiashu