monailabel.utils.others.generic module¶
- monailabel.utils.others.generic.create_dataset_from_path(folder, image_dir='images', label_dir='labels', img_ext='.jpg', lab_ext='.png')[source]¶
- monailabel.utils.others.generic.get_bundle_models(app_dir, conf, conf_key='models')[source]¶
The funtion to get bundle models either from available model zoo or local files. MONAI Label maintains a list of supported bundles, non-labeling bundles are not supported. This function will filter available bundles according to the maintaining list.
- Parameters
app_dir – the app directory path
conf – configs of start_server command
conf_key – default to “models” for monaibundle app, if radiology app wants to use bundle models, “–conf bundles <names>” is used.
- Returns
a dictionary that contains the available bundles.
Example
Bundle name: spleen_ct_segmentation, this will use latest version of the bundle. BUndle name with specific version: spleen_ct_segmentation_v0.4.0, this will download the specified version.
- monailabel.utils.others.generic.gpu_memory_map()[source]¶
Get the current gpu usage.
- Returns
usage – Keys are device ids as integers. Values are memory usage as integers in MB.
- Return type
dict