Commit
·
42d9d49
1
Parent(s):
bfc6a5b
Updated download path to point to the trained_models_v1 release
Browse files
DeepDeformationMapRegistration/utils/model_utils.py
CHANGED
|
@@ -37,7 +37,7 @@ def get_models_path(anatomy: str, model_type: str, output_root_dir: str):
|
|
| 37 |
assert model_type in MODEL_TYPES.keys(), 'Invalid model type'
|
| 38 |
anatomy = ANATOMIES[anatomy]
|
| 39 |
model_type = MODEL_TYPES[model_type]
|
| 40 |
-
url = 'https://github.com/jpdefrutos/DDMR/releases/download/
|
| 41 |
file_path = os.path.join(output_root_dir, 'models', anatomy, model_type + '.h5')
|
| 42 |
if not os.path.exists(file_path):
|
| 43 |
LOGGER.info(f'Model not found. Downloading from {url}... ')
|
|
@@ -66,7 +66,7 @@ def load_model(weights_file_path: str, trainable: bool = False, return_registrat
|
|
| 66 |
|
| 67 |
|
| 68 |
def get_spatialtransformer_model():
|
| 69 |
-
url = 'https://github.com/jpdefrutos/DDMR/releases/download/
|
| 70 |
file_path = os.path.join(os.getcwd(), 'models', 'spatialtransformer.h5')
|
| 71 |
if not os.path.exists(file_path):
|
| 72 |
LOGGER.info(f'Model not found. Downloading from {url}... ')
|
|
|
|
| 37 |
assert model_type in MODEL_TYPES.keys(), 'Invalid model type'
|
| 38 |
anatomy = ANATOMIES[anatomy]
|
| 39 |
model_type = MODEL_TYPES[model_type]
|
| 40 |
+
url = 'https://github.com/jpdefrutos/DDMR/releases/download/trained_models_v1/' + anatomy + '_' + model_type + '.h5'
|
| 41 |
file_path = os.path.join(output_root_dir, 'models', anatomy, model_type + '.h5')
|
| 42 |
if not os.path.exists(file_path):
|
| 43 |
LOGGER.info(f'Model not found. Downloading from {url}... ')
|
|
|
|
| 66 |
|
| 67 |
|
| 68 |
def get_spatialtransformer_model():
|
| 69 |
+
url = 'https://github.com/jpdefrutos/DDMR/releases/download/trained_models_v1/spatialtransformer.h5'
|
| 70 |
file_path = os.path.join(os.getcwd(), 'models', 'spatialtransformer.h5')
|
| 71 |
if not os.path.exists(file_path):
|
| 72 |
LOGGER.info(f'Model not found. Downloading from {url}... ')
|