Skip to content

Update datafolder to work with bob9's videoLikeContainer file format

Vincent POLLET requested to merge bob_9_datafolder into master

Datafolder used to work with saved FrameContainers, which were hdf5 files containing a dataset per frame, plus a FrameIndexes array:

FrameContainer.hdf5:
    - frame1: CxHxW   
    - frame2: CxHxW 
    ...  
    - FrameIndexes: N

FrameContainers have been deprecated in favor of bob.bio.video.VideoLikeContainer which are stored as hdf5 with a single dataset containing all frames:

VideoLikeContainer.h5:
    - data: NxCxHxW 
    - indices: N 

This MR adapts the datafolder class to the new format with the least changes. It also includes the custom_function of the data_folder_generic.py to allow for custom modifications of the loaded data, taken from DataFolderGeneric (which is now effectively merged into the DataFolder class)

In order to be more robust to future changes to the data format, the loading part of the DataFolder could be using the VideoLikeContainer loading function instead of directly accessing the file.

Merge request reports

Loading