facebookarchive / C3D

C3D is a modified version of BVLC caffe to support 3D ConvNets.
Other
1.16k stars 506 forks source link

About the setting of mini_batch_size and number_of_mini_batches #412

Open 953585130 opened 5 years ago

953585130 commented 5 years ago

Hi, I have successfully compiled C3D-v1.0, and the features of the two small screens inside have been successfully extracted.

Then I randomly selected 6 videos in ucf101, then extracted them into frames with ffmpeg, and built a new list of input and output. GLOG_logtosterr=1 ../../build/tools/extract_image_features.bin Prototxt/c3d_sport1m_feature_extractor_frm.prototxt Conv3d_deepnetA_sport1m_iter_1900000 0 50 1 Prototxt/output_list_prefix.txt fc7­1 fc6­1 prob

Since my gpu memory is only 6G, there is a shortage of memory when extracting features, so I changed the 50 to 40 and then it will run successfully. But when I look at the output in the output folder, I found that only the first 4 video folders have feature files, and the last two folders are blank. I don't know what caused this.

When I changed 1 of 0 40 1 to 2, the output folders of these 6 videos have features. My biggest doubt is whether the feature can be completely successful in extracting and number_of_mini_batches is related? There are too many sayings online, so how do I set the size of it? Or is the number_of_mini_batches for any number of video features equal to 1?

look forward to your reply!

SatyaKrishna commented 5 years ago

@953585130 I hope with the following example you can understand. In arguments list 0 50 1 denoting "flag_value"(to say whether you are using GPU or CPU), "mini_batch_size" and last one is "numober_of_mini_batches". first two are ok, but numober_of_mini_batches you have to compute for every video as follows. numober_of_mini_batches = math.ceil( (Total frams in input video) / (16.0 * 50.0) )