I would like to reproduce the Two-Stream Convolutional Networks for Action Recognition in Videos.
But it feels Like I have Hit a wall when It comes to giving multi frame input to caffe.
As the single frame network gives 50% accuracy. But when I give an input of 30*227*227 via an LMDB. 20(10 frames each with 3 channels). The accuracy barely reaches 4%.
Which leads me to believe that the input I'm giving to caffe is not in the required format or model is wrong(less likely).
I would like to give an input in the style of 3 x 10 x 227 x 227. But the caffe LMDB has only a few variables as an input. Namely Height,widhth,channels,data,label.
Which lets me write data only in 3 dimensions and then cant the 4th frames dimension.
Does anyone know a work around this?
Or do u know Where I can find any examples of caffe using multi frame data for classification.
As far as I know Caffe uses 4D blobs to handle data and hence cant handle batches even If I get it to work. So it will work with only one sample at a time. And this also depends on how the filters are designed and If they can handle the correlation of the frames as they are in the 4th dimension which is generally used as a batch.
Any Ideas on this?
P.s I have also tried HDF5 similar results.
datum = caffe.proto.caffe_pb2.Datum()
datum.channels =3 #3 for a single image/ 30 for stacking them which I tried and get accuracy of 5%
datum.height = 227
datum.width = 227
datum.data = X[i].tostring() # or .tostring() if numpy < 1.9
datum.label = classlabel
str_id = '{:10}'.format(i+(counter))