Exemplo n.º 1
0
    def __init__(self, name, split):
        self.name = name
        self.split = split
        self.path = os.path.join(settings.checkpoints,
                                 name + '-split_{}'.format(split))
        self.net = BoundaryDualHypercolumnCatRefineNet(
            SCSENoPoolResNextBase(se_resnet50()),
            num_features=128,
            mask_classifier=lambda c: SmallDropoutRefineNetUpsampleClassifier(
                2 * 128, scale_factor=2),
            boundary_classifier=lambda c:
            SmallDropoutRefineNetUpsampleClassifier(2 * 128, 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_top_6_postprocessed-split_{}'.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 = DualHypercolumnCatRefineNet(
         NoPoolDPN92Base(dpn92()),
         num_features=128,
         block_multiplier=1,
         num_features_base=[256 + 80, 512 + 192, 1024 + 528, 2048 + 640],
         classifier=lambda c: SmallDropoutRefineNetUpsampleClassifier(2*128, 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 = AuxDualHypercolumnCatRefineNet(
         SCSENoPoolResNextBase(se_resnext50_32x4d()),
         num_features=128,
         classifier=lambda c: SmallDropoutRefineNetUpsampleClassifier(2*c, scale_factor=2, dropout=0.1),
         block=SCSERefineNetBlock,
         crp=[IdentityCRP, CRP, CRP, CRP]
     )
     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 = DualHypercolumnCatRefineNet(
            NoPoolDPN107Base(dpn107()),
            num_features=128,
            block_multiplier=1,
            num_features_base=[376, 1152, 2432, 2048 + 640],
            classifier=lambda c: SmallDropoutRefineNetUpsampleClassifier(2 * 128, scale_factor=2),
        )
        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_top_6_postprocessed-split_{}'.format(split)).load()