Closed huangh12 closed 7 years ago
Video data layer has a minor difference for input_frame and input_video. For video, frame index starts at 0, for frame, index start at 1.
Just make sure the input frames/videos have enough frames for the video_data_layer to read.
Hello, I've compiled the C3D1.1 and try to run feature_extraction.sh in the directory c3d_ucf101_feature_extraction. After changing the video_data_param from use_image: true to use_image: false in the prototxt to enable the net to accept video input rather image frame directly (because I didn't transform ucf101 into images), I got the error below:
Did I miss something? Could anyone help? Thank you very much!
PS: When I refer to image_io.cp to find the corresponding line that raised error, I somewhat think there may be some bug in the code... See codes below please,
Apparently, in the for loop, the program never read the end_frm-th frame, instead the (end_frm-1)-th frame is the final frame being read in a loop. So, the line "CHECK_LE(end_frm, num_of_frames)" is too strict. Since the the program can only read as far as the (end_frm-1)-th frame, it will be more appropriate to write "CHECK_LE(end_frm-1, num_of_frames)". This will make the final frame of each video reachable to the program.
Am I right?
Appended: However, change the end_frm into end_frm-1, make clean, and make all, rerun the shell script, it helps nothing... error still exists
I checked the problem video which is given as
/DataSet/UCF101/UCF-101/ApplyEyeMakeup/v_ApplyEyeMakeup_g09_c04.avi 177 0
in the file ucf101_video_frame.list. I write a python script to read the v_ApplyEyeMakeup_g09_c04.avi using opencv and output the number of total frames. The number is 191. That's to say, it's impossible to start at the frame 177 as ucf101_video_frame.list gives since 177+15 already surpass 191.
Now, I want to ask, are we using the same ucf101 dataset ??
Looking forward to some help..