def main(args):
    'Main function to parse in Nuclei Dataset from Kaggle and store as HDF5\n\n    Parameters\n    ----------\n        args: ArgumentParser()\n            input_dir: str\n                directory of the Nuclei data\n            output_dir: str\n                path to the HDF5 output directory\n    '
    hdf5_fn = h5py.File(os.path.join(args.output_dir, 'data_360.hdf5'), 'a')
    data_dirs = glob(os.path.join(args.input_dir, '*/'))
    with tqdm.tqdm(total=len(data_dirs), unit='folder') as progress_bar:
        for path in data_dirs:
            data_name = path.split('/')[(- 2)]
            (x, y, masks) = parse_data(path)
            if (x is None):
                progress_bar.update(1)
                continue
            y = np.expand_dims(y, axis=0)
            data = np.vstack((x, y, masks))
            hdf5_fn.create_dataset(str(data_name), data=data, dtype=np.float, chunks=True)
            progress_bar.update(1)
    hdf5_fn.close()
Main function to parse in Nuclei Dataset from Kaggle and store as HDF5

Parameters
----------
    args: ArgumentParser()
        input_dir: str
            directory of the Nuclei data
        output_dir: str
            path to the HDF5 output directory
def main(args):
    'Main function to parse in Nuclei Dataset from Kaggle and store as HDF5\n\n    Parameters\n    ----------\n        args: ArgumentParser()\n            input_dir: str\n                directory of the Nuclei data\n            output_dir: str\n                path to the HDF5 output directory\n    '
    hdf5_fn = h5py.File(os.path.join(args.output_dir, 'data_360.hdf5'), 'a')
    data_dirs = glob(os.path.join(args.input_dir, '*/'))
    with tqdm.tqdm(total=len(data_dirs), unit='folder') as progress_bar:
        for path in data_dirs:
            data_name = path.split('/')[(- 2)]
            (x, y, masks) = parse_data(path)
            if (x is None):
                progress_bar.update(1)
                continue
            y = np.expand_dims(y, axis=0)
            data = np.vstack((x, y, masks))
            hdf5_fn.create_dataset(str(data_name), data=data, dtype=np.float, chunks=True)
            progress_bar.update(1)
    hdf5_fn.close()