Data processing workflow

Once the files are in MP4 format, we can start extracting the features. Now, in order to process the UCF101 dataset and extract the features, I wrote three more Java classes, outlined as follows:

  • UCF101Reader.java: This is the main entry point for video file reading, decoding, and conversion to ND4J vectors. It receives the full path to the dataset and creates the DataSetIterator required for the neural network. In addition, it generates a list of all classes, and it assigns sequential integers for them.
  • UCF101ReaderIterable.java: This reads all the clips and decodes using JCodec.
  • RecordReaderMultiDataSetIterator.java: This is similar to the one provided by DL4J but an improved version, which works pretty well on ...

Get Java Deep Learning Projects now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.