baobab.to_hdf5 script

Converting .npy image files and metadata into HDF5

This script converts the baobab data into the HDF5 format.

Example

To run this script, pass in the baobab out_dir path as the first argument and the framework format as the second, e.g.:

$ to_hdf5 out_data/tdlmc_train_EmpiricalBNNPrior_seed1113 --format 'tf'

The output file will be named tdlmc_train_EmpiricalBNNPrior_seed1113.h5 and can be found inside the directory provided as the first argument.

See the demo notebook demo/Read_hdf5_file.ipynb for instructions on how to access the datasets in this file.

baobab.to_hdf5.main()[source]
baobab.to_hdf5.parse_args()[source]

Parses command-line arguments