mednet.engine.segment.dumper¶
Functions
|
Dump annotations from input datamodule. |
- mednet.engine.segment.dumper.run(datamodule, output_folder)[source]¶
Dump annotations from input datamodule.
- Parameters:
datamodule (
LightningDataModule) – The lightning DataModule to extract annotations from.output_folder (
Path) – Folder where to store HDF5 representations of annotations.
- Return type:
dict[str,list[tuple[str,str]]] |list[list[tuple[str,str]]] |list[tuple[str,str]] |None- Returns:
A JSON-able representation of sample data stored at
output_folder. For every split (dataloader), a list of samples in the form[sample-name, hdf5-path]is returned. In the cases where thepredict_dataloader()returns a single loader, we then return a list. A dictionary is returned in casepredict_dataloader()also returns a dictionary.- Raises:
TypeError – If the DataModule’s
predict_dataloader()method does not return any of the types described above.