This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
images = sorted(glob(os.path.join(IMAGE_FOLDER,"case*.nii.gz"))) | |
val_files = [{"img": img} for img in images] | |
# define transforms for image and segmentation | |
infer_transforms = Compose( | |
[ | |
LoadNiftid("img"), | |
AddChanneld("img"), | |
Orientationd("img", "SPL"), | |
ToTensord("img"), | |
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from monai.networks.blocks import MaxAvgPool, SimpleASPP | |
max_avg_pool = MaxAvgPool(spatial_dims=spatial_dims, kernel_size=2) | |
aspp = SimpleASPP(spatial_dims, ft_chns[4], int(ft_chns[4] / 4), | |
kernel_sizes=[1, 3, 3, 3], dilations=[1, 2, 4, 6]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from email.utils import formatdate | |
"""将当前时间以标准格式输出 时区选择GMT标准时间""" | |
nowString = formatdate(timeval=None, localtime=False, usegmt=True) |