This file contains 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
import torch | |
import torch.nn as nn | |
import torch.nn.functional as F | |
import copy | |
from tqdm import trange | |
passed = torch.zeros(50) | |
for i in trange(50): | |
pad = tuple(list(torch.randint(3,(3,)))) | |
dilation = tuple(list(torch.randint(2,(3,))+1)) |
This file contains 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
import torch | |
import torch.nn as nn | |
import torch.nn.functional as F | |
import nibabel as nib | |
import time | |
import numpy as np | |
import scipy.ndimage | |
from scipy.ndimage.interpolation import zoom as zoom | |
from scipy.ndimage.interpolation import map_coordinates |
This file contains 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
import torch | |
import torch.nn as nn | |
import torch.nn.functional as F | |
import nibabel as nib | |
import time | |
import numpy as np | |
import scipy.ndimage | |
from scipy.ndimage.interpolation import zoom as zoom | |
from scipy.ndimage.interpolation import map_coordinates |
This file contains 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
#note: an advanced baseline with additional infos for registration settings | |
#for Learn2Reg 2021 and recommended pre-processing of lung scans can be found | |
#here https://github.com/multimodallearning/convexAdam | |
import torch | |
import torch.nn as nn | |
import torch.nn.functional as F | |
import nibabel as nib | |
import time | |
import numpy as np | |
import scipy.ndimage |
This file contains 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
import numpy as np | |
import argparse | |
def main(): | |
parser = argparse.ArgumentParser() | |
parser.add_argument("--inputtag", dest="inputtag", help="input tag file from (MINC)", default=None, required=True) | |
parser.add_argument("--savetxt", dest="savetxt", help="output landmark file to (txt)", default=None, required=True) |
This file contains 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
import numpy as np | |
import nibabel as nib | |
import argparse | |
def main(): | |
parser = argparse.ArgumentParser() | |
parser.add_argument("--inputnii", dest="inputnii", help="input segmentation from (nii.gz)", default=None, required=True) | |
parser.add_argument("--movingnii", dest="movingnii", help="second segmentation from (nii.gz)", default=None, required=False) | |
parser.add_argument("--savetxt", dest="savetxt", help="output landmark file to (txt)", default=None, required=False) |