Skip to content

Commit d46862e

Browse files
authored
Merge branch 'main' into pre-commit-ci-update-config
2 parents 3123fa9 + 3e4a4b2 commit d46862e

7 files changed

Lines changed: 246 additions & 78 deletions

File tree

DAE/Pretrain_full_contrast/models/simmim_advanced.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1218,7 +1218,7 @@ def __init__(
12181218
kernel_size=3,
12191219
upsample_kernel_size=2,
12201220
norm_name=norm_name,
1221-
stride=1
1221+
stride=1,
12221222
# res_block=True,
12231223
)
12241224

SkullRec/cranialDefects.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ def generate_hole_implants(data, cube_dim):
1616
z = int(z_ * (3 / 4))
1717
cube_masking = np.zeros(shape=(cube_dim, cube_dim, z_ - z))
1818
print(cube_masking.shape)
19-
full_masking[
20-
x - int(cube_dim / 2) : x + int(cube_dim / 2), y - int(cube_dim / 2) : y + int(cube_dim / 2), z:z_
21-
] = cube_masking
19+
full_masking[x - int(cube_dim / 2) : x + int(cube_dim / 2), y - int(cube_dim / 2) : y + int(cube_dim / 2), z:z_] = (
20+
cube_masking
21+
)
2222
return full_masking
2323

2424

SwinMM/WORD/models/cross_attention.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""TransFusion from TransFusion: Multi-view Divergent Fusion for Medical Image Segmentation with Transformers."""
2+
23
import copy
34
import math
45
from typing import Sequence, Union

SwinMM/WORD/models/swin_unetr.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""SwinUNETR with cross attention."""
2+
23
from typing import MutableMapping, Sequence, Tuple, Union
34

45
import torch
@@ -118,11 +119,13 @@ def group_matcher(self, coarse=False):
118119
"""Layer counting helper, used by timm."""
119120
return dict(
120121
stem=r"^swinViT\.absolute_pos_embed|patch_embed", # stem and embed
121-
blocks=r"^swinViT\.layers(\d+)\.0"
122-
if coarse
123-
else [
124-
(r"^swinViT\.layers(\d+)\.0.downsample", (0,)),
125-
(r"^swinViT\.layers(\d+)\.0\.\w+\.(\d+)", None),
126-
(r"^swinViT\.norm", (99999,)),
127-
],
122+
blocks=(
123+
r"^swinViT\.layers(\d+)\.0"
124+
if coarse
125+
else [
126+
(r"^swinViT\.layers(\d+)\.0.downsample", (0,)),
127+
(r"^swinViT\.layers(\d+)\.0\.\w+\.(\d+)", None),
128+
(r"^swinViT\.norm", (99999,)),
129+
]
130+
),
128131
)

auto3dseg/algorithm_templates/segresnet/configs/hyper_parameters.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ log_output_file: null
3434
cache_class_indices: null
3535
early_stopping_fraction: 0.001
3636
determ: false
37+
orientation_ras: true
38+
crop_foreground: true
3739

3840
learning_rate: 2.0e-4
3941
batch_size: '@num_images_per_batch'

0 commit comments

Comments
 (0)