def __init__(self, name, split): self.name = name self.split = split self.path = os.path.join(settings.checkpoints, name + '-split_{}'.format(split)) self.net = RefineNet(SCSENoPoolResNextBase(se_resnext101_32x4d()), num_features=128, classifier=lambda c: RefineNetUpsampleClassifier( c, scale_factor=2), block=SCSERefineNetBlock) self.tta = [ tta.Pipeline([tta.Pad((13, 14, 13, 14))]), tta.Pipeline([tta.Pad((13, 14, 13, 14)), tta.Flip()]) ]
def __init__(self, name, split): self.name = name self.split = split self.path = os.path.join(settings.checkpoints, name + '-split_{}'.format(split)) self.net = RefineNet( NoPoolDPN92Base(dpn92()), num_features=128, block_multiplier=1, num_features_base=[256 + 80, 512 + 192, 1024 + 528, 2048 + 640], classifier=lambda c: RefineNetUpsampleClassifier(c, scale_factor=2) ) self.tta = [ tta.Pipeline([tta.Pad((13, 14, 13, 14))]), tta.Pipeline([tta.Pad((13, 14, 13, 14)), tta.Flip()]) ]
def __init__(self, name, split): self.name = name self.split = split self.path = os.path.join(settings.checkpoints, name + '-split_{}'.format(split)) self.net = HypercolumnCatRefineNet( SCSENoPoolResNextBase(se_resnet101()), num_features=128, classifier=lambda c: RefineNetUpsampleClassifier(640, scale_factor=2), block=SCSERefineNetBlock) self.tta = [ tta.Pipeline([tta.Resize((128, 128))]), tta.Pipeline([tta.Resize((128, 128)), tta.Flip()]) ]
def __init__(self, name, split): self.name = name self.split = split self.path = os.path.join(settings.checkpoints, name + '-split_{}'.format(split)) self.net = DualHypercolumnCatRefineNet( SCSENoPoolResNextBase(se_resnet152()), num_features=128, classifier=lambda c: RefineNetUpsampleClassifier(2*c, scale_factor=2), block=SCSERefineNetBlock ) self.tta = [ tta.Pipeline([tta.Pad((13, 14, 13, 14))]), tta.Pipeline([tta.Pad((13, 14, 13, 14)), tta.Flip()]) ] self.test_predictions = utils.TestPredictions('ensemble-{}'.format(split)).load()
def __init__(self, name, split): self.name = name self.split = split self.path = os.path.join(settings.checkpoints, name + '-split_{}'.format(split)) self.net = RefineNet(NoPoolDPN98Base(dpn98()), num_features=128, block_multiplier=1, num_features_base=[336, 768, 1728, 2688], classifier=lambda c: RefineNetUpsampleClassifier( c, scale_factor=2)) self.optimizer = Adam(self.net.parameters(), lr=1e-4, weight_decay=1e-4) self.tta = [ tta.Pipeline([tta.Pad((13, 14, 13, 14))]), tta.Pipeline([tta.Pad((13, 14, 13, 14)), tta.Flip()]) ] self.batch_size = 16