I\'m trying to implement an LRCN/C(LSTM)RNN to classify emotions in videos. My dataset structure is split in two folders - \"train_set\" and \"valid_set\". When you open, e
flow_from_directory
is made for images, not movies. It will not understand your directory structure and will not create a "frames" dimension. You need your own generator (usually better to implement a keras.utils.Sequence)
You can only load into batches if :
Same as 1.
If you make your own generator implementing a keras.utils.Sequence()
, the safety will be kept as long as your implementation knows what is each movie.
It would shuffle images if you were loading images
TimeDistributed
allows data with an extra dimension at index 1. Example: a layer that usually takes (batch_size, ...other dims...)
will take (batch_size, extra_dim, ...other dims...)
. This extra dimension may mean anything, not necessarily time, and it will remain untouched.
(batch_size, video_frames, height, width, channels)