monai-weekly 1.4.dev2429__py3-none-any.whl → 1.4.dev2430__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- monai/__init__.py +1 -1
- monai/_version.py +3 -3
- monai/apps/auto3dseg/hpo_gen.py +1 -1
- monai/apps/pathology/transforms/post/array.py +6 -4
- monai/auto3dseg/analyzer.py +1 -1
- monai/bundle/scripts.py +111 -27
- monai/data/meta_tensor.py +2 -2
- monai/data/test_time_augmentation.py +2 -0
- monai/metrics/cumulative_average.py +2 -0
- monai/metrics/panoptic_quality.py +1 -1
- monai/metrics/rocauc.py +2 -2
- monai/networks/blocks/crossattention.py +3 -1
- monai/networks/blocks/selfattention.py +2 -0
- monai/networks/blocks/transformerblock.py +7 -6
- monai/networks/layers/simplelayers.py +1 -1
- monai/networks/nets/quicknat.py +6 -6
- monai/transforms/croppad/array.py +8 -8
- monai/transforms/croppad/dictionary.py +4 -4
- monai/transforms/croppad/functional.py +1 -1
- monai/transforms/spatial/array.py +1 -1
- monai/visualize/class_activation_maps.py +5 -5
- monai/visualize/img2tensorboard.py +3 -1
- {monai_weekly-1.4.dev2429.dist-info → monai_weekly-1.4.dev2430.dist-info}/METADATA +1 -1
- {monai_weekly-1.4.dev2429.dist-info → monai_weekly-1.4.dev2430.dist-info}/RECORD +27 -27
- {monai_weekly-1.4.dev2429.dist-info → monai_weekly-1.4.dev2430.dist-info}/WHEEL +1 -1
- {monai_weekly-1.4.dev2429.dist-info → monai_weekly-1.4.dev2430.dist-info}/LICENSE +0 -0
- {monai_weekly-1.4.dev2429.dist-info → monai_weekly-1.4.dev2430.dist-info}/top_level.txt +0 -0
monai/__init__.py
CHANGED
monai/_version.py
CHANGED
@@ -8,11 +8,11 @@ import json
|
|
8
8
|
|
9
9
|
version_json = '''
|
10
10
|
{
|
11
|
-
"date": "2024-07-
|
11
|
+
"date": "2024-07-28T02:19:22+0000",
|
12
12
|
"dirty": false,
|
13
13
|
"error": null,
|
14
|
-
"full-revisionid": "
|
15
|
-
"version": "1.4.
|
14
|
+
"full-revisionid": "9dd92b4a07706d4b80edace3d39fe008dc805d5a",
|
15
|
+
"version": "1.4.dev2430"
|
16
16
|
}
|
17
17
|
''' # END VERSION_JSON
|
18
18
|
|
monai/apps/auto3dseg/hpo_gen.py
CHANGED
@@ -28,7 +28,7 @@ from monai.transforms import (
|
|
28
28
|
SobelGradients,
|
29
29
|
)
|
30
30
|
from monai.transforms.transform import Transform
|
31
|
-
from monai.transforms.utils_pytorch_numpy_unification import max, maximum, min, sum, unique
|
31
|
+
from monai.transforms.utils_pytorch_numpy_unification import max, maximum, min, sum, unique, where
|
32
32
|
from monai.utils import TransformBackends, convert_to_numpy, optional_import
|
33
33
|
from monai.utils.misc import ensure_tuple_rep
|
34
34
|
from monai.utils.type_conversion import convert_to_dst_type, convert_to_tensor
|
@@ -162,7 +162,8 @@ class GenerateWatershedMask(Transform):
|
|
162
162
|
pred = label(pred)[0]
|
163
163
|
if self.remove_small_objects is not None:
|
164
164
|
pred = self.remove_small_objects(pred)
|
165
|
-
pred
|
165
|
+
pred_indices = np.where(pred > 0)
|
166
|
+
pred[pred_indices] = 1
|
166
167
|
|
167
168
|
return convert_to_dst_type(pred, prob_map, dtype=self.dtype)[0]
|
168
169
|
|
@@ -338,7 +339,8 @@ class GenerateWatershedMarkers(Transform):
|
|
338
339
|
instance_border = instance_border >= self.threshold # uncertain area
|
339
340
|
|
340
341
|
marker = mask - convert_to_dst_type(instance_border, mask)[0] # certain foreground
|
341
|
-
marker
|
342
|
+
marker_indices = where(marker < 0)
|
343
|
+
marker[marker_indices] = 0 # type: ignore[index]
|
342
344
|
marker = self.postprocess_fn(marker)
|
343
345
|
marker = convert_to_numpy(marker)
|
344
346
|
|
@@ -635,7 +637,7 @@ class GenerateInstanceType(Transform):
|
|
635
637
|
|
636
638
|
seg_map_crop = convert_to_dst_type(seg_map_crop == instance_id, type_map_crop, dtype=bool)[0]
|
637
639
|
|
638
|
-
inst_type = type_map_crop[seg_map_crop]
|
640
|
+
inst_type = type_map_crop[seg_map_crop] # type: ignore[index]
|
639
641
|
type_list, type_pixels = unique(inst_type, return_counts=True)
|
640
642
|
type_list = list(zip(type_list, type_pixels))
|
641
643
|
type_list = sorted(type_list, key=lambda x: x[1], reverse=True)
|
monai/auto3dseg/analyzer.py
CHANGED
@@ -470,7 +470,7 @@ class LabelStats(Analyzer):
|
|
470
470
|
|
471
471
|
unique_label = unique(ndas_label)
|
472
472
|
if isinstance(ndas_label, (MetaTensor, torch.Tensor)):
|
473
|
-
unique_label = unique_label.data.cpu().numpy()
|
473
|
+
unique_label = unique_label.data.cpu().numpy() # type: ignore[assignment]
|
474
474
|
|
475
475
|
unique_label = unique_label.astype(np.int16).tolist()
|
476
476
|
|
monai/bundle/scripts.py
CHANGED
@@ -27,7 +27,7 @@ from typing import Any, Callable
|
|
27
27
|
import torch
|
28
28
|
from torch.cuda import is_available
|
29
29
|
|
30
|
-
from monai.
|
30
|
+
from monai._version import get_versions
|
31
31
|
from monai.apps.utils import _basename, download_url, extractall, get_logger
|
32
32
|
from monai.bundle.config_item import ConfigComponent
|
33
33
|
from monai.bundle.config_parser import ConfigParser
|
@@ -67,6 +67,9 @@ logger = get_logger(module_name=__name__)
|
|
67
67
|
DEFAULT_DOWNLOAD_SOURCE = os.environ.get("BUNDLE_DOWNLOAD_SRC", "monaihosting")
|
68
68
|
PPRINT_CONFIG_N = 5
|
69
69
|
|
70
|
+
MONAI_HOSTING_BASE_URL = "https://api.ngc.nvidia.com/v2/models/nvidia/monaihosting"
|
71
|
+
NGC_BASE_URL = "https://api.ngc.nvidia.com/v2/models/nvidia/monaitoolkit"
|
72
|
+
|
70
73
|
|
71
74
|
def update_kwargs(args: str | dict | None = None, ignore_none: bool = True, **kwargs: Any) -> dict:
|
72
75
|
"""
|
@@ -169,16 +172,19 @@ def _get_git_release_url(repo_owner: str, repo_name: str, tag_name: str, filenam
|
|
169
172
|
|
170
173
|
|
171
174
|
def _get_ngc_bundle_url(model_name: str, version: str) -> str:
|
172
|
-
return f"
|
175
|
+
return f"{NGC_BASE_URL}/{model_name.lower()}/versions/{version}/zip"
|
176
|
+
|
177
|
+
|
178
|
+
def _get_ngc_private_base_url(repo: str) -> str:
|
179
|
+
return f"https://api.ngc.nvidia.com/v2/{repo}/models"
|
173
180
|
|
174
181
|
|
175
182
|
def _get_ngc_private_bundle_url(model_name: str, version: str, repo: str) -> str:
|
176
|
-
return f"
|
183
|
+
return f"{_get_ngc_private_base_url(repo)}/{model_name.lower()}/versions/{version}/zip"
|
177
184
|
|
178
185
|
|
179
186
|
def _get_monaihosting_bundle_url(model_name: str, version: str) -> str:
|
180
|
-
|
181
|
-
return f"{monaihosting_root_path}/{model_name.lower()}/versions/{version}/files/{model_name}_v{version}.zip"
|
187
|
+
return f"{MONAI_HOSTING_BASE_URL}/{model_name.lower()}/versions/{version}/files/{model_name}_v{version}.zip"
|
182
188
|
|
183
189
|
|
184
190
|
def _download_from_github(repo: str, download_path: Path, filename: str, progress: bool = True) -> None:
|
@@ -267,8 +273,7 @@ def _get_ngc_token(api_key, retry=0):
|
|
267
273
|
|
268
274
|
|
269
275
|
def _get_latest_bundle_version_monaihosting(name):
|
270
|
-
|
271
|
-
full_url = f"{url}/{name.lower()}"
|
276
|
+
full_url = f"{MONAI_HOSTING_BASE_URL}/{name.lower()}"
|
272
277
|
requests_get, has_requests = optional_import("requests", name="get")
|
273
278
|
if has_requests:
|
274
279
|
resp = requests_get(full_url)
|
@@ -279,18 +284,100 @@ def _get_latest_bundle_version_monaihosting(name):
|
|
279
284
|
return model_info["model"]["latestVersionIdStr"]
|
280
285
|
|
281
286
|
|
282
|
-
def
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
if
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
287
|
+
def _examine_monai_version(monai_version: str) -> tuple[bool, str]:
|
288
|
+
"""Examine if the package version is compatible with the MONAI version in the metadata."""
|
289
|
+
version_dict = get_versions()
|
290
|
+
package_version = version_dict.get("version", "0+unknown")
|
291
|
+
if package_version == "0+unknown":
|
292
|
+
return False, "Package version is not available. Skipping version check."
|
293
|
+
if monai_version == "0+unknown":
|
294
|
+
return False, "MONAI version is not specified in the bundle. Skipping version check."
|
295
|
+
# treat rc versions as the same as the release version
|
296
|
+
package_version = re.sub(r"rc\d.*", "", package_version)
|
297
|
+
monai_version = re.sub(r"rc\d.*", "", monai_version)
|
298
|
+
if package_version < monai_version:
|
299
|
+
return (
|
300
|
+
False,
|
301
|
+
f"Your MONAI version is {package_version}, but the bundle is built on MONAI version {monai_version}.",
|
302
|
+
)
|
303
|
+
return True, ""
|
304
|
+
|
305
|
+
|
306
|
+
def _check_monai_version(bundle_dir: PathLike, name: str) -> None:
|
307
|
+
"""Get the `monai_version` from the metadata.json and compare if it is smaller than the installed `monai` package version"""
|
308
|
+
metadata_file = Path(bundle_dir) / name / "configs" / "metadata.json"
|
309
|
+
if not metadata_file.exists():
|
310
|
+
logger.warning(f"metadata file not found in {metadata_file}.")
|
311
|
+
return
|
312
|
+
with open(metadata_file) as f:
|
313
|
+
metadata = json.load(f)
|
314
|
+
is_compatible, msg = _examine_monai_version(metadata.get("monai_version", "0+unknown"))
|
315
|
+
if not is_compatible:
|
316
|
+
logger.warning(msg)
|
317
|
+
|
318
|
+
|
319
|
+
def _list_latest_versions(data: dict, max_versions: int = 3) -> list[str]:
|
320
|
+
"""
|
321
|
+
Extract the latest versions from the data dictionary.
|
322
|
+
|
323
|
+
Args:
|
324
|
+
data: the data dictionary.
|
325
|
+
max_versions: the maximum number of versions to return.
|
326
|
+
|
327
|
+
Returns:
|
328
|
+
versions of the latest models in the reverse order of creation date, e.g. ['1.0.0', '0.9.0', '0.8.0'].
|
329
|
+
"""
|
330
|
+
# Check if the data is a dictionary and it has the key 'modelVersions'
|
331
|
+
if not isinstance(data, dict) or "modelVersions" not in data:
|
332
|
+
raise ValueError("The data is not a dictionary or it does not have the key 'modelVersions'.")
|
333
|
+
|
334
|
+
# Extract the list of model versions
|
335
|
+
model_versions = data["modelVersions"]
|
336
|
+
|
337
|
+
if (
|
338
|
+
not isinstance(model_versions, list)
|
339
|
+
or len(model_versions) == 0
|
340
|
+
or "createdDate" not in model_versions[0]
|
341
|
+
or "versionId" not in model_versions[0]
|
342
|
+
):
|
343
|
+
raise ValueError(
|
344
|
+
"The model versions are not a list or it is empty or it does not have the keys 'createdDate' and 'versionId'."
|
345
|
+
)
|
346
|
+
|
347
|
+
# Sort the versions by the 'createdDate' in descending order
|
348
|
+
sorted_versions = sorted(model_versions, key=lambda x: x["createdDate"], reverse=True)
|
349
|
+
return [v["versionId"] for v in sorted_versions[:max_versions]]
|
350
|
+
|
351
|
+
|
352
|
+
def _get_latest_bundle_version_ngc(name: str, repo: str | None = None, headers: dict | None = None) -> str:
|
353
|
+
base_url = _get_ngc_private_base_url(repo) if repo else NGC_BASE_URL
|
354
|
+
version_endpoint = base_url + f"/{name.lower()}/versions/"
|
355
|
+
|
356
|
+
if not has_requests:
|
357
|
+
raise ValueError("requests package is required, please install it.")
|
358
|
+
|
359
|
+
version_header = {"Accept-Encoding": "gzip, deflate"} # Excluding 'zstd' to fit NGC requirements
|
360
|
+
if headers:
|
361
|
+
version_header.update(headers)
|
362
|
+
resp = requests_get(version_endpoint, headers=version_header)
|
363
|
+
resp.raise_for_status()
|
292
364
|
model_info = json.loads(resp.text)
|
293
|
-
|
365
|
+
latest_versions = _list_latest_versions(model_info)
|
366
|
+
|
367
|
+
for version in latest_versions:
|
368
|
+
file_endpoint = base_url + f"/{name.lower()}/versions/{version}/files/configs/metadata.json"
|
369
|
+
resp = requests_get(file_endpoint, headers=headers)
|
370
|
+
metadata = json.loads(resp.text)
|
371
|
+
resp.raise_for_status()
|
372
|
+
# if the package version is not available or the model is compatible with the package version
|
373
|
+
is_compatible, _ = _examine_monai_version(metadata["monai_version"])
|
374
|
+
if is_compatible:
|
375
|
+
if version != latest_versions[0]:
|
376
|
+
logger.info(f"Latest version is {latest_versions[0]}, but the compatible version is {version}.")
|
377
|
+
return version
|
378
|
+
|
379
|
+
# if no compatible version is found, return the latest version
|
380
|
+
return latest_versions[0]
|
294
381
|
|
295
382
|
|
296
383
|
def _get_latest_bundle_version(
|
@@ -298,17 +385,13 @@ def _get_latest_bundle_version(
|
|
298
385
|
) -> dict[str, list[str] | str] | Any | None:
|
299
386
|
if source == "ngc":
|
300
387
|
name = _add_ngc_prefix(name)
|
301
|
-
|
302
|
-
for v in model_dict.values():
|
303
|
-
if v["name"] == name:
|
304
|
-
return v["latest"]
|
305
|
-
return None
|
388
|
+
return _get_latest_bundle_version_ngc(name)
|
306
389
|
elif source == "monaihosting":
|
307
390
|
return _get_latest_bundle_version_monaihosting(name)
|
308
391
|
elif source == "ngc_private":
|
309
392
|
headers = kwargs.pop("headers", {})
|
310
393
|
name = _add_ngc_prefix(name)
|
311
|
-
return
|
394
|
+
return _get_latest_bundle_version_ngc(name, repo=repo, headers=headers)
|
312
395
|
elif source == "github":
|
313
396
|
repo_owner, repo_name, tag_name = repo.split("/")
|
314
397
|
return get_bundle_versions(name, repo=f"{repo_owner}/{repo_name}", tag=tag_name)["latest_version"]
|
@@ -470,9 +553,8 @@ def download(
|
|
470
553
|
if version_ is None:
|
471
554
|
version_ = _get_latest_bundle_version(source=source_, name=name_, repo=repo_, headers=headers)
|
472
555
|
if source_ == "github":
|
473
|
-
if version_ is not None
|
474
|
-
|
475
|
-
_download_from_github(repo=repo_, download_path=bundle_dir_, filename=name_, progress=progress_)
|
556
|
+
name_ver = "_v".join([name_, version_]) if version_ is not None else name_
|
557
|
+
_download_from_github(repo=repo_, download_path=bundle_dir_, filename=name_ver, progress=progress_)
|
476
558
|
elif source_ == "monaihosting":
|
477
559
|
_download_from_monaihosting(download_path=bundle_dir_, filename=name_, version=version_, progress=progress_)
|
478
560
|
elif source_ == "ngc":
|
@@ -501,6 +583,8 @@ def download(
|
|
501
583
|
f"got source: {source_}."
|
502
584
|
)
|
503
585
|
|
586
|
+
_check_monai_version(bundle_dir_, name_)
|
587
|
+
|
504
588
|
|
505
589
|
@deprecated_arg("net_name", since="1.2", removed="1.5", msg_suffix="please use ``model`` instead.")
|
506
590
|
@deprecated_arg("net_kwargs", since="1.2", removed="1.5", msg_suffix="please use ``model`` instead.")
|
monai/data/meta_tensor.py
CHANGED
@@ -505,7 +505,7 @@ class MetaTensor(MetaObj, torch.Tensor):
|
|
505
505
|
a = self.pending_operations[-1].get(LazyAttr.AFFINE, None) if self.pending_operations else self.affine
|
506
506
|
return 1 if a is None else int(max(1, len(a) - 1))
|
507
507
|
|
508
|
-
def new_empty(self, size, dtype=None, device=None, requires_grad=False):
|
508
|
+
def new_empty(self, size, dtype=None, device=None, requires_grad=False): # type: ignore[override]
|
509
509
|
"""
|
510
510
|
must be defined for deepcopy to work
|
511
511
|
|
@@ -580,7 +580,7 @@ class MetaTensor(MetaObj, torch.Tensor):
|
|
580
580
|
img.affine = MetaTensor.get_default_affine()
|
581
581
|
return img
|
582
582
|
|
583
|
-
def __repr__(self):
|
583
|
+
def __repr__(self): # type: ignore[override]
|
584
584
|
"""
|
585
585
|
Prints a representation of the tensor.
|
586
586
|
Prepends "meta" to ``torch.Tensor.__repr__``.
|
@@ -65,6 +65,7 @@ class CumulativeAverage:
|
|
65
65
|
if self.val is None:
|
66
66
|
return 0
|
67
67
|
|
68
|
+
val: NdarrayOrTensor
|
68
69
|
val = self.val.clone()
|
69
70
|
val[~torch.isfinite(val)] = 0
|
70
71
|
|
@@ -96,6 +97,7 @@ class CumulativeAverage:
|
|
96
97
|
dist.all_reduce(sum)
|
97
98
|
dist.all_reduce(count)
|
98
99
|
|
100
|
+
val: NdarrayOrTensor
|
99
101
|
val = torch.where(count > 0, sum / count, sum)
|
100
102
|
|
101
103
|
if to_numpy:
|
@@ -274,7 +274,7 @@ def _get_paired_iou(
|
|
274
274
|
|
275
275
|
return paired_iou, paired_true, paired_pred
|
276
276
|
|
277
|
-
pairwise_iou = pairwise_iou.cpu().numpy()
|
277
|
+
pairwise_iou = pairwise_iou.cpu().numpy() # type: ignore[assignment]
|
278
278
|
paired_true, paired_pred = linear_sum_assignment(-pairwise_iou)
|
279
279
|
paired_iou = pairwise_iou[paired_true, paired_pred]
|
280
280
|
paired_true = torch.as_tensor(list(paired_true[paired_iou > match_iou_threshold] + 1), device=device)
|
monai/metrics/rocauc.py
CHANGED
@@ -88,8 +88,8 @@ def _calculate(y_pred: torch.Tensor, y: torch.Tensor) -> float:
|
|
88
88
|
|
89
89
|
n = len(y)
|
90
90
|
indices = y_pred.argsort()
|
91
|
-
y = y[indices].cpu().numpy()
|
92
|
-
y_pred = y_pred[indices].cpu().numpy()
|
91
|
+
y = y[indices].cpu().numpy() # type: ignore[assignment]
|
92
|
+
y_pred = y_pred[indices].cpu().numpy() # type: ignore[assignment]
|
93
93
|
nneg = auc = tmp_pos = tmp_neg = 0.0
|
94
94
|
|
95
95
|
for i in range(n):
|
@@ -109,6 +109,8 @@ class CrossAttentionBlock(nn.Module):
|
|
109
109
|
torch.tril(torch.ones(sequence_length, sequence_length)).view(1, 1, sequence_length, sequence_length),
|
110
110
|
)
|
111
111
|
self.causal_mask: torch.Tensor
|
112
|
+
else:
|
113
|
+
self.causal_mask = torch.Tensor()
|
112
114
|
|
113
115
|
self.att_mat = torch.Tensor()
|
114
116
|
self.rel_positional_embedding = (
|
@@ -118,7 +120,7 @@ class CrossAttentionBlock(nn.Module):
|
|
118
120
|
)
|
119
121
|
self.input_size = input_size
|
120
122
|
|
121
|
-
def forward(self, x: torch.Tensor, context: torch.Tensor
|
123
|
+
def forward(self, x: torch.Tensor, context: Optional[torch.Tensor] = None):
|
122
124
|
"""
|
123
125
|
Args:
|
124
126
|
x (torch.Tensor): input tensor. B x (s_dim_1 * ... * s_dim_n) x C
|
@@ -105,6 +105,8 @@ class SABlock(nn.Module):
|
|
105
105
|
torch.tril(torch.ones(sequence_length, sequence_length)).view(1, 1, sequence_length, sequence_length),
|
106
106
|
)
|
107
107
|
self.causal_mask: torch.Tensor
|
108
|
+
else:
|
109
|
+
self.causal_mask = torch.Tensor()
|
108
110
|
|
109
111
|
self.rel_positional_embedding = (
|
110
112
|
get_rel_pos_embedding_layer(rel_pos_embedding, input_size, self.dim_head, self.num_heads)
|
@@ -11,6 +11,8 @@
|
|
11
11
|
|
12
12
|
from __future__ import annotations
|
13
13
|
|
14
|
+
from typing import Optional
|
15
|
+
|
14
16
|
import torch
|
15
17
|
import torch.nn as nn
|
16
18
|
|
@@ -68,13 +70,12 @@ class TransformerBlock(nn.Module):
|
|
68
70
|
self.norm2 = nn.LayerNorm(hidden_size)
|
69
71
|
self.with_cross_attention = with_cross_attention
|
70
72
|
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
)
|
73
|
+
self.norm_cross_attn = nn.LayerNorm(hidden_size)
|
74
|
+
self.cross_attn = CrossAttentionBlock(
|
75
|
+
hidden_size=hidden_size, num_heads=num_heads, dropout_rate=dropout_rate, qkv_bias=qkv_bias, causal=False
|
76
|
+
)
|
76
77
|
|
77
|
-
def forward(self, x: torch.Tensor, context: torch.Tensor
|
78
|
+
def forward(self, x: torch.Tensor, context: Optional[torch.Tensor] = None) -> torch.Tensor:
|
78
79
|
x = x + self.attn(self.norm1(x))
|
79
80
|
if self.with_cross_attention:
|
80
81
|
x = x + self.cross_attn(self.norm_cross_attn(x), context=context)
|
@@ -452,7 +452,7 @@ def get_binary_kernel(window_size: Sequence[int], dtype=torch.float, device=None
|
|
452
452
|
|
453
453
|
def median_filter(
|
454
454
|
in_tensor: torch.Tensor,
|
455
|
-
kernel_size: Sequence[int] = (3, 3, 3),
|
455
|
+
kernel_size: Sequence[int] | int = (3, 3, 3),
|
456
456
|
spatial_dims: int = 3,
|
457
457
|
kernel: torch.Tensor | None = None,
|
458
458
|
**kwargs,
|
monai/networks/nets/quicknat.py
CHANGED
@@ -42,7 +42,7 @@ class SkipConnectionWithIdx(SkipConnection):
|
|
42
42
|
Inherits from SkipConnection but provides the indizes with each forward pass.
|
43
43
|
"""
|
44
44
|
|
45
|
-
def forward(self, input, indices):
|
45
|
+
def forward(self, input, indices): # type: ignore[override]
|
46
46
|
return super().forward(input), indices
|
47
47
|
|
48
48
|
|
@@ -57,7 +57,7 @@ class SequentialWithIdx(nn.Sequential):
|
|
57
57
|
def __init__(self, *args):
|
58
58
|
super().__init__(*args)
|
59
59
|
|
60
|
-
def forward(self, input, indices):
|
60
|
+
def forward(self, input, indices): # type: ignore[override]
|
61
61
|
for module in self:
|
62
62
|
input, indices = module(input, indices)
|
63
63
|
return input, indices
|
@@ -165,7 +165,7 @@ class ConvConcatDenseBlock(ConvDenseBlock):
|
|
165
165
|
)
|
166
166
|
return nn.Sequential(conv.get_submodule("adn"), conv.get_submodule("conv"))
|
167
167
|
|
168
|
-
def forward(self, input, _):
|
168
|
+
def forward(self, input, _): # type: ignore[override]
|
169
169
|
i = 0
|
170
170
|
result = input
|
171
171
|
result1 = input # this will not stay this value, needed here for pylint/mypy
|
@@ -215,7 +215,7 @@ class Encoder(ConvConcatDenseBlock):
|
|
215
215
|
super().__init__(in_channels, se_layer, dropout, kernel_size, num_filters)
|
216
216
|
self.max_pool = max_pool
|
217
217
|
|
218
|
-
def forward(self, input, indices=None):
|
218
|
+
def forward(self, input, indices=None): # type: ignore[override]
|
219
219
|
input, indices = self.max_pool(input)
|
220
220
|
|
221
221
|
out_block, _ = super().forward(input, None)
|
@@ -243,7 +243,7 @@ class Decoder(ConvConcatDenseBlock):
|
|
243
243
|
super().__init__(in_channels, se_layer, dropout, kernel_size, num_filters)
|
244
244
|
self.un_pool = un_pool
|
245
245
|
|
246
|
-
def forward(self, input, indices):
|
246
|
+
def forward(self, input, indices): # type: ignore[override]
|
247
247
|
out_block, _ = super().forward(input, None)
|
248
248
|
out_block = self.un_pool(out_block, indices)
|
249
249
|
return out_block, None
|
@@ -270,7 +270,7 @@ class Bottleneck(ConvConcatDenseBlock):
|
|
270
270
|
self.max_pool = max_pool
|
271
271
|
self.un_pool = un_pool
|
272
272
|
|
273
|
-
def forward(self, input, indices):
|
273
|
+
def forward(self, input, indices): # type: ignore[override]
|
274
274
|
out_block, indices = self.max_pool(input)
|
275
275
|
out_block, _ = super().forward(out_block, None)
|
276
276
|
out_block = self.un_pool(out_block, indices)
|
@@ -362,10 +362,10 @@ class Crop(InvertibleTransform, LazyTransform):
|
|
362
362
|
|
363
363
|
@staticmethod
|
364
364
|
def compute_slices(
|
365
|
-
roi_center: Sequence[int] | NdarrayOrTensor | None = None,
|
366
|
-
roi_size: Sequence[int] | NdarrayOrTensor | None = None,
|
367
|
-
roi_start: Sequence[int] | NdarrayOrTensor | None = None,
|
368
|
-
roi_end: Sequence[int] | NdarrayOrTensor | None = None,
|
365
|
+
roi_center: Sequence[int] | int | NdarrayOrTensor | None = None,
|
366
|
+
roi_size: Sequence[int] | int | NdarrayOrTensor | None = None,
|
367
|
+
roi_start: Sequence[int] | int | NdarrayOrTensor | None = None,
|
368
|
+
roi_end: Sequence[int] | int | NdarrayOrTensor | None = None,
|
369
369
|
roi_slices: Sequence[slice] | None = None,
|
370
370
|
) -> tuple[slice]:
|
371
371
|
"""
|
@@ -459,10 +459,10 @@ class SpatialCrop(Crop):
|
|
459
459
|
|
460
460
|
def __init__(
|
461
461
|
self,
|
462
|
-
roi_center: Sequence[int] | NdarrayOrTensor | None = None,
|
463
|
-
roi_size: Sequence[int] | NdarrayOrTensor | None = None,
|
464
|
-
roi_start: Sequence[int] | NdarrayOrTensor | None = None,
|
465
|
-
roi_end: Sequence[int] | NdarrayOrTensor | None = None,
|
462
|
+
roi_center: Sequence[int] | int | NdarrayOrTensor | None = None,
|
463
|
+
roi_size: Sequence[int] | int | NdarrayOrTensor | None = None,
|
464
|
+
roi_start: Sequence[int] | int | NdarrayOrTensor | None = None,
|
465
|
+
roi_end: Sequence[int] | int | NdarrayOrTensor | None = None,
|
466
466
|
roi_slices: Sequence[slice] | None = None,
|
467
467
|
lazy: bool = False,
|
468
468
|
) -> None:
|
@@ -438,10 +438,10 @@ class SpatialCropd(Cropd):
|
|
438
438
|
def __init__(
|
439
439
|
self,
|
440
440
|
keys: KeysCollection,
|
441
|
-
roi_center: Sequence[int] | None = None,
|
442
|
-
roi_size: Sequence[int] | None = None,
|
443
|
-
roi_start: Sequence[int] | None = None,
|
444
|
-
roi_end: Sequence[int] | None = None,
|
441
|
+
roi_center: Sequence[int] | int | None = None,
|
442
|
+
roi_size: Sequence[int] | int | None = None,
|
443
|
+
roi_start: Sequence[int] | int | None = None,
|
444
|
+
roi_end: Sequence[int] | int | None = None,
|
445
445
|
roi_slices: Sequence[slice] | None = None,
|
446
446
|
allow_missing_keys: bool = False,
|
447
447
|
lazy: bool = False,
|
@@ -48,7 +48,7 @@ def _np_pad(img: NdarrayTensor, pad_width: list[tuple[int, int]], mode: str, **k
|
|
48
48
|
warnings.warn(f"Padding: moving img {img.shape} from cuda to cpu for dtype={img.dtype} mode={mode}.")
|
49
49
|
img_np = img.detach().cpu().numpy()
|
50
50
|
else:
|
51
|
-
img_np = img
|
51
|
+
img_np = np.asarray(img)
|
52
52
|
mode = convert_pad_mode(dst=img_np, mode=mode).value
|
53
53
|
if mode == "constant" and "value" in kwargs:
|
54
54
|
kwargs["constant_values"] = kwargs.pop("value")
|
@@ -3441,7 +3441,7 @@ class RandGridPatch(GridPatch, RandomizableTransform, MultiSampleTrait):
|
|
3441
3441
|
idx = self.R.permutation(image_np.shape[0])
|
3442
3442
|
idx = idx[: self.num_patches]
|
3443
3443
|
idx_np = convert_data_type(idx, np.ndarray)[0]
|
3444
|
-
image_np = image_np[idx]
|
3444
|
+
image_np = image_np[idx] # type: ignore[index]
|
3445
3445
|
locations = locations[idx_np]
|
3446
3446
|
return image_np, locations
|
3447
3447
|
elif self.sort_fn not in (None, GridPatchSort.MIN, GridPatchSort.MAX):
|
@@ -290,7 +290,7 @@ class CAM(CAMBase):
|
|
290
290
|
)
|
291
291
|
self.fc_layers = fc_layers
|
292
292
|
|
293
|
-
def compute_map(self, x, class_idx=None, layer_idx=-1, **kwargs):
|
293
|
+
def compute_map(self, x, class_idx=None, layer_idx=-1, **kwargs): # type: ignore[override]
|
294
294
|
logits, acti, _ = self.nn_module(x, **kwargs)
|
295
295
|
acti = acti[layer_idx]
|
296
296
|
if class_idx is None:
|
@@ -302,7 +302,7 @@ class CAM(CAMBase):
|
|
302
302
|
output = torch.stack([output[i, b : b + 1] for i, b in enumerate(class_idx)], dim=0)
|
303
303
|
return output.reshape(b, 1, *spatial) # resume the spatial dims on the selected class
|
304
304
|
|
305
|
-
def __call__(self, x, class_idx=None, layer_idx=-1, **kwargs):
|
305
|
+
def __call__(self, x, class_idx=None, layer_idx=-1, **kwargs): # type: ignore[override]
|
306
306
|
"""
|
307
307
|
Compute the activation map with upsampling and postprocessing.
|
308
308
|
|
@@ -361,7 +361,7 @@ class GradCAM(CAMBase):
|
|
361
361
|
|
362
362
|
"""
|
363
363
|
|
364
|
-
def compute_map(self, x, class_idx=None, retain_graph=False, layer_idx=-1, **kwargs):
|
364
|
+
def compute_map(self, x, class_idx=None, retain_graph=False, layer_idx=-1, **kwargs): # type: ignore[override]
|
365
365
|
_, acti, grad = self.nn_module(x, class_idx=class_idx, retain_graph=retain_graph, **kwargs)
|
366
366
|
acti, grad = acti[layer_idx], grad[layer_idx]
|
367
367
|
b, c, *spatial = grad.shape
|
@@ -369,7 +369,7 @@ class GradCAM(CAMBase):
|
|
369
369
|
acti_map = (weights * acti).sum(1, keepdim=True)
|
370
370
|
return F.relu(acti_map)
|
371
371
|
|
372
|
-
def __call__(self, x, class_idx=None, layer_idx=-1, retain_graph=False, **kwargs):
|
372
|
+
def __call__(self, x, class_idx=None, layer_idx=-1, retain_graph=False, **kwargs): # type: ignore[override]
|
373
373
|
"""
|
374
374
|
Compute the activation map with upsampling and postprocessing.
|
375
375
|
|
@@ -401,7 +401,7 @@ class GradCAMpp(GradCAM):
|
|
401
401
|
|
402
402
|
"""
|
403
403
|
|
404
|
-
def compute_map(self, x, class_idx=None, retain_graph=False, layer_idx=-1, **kwargs):
|
404
|
+
def compute_map(self, x, class_idx=None, retain_graph=False, layer_idx=-1, **kwargs): # type: ignore[override]
|
405
405
|
_, acti, grad = self.nn_module(x, class_idx=class_idx, retain_graph=retain_graph, **kwargs)
|
406
406
|
acti, grad = acti[layer_idx], grad[layer_idx]
|
407
407
|
b, c, *spatial = grad.shape
|
@@ -176,7 +176,9 @@ def plot_2d_or_3d_image(
|
|
176
176
|
# as the `d` data has no batch dim, reduce the spatial dim index if positive
|
177
177
|
frame_dim = frame_dim - 1 if frame_dim > 0 else frame_dim
|
178
178
|
|
179
|
-
d: np.ndarray =
|
179
|
+
d: np.ndarray = (
|
180
|
+
data_index.detach().cpu().numpy() if isinstance(data_index, torch.Tensor) else np.asarray(data_index)
|
181
|
+
)
|
180
182
|
|
181
183
|
if d.ndim == 2:
|
182
184
|
d = rescale_array(d, 0, 1) # type: ignore
|
@@ -1,5 +1,5 @@
|
|
1
|
-
monai/__init__.py,sha256=
|
2
|
-
monai/_version.py,sha256=
|
1
|
+
monai/__init__.py,sha256=_QozTiwyy6qpqJ5oX2PSxYbqUoXKRgnQnkEAk33lkjA,2722
|
2
|
+
monai/_version.py,sha256=N95fYvfNA1LI8sPj8gCsJWWoY4Vuyz0MBqeedb7l354,503
|
3
3
|
monai/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
4
4
|
monai/_extensions/__init__.py,sha256=NEBPreRhQ8H9gVvgrLr_y52_TmqB96u_u4VQmeNT93I,642
|
5
5
|
monai/_extensions/loader.py,sha256=7SiKw36q-nOzH8CRbBurFrz7GM40GCu7rc93Tm8XpnI,3643
|
@@ -17,7 +17,7 @@ monai/apps/auto3dseg/auto_runner.py,sha256=a4Ry93TkK0aTb68bwle8HoG4SzUbUf0IbDrY3
|
|
17
17
|
monai/apps/auto3dseg/bundle_gen.py,sha256=y_9lbw0xk1em0TsIn7mTJHmD3OQNcNZVsjgkhdYg0Lw,28994
|
18
18
|
monai/apps/auto3dseg/data_analyzer.py,sha256=XJuQ-bSE3G_6r2i6S75jjo-klWTUGpy5aY3WqijSWqk,18628
|
19
19
|
monai/apps/auto3dseg/ensemble_builder.py,sha256=GaLpeAIW5X9oC921cevE86coOsmXW2C136FHuo6UyMo,27277
|
20
|
-
monai/apps/auto3dseg/hpo_gen.py,sha256=
|
20
|
+
monai/apps/auto3dseg/hpo_gen.py,sha256=VMfN0M5Z8Mq3Epu4fgOD5N6X-BY2PARIC69wW2t5EQU,16691
|
21
21
|
monai/apps/auto3dseg/transforms.py,sha256=iO4v9-dwQzvupJglX-H2HYuwUhmFdVgLbyh4BuDy7DY,3991
|
22
22
|
monai/apps/auto3dseg/utils.py,sha256=7DPJbsL9YbhRdMZ6dEvCA_t_uLSSz7-WZSU2pMY4_qo,3138
|
23
23
|
monai/apps/deepedit/__init__.py,sha256=s9djSd6kvViPnFvMR11Dgd30Lv4oY6FaPJr4ZZJZLq0,573
|
@@ -77,7 +77,7 @@ monai/apps/pathology/metrics/__init__.py,sha256=c7xRUzhQesEWRIUFF6vM-Qs9v0Lv8QzC
|
|
77
77
|
monai/apps/pathology/metrics/lesion_froc.py,sha256=LNwcuatNEppyWMehnpBOn1474jH0hOJCq3gdq5mNw8k,7331
|
78
78
|
monai/apps/pathology/transforms/__init__.py,sha256=c3YkornqjX-fHRnwkpn_PxmnMje6pif1qxPdFNyQUWU,2243
|
79
79
|
monai/apps/pathology/transforms/post/__init__.py,sha256=WUZbaM2bg13mpbnNhol0D0A328XgUspTWtPvli1Uqpk,1995
|
80
|
-
monai/apps/pathology/transforms/post/array.py,sha256=
|
80
|
+
monai/apps/pathology/transforms/post/array.py,sha256=gYIuHMPhGcomPE4RKfS9Zv-7IytCUUBCpl-r9w4rGHA,37417
|
81
81
|
monai/apps/pathology/transforms/post/dictionary.py,sha256=ZReeFqcZRkltwhRaKsedeptprB1B89lKWFimAzkk0Vg,25928
|
82
82
|
monai/apps/pathology/transforms/stain/__init__.py,sha256=i9HfrXiQHG5XHfqMtz2g7yBX7p1uN0xcGAPCYyXSmV8,836
|
83
83
|
monai/apps/pathology/transforms/stain/array.py,sha256=Dr1fCmkQzc8n40XbLAHpq1EG5wkMqTjWgYN2FGJfMGk,8366
|
@@ -102,7 +102,7 @@ monai/apps/tcia/label_desc.py,sha256=B8l9mVmRzLysLmEIIYVeenly_68okCt461qeLQSxCJ8
|
|
102
102
|
monai/apps/tcia/utils.py,sha256=iyLXr5_51rolbRUZFN_Fwc6TIhAbeSl6XZ2m5RYpzTw,6303
|
103
103
|
monai/auto3dseg/__init__.py,sha256=DbZC7wqx4zBNcguLQGu8bGmAiKnk9LvjtQDtwdwG19I,1164
|
104
104
|
monai/auto3dseg/algo_gen.py,sha256=_BscoAnUzQKRqz5jHvdsuCe3tTxq7PUQYPMLX0WuxCc,4286
|
105
|
-
monai/auto3dseg/analyzer.py,sha256
|
105
|
+
monai/auto3dseg/analyzer.py,sha256=7l8QT36lG68b8rK23CC2omz6PO1fxmDwOljxXMn5clQ,41351
|
106
106
|
monai/auto3dseg/operations.py,sha256=1sNDWnz5Zs2-scpb1wotxar7yGYQ-VPI-_b2KnZqW9g,5110
|
107
107
|
monai/auto3dseg/seg_summarizer.py,sha256=T5Kwvc6eKet-vlzvBQgCLHbxHto-P5tiN_7uIk5uVfs,8717
|
108
108
|
monai/auto3dseg/utils.py,sha256=zEicEO_--6-1kzT5HlmhAAd575gnl2AFmW8O3FnIznE,18674
|
@@ -112,7 +112,7 @@ monai/bundle/config_item.py,sha256=rMjXSGkjJZdi04BwSHwCcIwzIb_TflmC3xDhC3SVJRs,1
|
|
112
112
|
monai/bundle/config_parser.py,sha256=IewIX0HnjzL5nZYdcSdWGzc7Z4xqUaOTb9wa6wjZ4Y8,22895
|
113
113
|
monai/bundle/properties.py,sha256=iN3K4FVmN9ny1Hw9p5j7_ULcCdSD8PmrR7qXxbNz49k,11582
|
114
114
|
monai/bundle/reference_resolver.py,sha256=1qdz732zl1dwSWyKaW6JOs1YqoCrXu7NBi5jz3zjqxA,15747
|
115
|
-
monai/bundle/scripts.py,sha256=
|
115
|
+
monai/bundle/scripts.py,sha256=ipS7CDKx01ySmAQlrHBhpmgqksAOzYxK1ARbgHo9fxg,88619
|
116
116
|
monai/bundle/utils.py,sha256=Heob15Gf_dVpt-Gcts4sycoUny0nr7RvevNVSKe6sqc,8950
|
117
117
|
monai/bundle/workflows.py,sha256=VMuBTkk6DGsnGRLFzNfVUzgy8UqUReluUlIPUaxODPQ,24765
|
118
118
|
monai/config/__init__.py,sha256=CN28CfTdsp301gv8YXfVvkbztCfbAqrLKrJi_C8oP9s,1048
|
@@ -134,10 +134,10 @@ monai/data/image_writer.py,sha256=rH6vboPFkX4ziN3lnrmK6AzAOQYI9tEiOJb7Al2tj-8,39
|
|
134
134
|
monai/data/iterable_dataset.py,sha256=A0L5jaxwnfgProBj96tlT160esI21yutnTf3a4c29Ms,13100
|
135
135
|
monai/data/itk_torch_bridge.py,sha256=3th-B3tJuJE22JFfOUgGeTMOPh1czJEiSccFyn_Ob0w,14461
|
136
136
|
monai/data/meta_obj.py,sha256=OxfcCSBFuN0fUpyIa9ey9HuqrqimARNnEZPuqRRXjLo,8800
|
137
|
-
monai/data/meta_tensor.py,sha256=
|
137
|
+
monai/data/meta_tensor.py,sha256=GG8CPjRZhPCShryY3cnyA5G2Crl_Q7Sym2pw5cVxBL0,27530
|
138
138
|
monai/data/samplers.py,sha256=LUCAHy38ddGm67oJJp3W6ITBsDRqyGCrKtYn-pjrWc4,5102
|
139
139
|
monai/data/synthetic.py,sha256=H0MaQq2nnYxXEMlvOW1-XoWJWY_VKsgZ75tWLO1aCXg,7375
|
140
|
-
monai/data/test_time_augmentation.py,sha256=
|
140
|
+
monai/data/test_time_augmentation.py,sha256=KgIcPDwF_KelBCX118J5gx13sefGaDgQFUDgGWCZujA,9871
|
141
141
|
monai/data/thread_buffer.py,sha256=FtJlRwLHQzU9sf3XJk4G7b_-uKXaRQHAOMauc-zWN2Q,8840
|
142
142
|
monai/data/torchscript_utils.py,sha256=KoJinpJiNepP6i-1DDy3-8m1Qg1bPfAZTScmXr0LT6g,5502
|
143
143
|
monai/data/ultrasound_confidence_map.py,sha256=pEAp4lr-s00_T9d4IEYSJ5B9VQwf_T7BS9GBx8jw_Sg,14464
|
@@ -218,7 +218,7 @@ monai/losses/unified_focal_loss.py,sha256=rCj8IpueYH_UMrOUXU0tjbXIN4Uix3bGnRZQtR
|
|
218
218
|
monai/metrics/__init__.py,sha256=DUjK3_qfGZbw0zCv6OJgMSL3AfiYN47aYqLsxn69-HU,2174
|
219
219
|
monai/metrics/active_learning_metrics.py,sha256=uKID2O4mnY-9P2ZzyT4sqJd2NfgzjSpNKpAwulWCozU,8211
|
220
220
|
monai/metrics/confusion_matrix.py,sha256=Spb20jYPnbgGZfPKDQI36ePznPf1xujxhboNnW8HxdQ,15064
|
221
|
-
monai/metrics/cumulative_average.py,sha256=
|
221
|
+
monai/metrics/cumulative_average.py,sha256=8GGjHmiBboBikprg1380SsNn7RgzFIrHGWBYDBv6ebE,5636
|
222
222
|
monai/metrics/f_beta_score.py,sha256=urI0J_tvl0qQ5-l2fgWV_jChbgpzLmgpRq125B3yxpw,3984
|
223
223
|
monai/metrics/fid.py,sha256=P9wBKnumEdCgKlVUuEt9XzY5umPK1fXnnyXmljDl5N4,4794
|
224
224
|
monai/metrics/froc.py,sha256=q7MAFsHHIp5EHBHwa5UbF5PRApjUonw-hUXax9k1WxQ,7981
|
@@ -229,9 +229,9 @@ monai/metrics/meandice.py,sha256=bFiDcK-af4cqV-JHAO2Qh2ixwj6fLjaBCaCO6jBAmxQ,134
|
|
229
229
|
monai/metrics/meaniou.py,sha256=cGoW1re7v4hxXJfjyEVEFNsuzEupgJaIe6ZK_qrbIjw,7004
|
230
230
|
monai/metrics/metric.py,sha256=VtIMNudwFkEhGAX1n0aYMaj18yKtmENKpo0JuWoVFvQ,15203
|
231
231
|
monai/metrics/mmd.py,sha256=a_O0WlUPrtegG16eBnEaf1HngPN4s4nAH1WtvGo-8BU,3299
|
232
|
-
monai/metrics/panoptic_quality.py,sha256=
|
232
|
+
monai/metrics/panoptic_quality.py,sha256=hsOr9kac9LLVOI2tvFuY80sfTk9w9HOG6zaBxtjFBvI,13707
|
233
233
|
monai/metrics/regression.py,sha256=JV7x8ibD04hZeWz83Ac26jjyufsCanvAmohD-eWKtbY,26218
|
234
|
-
monai/metrics/rocauc.py,sha256=
|
234
|
+
monai/metrics/rocauc.py,sha256=xOopgYaahaH1-PmD4yG3B3f25kA95yK56BbXIykra60,8094
|
235
235
|
monai/metrics/surface_dice.py,sha256=aNERsTuJkPMfxatPaAzoW1KtvZvUAv4qe_7Kl_dOROI,15149
|
236
236
|
monai/metrics/surface_distance.py,sha256=bKDTm7ulhjfiphHLrDJoA3OKI3npwQy2Z5wY-JkXtXg,9727
|
237
237
|
monai/metrics/utils.py,sha256=jJiIFGGa-iwvz1otHAKqPKTNmfZqd2dI7_Hsfblgxqk,46914
|
@@ -246,7 +246,7 @@ monai/networks/blocks/attention_utils.py,sha256=UAlttLpn8vJCIiYyWXEUF-NzVTQBOK-a
|
|
246
246
|
monai/networks/blocks/backbone_fpn_utils.py,sha256=mdXFwtnRgwuaisTlY-c7OkY1ZZBY3I82dAjpXFAZFbg,7488
|
247
247
|
monai/networks/blocks/convolutions.py,sha256=gRmbYfy3IR4taiXuxeH5KGOFjP55FoVWfP4e1L6ai0s,11686
|
248
248
|
monai/networks/blocks/crf.py,sha256=gHyRgBWD9DmmbCJnXwsMa6WN7N9fDLuT_SwH8MnHhXE,5009
|
249
|
-
monai/networks/blocks/crossattention.py,sha256=
|
249
|
+
monai/networks/blocks/crossattention.py,sha256=ofE4BBMnOYilwujR_RVuCafFCdvKeeRIJgMd-y0qEVk,7452
|
250
250
|
monai/networks/blocks/denseblock.py,sha256=hs1rcBp95euZT5ULjgefPApZH75-hqSaVKKNtHdGt10,4747
|
251
251
|
monai/networks/blocks/dints_block.py,sha256=-JWz4-nnAjrOxU2oJ86-qN8Krb8FayKS8Zpbp1wLXzc,9255
|
252
252
|
monai/networks/blocks/downsample.py,sha256=18cwYXL5H3DC5Yq12cdqTIijDJfMCE2YNHlPetFB6UY,2413
|
@@ -262,12 +262,12 @@ monai/networks/blocks/pos_embed_utils.py,sha256=vFEQqxZ6UAmjcy_icFDL9EwjRHYXuIbW
|
|
262
262
|
monai/networks/blocks/regunet_block.py,sha256=1FLIwVBtk66II6xQ7Q4LMY8DP0rMmeftN7HuaEgnf3A,8825
|
263
263
|
monai/networks/blocks/rel_pos_embedding.py,sha256=wuTJsk_NHSDX-3V0X9ctF99WIh2-SHLDbQxzrG7tz_4,2208
|
264
264
|
monai/networks/blocks/segresnet_block.py,sha256=dREFa0CWuSWlSOm53fT7vZz6UC2J_7JAEaeHB9rYjAk,3339
|
265
|
-
monai/networks/blocks/selfattention.py,sha256=
|
265
|
+
monai/networks/blocks/selfattention.py,sha256=RlCE9x_YIC4EeNKajJbhmFnA_Zftz8gyHu62kV3uxHA,6388
|
266
266
|
monai/networks/blocks/spade_norm.py,sha256=Kq2ImmCQBaFURMnOTj08aphgGkF3ghDm19kXpPRq91c,3654
|
267
267
|
monai/networks/blocks/spatialattention.py,sha256=DIHg9hGM5m1Rn0Bt6aP5Y2Fqqvc5D0I4PmbbLovb5m8,3308
|
268
268
|
monai/networks/blocks/squeeze_and_excitation.py,sha256=y2kXgoSFxywu-KCGYbI_d-NCCAEbuKAIY5gSqO_T7TI,12752
|
269
269
|
monai/networks/blocks/text_embedding.py,sha256=HIlCTQCSyOEXnqo1l9TOC05duCoeWd9Kb4Oc0gvLZKw,3814
|
270
|
-
monai/networks/blocks/transformerblock.py,sha256=
|
270
|
+
monai/networks/blocks/transformerblock.py,sha256=CTN_UBsD0dVfGZYCUDukOX1jWTFzp2nnSJMMh8iL9vE,3090
|
271
271
|
monai/networks/blocks/unetr_block.py,sha256=d_rqE76OFfd3QRcHuor5Zei2pOrupoleBWu3eYUup0c,9049
|
272
272
|
monai/networks/blocks/upsample.py,sha256=CeqqKx31gNw1CT3xz6UpU0fOjgW-7ZWxCRAOH4qAcxs,14024
|
273
273
|
monai/networks/blocks/warp.py,sha256=XVFZKZR0kBhEtU5-xQsaqL06a-pAI7JJVupQCD2X4e8,7255
|
@@ -278,7 +278,7 @@ monai/networks/layers/drop_path.py,sha256=SZtRNa1bDwk1rXWbUe70YDaw6H_NKeplm_Wk5Y
|
|
278
278
|
monai/networks/layers/factories.py,sha256=dMj-y3LRV5P_FmqMCZuf_A8P8l_fge3TVAXWzNhONuo,15795
|
279
279
|
monai/networks/layers/filtering.py,sha256=7ru9Yt3yOM-ko-UqzYp-2tMpb8VHt5d767F-KkzrqYY,17992
|
280
280
|
monai/networks/layers/gmm.py,sha256=Aq-YCHgUalgOZQ0x5mwYKJe1G7aiCiJybdkPTiiT120,3325
|
281
|
-
monai/networks/layers/simplelayers.py,sha256=
|
281
|
+
monai/networks/layers/simplelayers.py,sha256=ciUdKrj_DpEdT3AKs70aPySh73UMsyhoOCTiR2qk8Js,28478
|
282
282
|
monai/networks/layers/spatial_transforms.py,sha256=fz2t7-ibijNLqTYpAn4ZgdXtzBSIyWlaF35mQtqWRY4,25581
|
283
283
|
monai/networks/layers/utils.py,sha256=k_2xVO8BTEMMVJtemUyKBWw4_5xtqd6OOTOG8qld8To,4916
|
284
284
|
monai/networks/layers/vector_quantizer.py,sha256=0PCcaH5_uaxFORHgEetQKazq74jgOVmvQJ3h4Ywat6Y,10058
|
@@ -306,7 +306,7 @@ monai/networks/nets/hovernet.py,sha256=E831rgNN8SP1lui8-ffV7IUscDWvyTr-YTqXcpof8
|
|
306
306
|
monai/networks/nets/milmodel.py,sha256=aUDgYJG0kS3p4nBW_dF7b4cWwuC31w3KIzmUzXA08HE,9813
|
307
307
|
monai/networks/nets/netadapter.py,sha256=JtcME9pcg8ud4jHKZKM9fE-8leP2PQXgUIfKBdB0wcA,6102
|
308
308
|
monai/networks/nets/patchgan_discriminator.py,sha256=yTT0on0lzlDwSu4B9McMqdxqu5xD7Ws9wCwEkxvJEu0,8620
|
309
|
-
monai/networks/nets/quicknat.py,sha256=
|
309
|
+
monai/networks/nets/quicknat.py,sha256=ko1BO9l4i4BVYG5V4ohkwUEyoRrPPPzmqNqnFhLTZ0k,20463
|
310
310
|
monai/networks/nets/regressor.py,sha256=6Nz5yJuQDJJOr5R0rhot_mHu7_MDCA4ybV48wS1HS1M,6482
|
311
311
|
monai/networks/nets/regunet.py,sha256=-A6ygR7lVyAflFyqWkVVOsY94uMXWol1f2xr_HmsU1c,18664
|
312
312
|
monai/networks/nets/resnet.py,sha256=oo1MCA9hccBVwDcMrZNpVmbDSRn3dOEkrn3DbKW2WZk,28141
|
@@ -350,10 +350,10 @@ monai/transforms/utils.py,sha256=-5AoltSz1qqIZ1jhYAWtis8gJd781Tj9g-coyYvBTZU,949
|
|
350
350
|
monai/transforms/utils_create_transform_ims.py,sha256=QEJVHsCZX7ZxsBArk6NjgCzSZuuokf8l1uFqiUZBBys,31155
|
351
351
|
monai/transforms/utils_pytorch_numpy_unification.py,sha256=9Exl8id6kPbFvdZLcgfpj0FCUSjrwIlB7qiSQ4OdTZM,18779
|
352
352
|
monai/transforms/croppad/__init__.py,sha256=s9djSd6kvViPnFvMR11Dgd30Lv4oY6FaPJr4ZZJZLq0,573
|
353
|
-
monai/transforms/croppad/array.py,sha256=
|
353
|
+
monai/transforms/croppad/array.py,sha256=mSzd1XdNK4vZB98fll-gREQM1EWuPOfNdUNTpmiy-QA,74793
|
354
354
|
monai/transforms/croppad/batch.py,sha256=5ukcYk3VCDpk62AL5Q_jTqpXmSNTlw0UCUhDeAB4aV0,6138
|
355
|
-
monai/transforms/croppad/dictionary.py,sha256=
|
356
|
-
monai/transforms/croppad/functional.py,sha256=
|
355
|
+
monai/transforms/croppad/dictionary.py,sha256=WOzj_PjmoB3zLEmtQlafb9-PWgXd-s5K7Z5Doc8Adns,60746
|
356
|
+
monai/transforms/croppad/functional.py,sha256=iroD0XBaMG1Mox6-EotIh2nAUxJPrpIyUrHopc83Sug,12640
|
357
357
|
monai/transforms/intensity/__init__.py,sha256=s9djSd6kvViPnFvMR11Dgd30Lv4oY6FaPJr4ZZJZLq0,573
|
358
358
|
monai/transforms/intensity/array.py,sha256=bhKIAMgJu-QMQA8df9QdyancMJMShOIOGHjE__4XdXo,121574
|
359
359
|
monai/transforms/intensity/dictionary.py,sha256=RXZeQG9dPvdvjoiWWlNkYec4NDWBxYXjfct4fywv1Ic,85059
|
@@ -380,7 +380,7 @@ monai/transforms/smooth_field/__init__.py,sha256=s9djSd6kvViPnFvMR11Dgd30Lv4oY6F
|
|
380
380
|
monai/transforms/smooth_field/array.py,sha256=Pz4ErmcfVTRZpBe4_IAXTWHlGSmRfExegNKYyrSVwsE,17856
|
381
381
|
monai/transforms/smooth_field/dictionary.py,sha256=iU4V2VjSy2H1K03KgumMUr3cyZVWEJS0W-tgc6SZtP4,11194
|
382
382
|
monai/transforms/spatial/__init__.py,sha256=s9djSd6kvViPnFvMR11Dgd30Lv4oY6FaPJr4ZZJZLq0,573
|
383
|
-
monai/transforms/spatial/array.py,sha256=
|
383
|
+
monai/transforms/spatial/array.py,sha256=alooVNRtqxNFycF1G31J23sgz3EJnddzJImQUajNWBY,183254
|
384
384
|
monai/transforms/spatial/dictionary.py,sha256=mvP_skSEI1sMl9y-AS3PZqNHhTLK6iOVOfbdezpNiNs,131672
|
385
385
|
monai/transforms/spatial/functional.py,sha256=DCeJg2s3pPGd87cpryMsUMObTePhnDf4QX_dKtRpFTo,31249
|
386
386
|
monai/transforms/utility/__init__.py,sha256=s9djSd6kvViPnFvMR11Dgd30Lv4oY6FaPJr4ZZJZLq0,573
|
@@ -403,14 +403,14 @@ monai/utils/state_cacher.py,sha256=ERBE-mnnf47MwKSq-pNbfu1D2C4ZqKH-mORyLaBa3EE,5
|
|
403
403
|
monai/utils/tf32.py,sha256=4bqpPxoTAMmQDNRbbrd4qHG27e1RrxeAmfDf3vP8tQc,3141
|
404
404
|
monai/utils/type_conversion.py,sha256=CwmAfcFNgNOQdMaNdrDcIuj7_esJls4-BymtMD03ZuM,21520
|
405
405
|
monai/visualize/__init__.py,sha256=p7dv9-hRa9vAhlpHyk86yap9HgeDeJRO3pXmFhDx8Mc,1038
|
406
|
-
monai/visualize/class_activation_maps.py,sha256=
|
406
|
+
monai/visualize/class_activation_maps.py,sha256=5eEQkmpcE3QpivadjlsRZBLcUc7NpJHDfWkKCLOAnUM,16288
|
407
407
|
monai/visualize/gradient_based.py,sha256=oXqMxqIClVlrgloZwgdTUl4pWllsoS0ysbjuvAbu-Kg,6278
|
408
|
-
monai/visualize/img2tensorboard.py,sha256=
|
408
|
+
monai/visualize/img2tensorboard.py,sha256=NnMcyfIFqX-jD7TBO3Rn02zt5uug79d_7pIIaVD5c-I,9228
|
409
409
|
monai/visualize/occlusion_sensitivity.py,sha256=OQHEJLyIhB8zWqQsfKaX-1kvCjWFVYtLfS4dFC0nKFI,18160
|
410
410
|
monai/visualize/utils.py,sha256=B-MhTVs7sQbIqYS3yPnpBwPw2K82rE2PBtGIfpwZtWM,9894
|
411
411
|
monai/visualize/visualizer.py,sha256=qckyaMZCbezYUwE20k5yc-Pb7UozVavMDbrmyQwfYHY,1377
|
412
|
-
monai_weekly-1.4.
|
413
|
-
monai_weekly-1.4.
|
414
|
-
monai_weekly-1.4.
|
415
|
-
monai_weekly-1.4.
|
416
|
-
monai_weekly-1.4.
|
412
|
+
monai_weekly-1.4.dev2430.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
413
|
+
monai_weekly-1.4.dev2430.dist-info/METADATA,sha256=NGO426YBM0t6l0tAR8nzoxySiy59z7D8s9J8LYc_ZQ8,10953
|
414
|
+
monai_weekly-1.4.dev2430.dist-info/WHEEL,sha256=Wyh-_nZ0DJYolHNn1_hMa4lM7uDedD_RGVwbmTjyItk,91
|
415
|
+
monai_weekly-1.4.dev2430.dist-info/top_level.txt,sha256=UaNwRzLGORdus41Ip446s3bBfViLkdkDsXDo34J2P44,6
|
416
|
+
monai_weekly-1.4.dev2430.dist-info/RECORD,,
|
File without changes
|
File without changes
|