|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
""" |
|
|
Collection of the remote MMAR descriptors |
|
|
|
|
|
See Also: |
|
|
- https://docs.nvidia.com/clara/clara-train-sdk/pt/mmar.html |
|
|
""" |
|
|
|
|
|
from __future__ import annotations |
|
|
|
|
|
import os |
|
|
from typing import Any |
|
|
|
|
|
__all__ = ["MODEL_DESC", "RemoteMMARKeys"] |
|
|
|
|
|
|
|
|
class RemoteMMARKeys: |
|
|
""" |
|
|
Data keys used for loading MMAR. |
|
|
ID must uniquely define an MMAR. |
|
|
""" |
|
|
|
|
|
ID = "id" |
|
|
NAME = "name" |
|
|
URL = "url" |
|
|
DOC = "doc" |
|
|
FILE_TYPE = "file_type" |
|
|
HASH_TYPE = "hash_type" |
|
|
HASH_VAL = "hash_val" |
|
|
MODEL_FILE = "model_file" |
|
|
CONFIG_FILE = "config_file" |
|
|
VERSION = "version" |
|
|
|
|
|
|
|
|
MODEL_DESC: tuple[dict[Any, Any], ...] = ( |
|
|
{ |
|
|
RemoteMMARKeys.ID: "clara_pt_spleen_ct_segmentation_1", |
|
|
RemoteMMARKeys.NAME: "clara_pt_spleen_ct_segmentation", |
|
|
RemoteMMARKeys.FILE_TYPE: "zip", |
|
|
RemoteMMARKeys.HASH_TYPE: "md5", |
|
|
RemoteMMARKeys.HASH_VAL: None, |
|
|
RemoteMMARKeys.MODEL_FILE: os.path.join("models", "model.pt"), |
|
|
RemoteMMARKeys.CONFIG_FILE: os.path.join("config", "config_train.json"), |
|
|
RemoteMMARKeys.VERSION: 1, |
|
|
}, |
|
|
{ |
|
|
RemoteMMARKeys.ID: "clara_pt_prostate_mri_segmentation_1", |
|
|
RemoteMMARKeys.NAME: "clara_pt_prostate_mri_segmentation", |
|
|
RemoteMMARKeys.FILE_TYPE: "zip", |
|
|
RemoteMMARKeys.HASH_TYPE: "md5", |
|
|
RemoteMMARKeys.HASH_VAL: None, |
|
|
RemoteMMARKeys.MODEL_FILE: os.path.join("models", "model.pt"), |
|
|
RemoteMMARKeys.CONFIG_FILE: os.path.join("config", "config_train.json"), |
|
|
RemoteMMARKeys.VERSION: 1, |
|
|
}, |
|
|
{ |
|
|
RemoteMMARKeys.ID: "clara_pt_covid19_ct_lesion_segmentation_1", |
|
|
RemoteMMARKeys.NAME: "clara_pt_covid19_ct_lesion_segmentation", |
|
|
RemoteMMARKeys.FILE_TYPE: "zip", |
|
|
RemoteMMARKeys.HASH_TYPE: "md5", |
|
|
RemoteMMARKeys.HASH_VAL: None, |
|
|
RemoteMMARKeys.MODEL_FILE: os.path.join("models", "model.pt"), |
|
|
RemoteMMARKeys.VERSION: 1, |
|
|
}, |
|
|
{ |
|
|
RemoteMMARKeys.ID: "clara_pt_covid19_3d_ct_classification_1", |
|
|
RemoteMMARKeys.NAME: "clara_pt_covid19_3d_ct_classification", |
|
|
RemoteMMARKeys.FILE_TYPE: "zip", |
|
|
RemoteMMARKeys.HASH_TYPE: "md5", |
|
|
RemoteMMARKeys.HASH_VAL: None, |
|
|
RemoteMMARKeys.MODEL_FILE: os.path.join("models", "model.pt"), |
|
|
RemoteMMARKeys.CONFIG_FILE: os.path.join("config", "config_train.json"), |
|
|
RemoteMMARKeys.VERSION: 1, |
|
|
}, |
|
|
{ |
|
|
RemoteMMARKeys.ID: "clara_pt_covid19_ct_lung_annotation_1", |
|
|
RemoteMMARKeys.NAME: "clara_pt_covid19_ct_lung_annotation", |
|
|
RemoteMMARKeys.FILE_TYPE: "zip", |
|
|
RemoteMMARKeys.HASH_TYPE: "md5", |
|
|
RemoteMMARKeys.HASH_VAL: None, |
|
|
RemoteMMARKeys.MODEL_FILE: os.path.join("models", "model.pt"), |
|
|
RemoteMMARKeys.VERSION: 1, |
|
|
}, |
|
|
{ |
|
|
RemoteMMARKeys.ID: "clara_pt_fed_learning_brain_tumor_mri_segmentation_1", |
|
|
RemoteMMARKeys.NAME: "clara_pt_fed_learning_brain_tumor_mri_segmentation", |
|
|
RemoteMMARKeys.FILE_TYPE: "zip", |
|
|
RemoteMMARKeys.HASH_TYPE: "md5", |
|
|
RemoteMMARKeys.HASH_VAL: None, |
|
|
RemoteMMARKeys.MODEL_FILE: os.path.join("models", "server", "best_FL_global_model.pt"), |
|
|
RemoteMMARKeys.VERSION: 1, |
|
|
}, |
|
|
{ |
|
|
RemoteMMARKeys.ID: "clara_pt_pathology_metastasis_detection_1", |
|
|
RemoteMMARKeys.NAME: "clara_pt_pathology_metastasis_detection", |
|
|
RemoteMMARKeys.FILE_TYPE: "zip", |
|
|
RemoteMMARKeys.HASH_TYPE: "md5", |
|
|
RemoteMMARKeys.HASH_VAL: None, |
|
|
RemoteMMARKeys.MODEL_FILE: os.path.join("models", "model.pt"), |
|
|
RemoteMMARKeys.CONFIG_FILE: os.path.join("config", "config_train.json"), |
|
|
RemoteMMARKeys.VERSION: 1, |
|
|
}, |
|
|
{ |
|
|
RemoteMMARKeys.ID: "clara_pt_brain_mri_segmentation_1", |
|
|
RemoteMMARKeys.NAME: "clara_pt_brain_mri_segmentation", |
|
|
RemoteMMARKeys.FILE_TYPE: "zip", |
|
|
RemoteMMARKeys.HASH_TYPE: "md5", |
|
|
RemoteMMARKeys.HASH_VAL: None, |
|
|
RemoteMMARKeys.MODEL_FILE: os.path.join("models", "model.pt"), |
|
|
RemoteMMARKeys.VERSION: 1, |
|
|
}, |
|
|
{ |
|
|
RemoteMMARKeys.ID: "clara_pt_brain_mri_segmentation_t1c_1", |
|
|
RemoteMMARKeys.NAME: "clara_pt_brain_mri_segmentation_t1c", |
|
|
RemoteMMARKeys.FILE_TYPE: "zip", |
|
|
RemoteMMARKeys.HASH_TYPE: "md5", |
|
|
RemoteMMARKeys.HASH_VAL: None, |
|
|
RemoteMMARKeys.MODEL_FILE: os.path.join("models", "model.pt"), |
|
|
RemoteMMARKeys.VERSION: 1, |
|
|
}, |
|
|
{ |
|
|
RemoteMMARKeys.ID: "clara_pt_liver_and_tumor_ct_segmentation_1", |
|
|
RemoteMMARKeys.NAME: "clara_pt_liver_and_tumor_ct_segmentation", |
|
|
RemoteMMARKeys.FILE_TYPE: "zip", |
|
|
RemoteMMARKeys.HASH_TYPE: "md5", |
|
|
RemoteMMARKeys.HASH_VAL: None, |
|
|
RemoteMMARKeys.MODEL_FILE: os.path.join("models", "model.pt"), |
|
|
RemoteMMARKeys.CONFIG_FILE: os.path.join("config", "config_train.json"), |
|
|
RemoteMMARKeys.VERSION: 1, |
|
|
}, |
|
|
{ |
|
|
RemoteMMARKeys.ID: "clara_pt_pancreas_and_tumor_ct_segmentation_1", |
|
|
RemoteMMARKeys.NAME: "clara_pt_pancreas_and_tumor_ct_segmentation", |
|
|
RemoteMMARKeys.FILE_TYPE: "zip", |
|
|
RemoteMMARKeys.HASH_TYPE: "md5", |
|
|
RemoteMMARKeys.HASH_VAL: None, |
|
|
RemoteMMARKeys.MODEL_FILE: os.path.join("models", "model.pt"), |
|
|
RemoteMMARKeys.CONFIG_FILE: os.path.join("config", "config_train.json"), |
|
|
RemoteMMARKeys.VERSION: 1, |
|
|
}, |
|
|
{ |
|
|
RemoteMMARKeys.ID: "clara_pt_brain_mri_annotation_t1c_1", |
|
|
RemoteMMARKeys.NAME: "clara_pt_brain_mri_annotation_t1c", |
|
|
RemoteMMARKeys.FILE_TYPE: "zip", |
|
|
RemoteMMARKeys.HASH_TYPE: "md5", |
|
|
RemoteMMARKeys.HASH_VAL: None, |
|
|
RemoteMMARKeys.MODEL_FILE: os.path.join("models", "model.pt"), |
|
|
RemoteMMARKeys.VERSION: 1, |
|
|
}, |
|
|
{ |
|
|
RemoteMMARKeys.ID: "clara_pt_spleen_ct_annotation_1", |
|
|
RemoteMMARKeys.NAME: "clara_pt_spleen_ct_annotation", |
|
|
RemoteMMARKeys.FILE_TYPE: "zip", |
|
|
RemoteMMARKeys.HASH_TYPE: "md5", |
|
|
RemoteMMARKeys.HASH_VAL: None, |
|
|
RemoteMMARKeys.MODEL_FILE: os.path.join("models", "model.pt"), |
|
|
RemoteMMARKeys.CONFIG_FILE: os.path.join("config", "config_train.json"), |
|
|
RemoteMMARKeys.VERSION: 1, |
|
|
}, |
|
|
{ |
|
|
RemoteMMARKeys.ID: "clara_pt_deepgrow_3d_annotation_1", |
|
|
RemoteMMARKeys.NAME: "clara_pt_deepgrow_3d_annotation", |
|
|
RemoteMMARKeys.FILE_TYPE: "zip", |
|
|
RemoteMMARKeys.HASH_TYPE: "md5", |
|
|
RemoteMMARKeys.HASH_VAL: None, |
|
|
RemoteMMARKeys.MODEL_FILE: os.path.join("models", "model.pt"), |
|
|
RemoteMMARKeys.CONFIG_FILE: os.path.join("config", "config_train.json"), |
|
|
RemoteMMARKeys.VERSION: 1, |
|
|
}, |
|
|
{ |
|
|
RemoteMMARKeys.ID: "clara_pt_deepgrow_2d_annotation_1", |
|
|
RemoteMMARKeys.NAME: "clara_pt_deepgrow_2d_annotation", |
|
|
RemoteMMARKeys.FILE_TYPE: "zip", |
|
|
RemoteMMARKeys.HASH_TYPE: "md5", |
|
|
RemoteMMARKeys.HASH_VAL: None, |
|
|
RemoteMMARKeys.MODEL_FILE: os.path.join("models", "model.pt"), |
|
|
RemoteMMARKeys.CONFIG_FILE: os.path.join("config", "config_train.json"), |
|
|
RemoteMMARKeys.VERSION: 1, |
|
|
}, |
|
|
{ |
|
|
RemoteMMARKeys.ID: "clara_pt_covid19_ct_lung_segmentation_1", |
|
|
RemoteMMARKeys.NAME: "clara_pt_covid19_ct_lung_segmentation", |
|
|
RemoteMMARKeys.FILE_TYPE: "zip", |
|
|
RemoteMMARKeys.HASH_TYPE: "md5", |
|
|
RemoteMMARKeys.HASH_VAL: None, |
|
|
RemoteMMARKeys.MODEL_FILE: os.path.join("models", "model.pt"), |
|
|
RemoteMMARKeys.CONFIG_FILE: os.path.join("config", "config_train.json"), |
|
|
RemoteMMARKeys.VERSION: 1, |
|
|
}, |
|
|
{ |
|
|
RemoteMMARKeys.ID: "clara_pt_unetr_ct_btcv_segmentation", |
|
|
RemoteMMARKeys.NAME: "clara_pt_unetr_ct_btcv_segmentation", |
|
|
RemoteMMARKeys.FILE_TYPE: "zip", |
|
|
RemoteMMARKeys.HASH_TYPE: "md5", |
|
|
RemoteMMARKeys.HASH_VAL: None, |
|
|
RemoteMMARKeys.MODEL_FILE: os.path.join("models", "model.pt"), |
|
|
RemoteMMARKeys.CONFIG_FILE: os.path.join("config", "config_train.json"), |
|
|
RemoteMMARKeys.VERSION: 4.1, |
|
|
}, |
|
|
{ |
|
|
RemoteMMARKeys.ID: "clara_pt_chest_xray_classification", |
|
|
RemoteMMARKeys.NAME: "clara_pt_chest_xray_classification", |
|
|
RemoteMMARKeys.FILE_TYPE: "zip", |
|
|
RemoteMMARKeys.HASH_TYPE: "md5", |
|
|
RemoteMMARKeys.HASH_VAL: None, |
|
|
RemoteMMARKeys.MODEL_FILE: os.path.join("models", "model.pt"), |
|
|
RemoteMMARKeys.CONFIG_FILE: os.path.join("config", "config_train.json"), |
|
|
RemoteMMARKeys.VERSION: 4.1, |
|
|
}, |
|
|
{ |
|
|
RemoteMMARKeys.ID: "clara_pt_self_supervised_learning_segmentation", |
|
|
RemoteMMARKeys.NAME: "clara_pt_self_supervised_learning_segmentation", |
|
|
RemoteMMARKeys.FILE_TYPE: "zip", |
|
|
RemoteMMARKeys.HASH_TYPE: "md5", |
|
|
RemoteMMARKeys.HASH_VAL: None, |
|
|
RemoteMMARKeys.MODEL_FILE: os.path.join("models_2gpu", "best_metric_model.pt"), |
|
|
RemoteMMARKeys.CONFIG_FILE: os.path.join("config", "config_train.json"), |
|
|
RemoteMMARKeys.VERSION: 4.1, |
|
|
}, |
|
|
) |
|
|
|