Exemple #1
0
def seresnext101_unet_v2(input_channels=6,
                         num_classes=5,
                         dropout=0.0,
                         pretrained=True,
                         classifiers=True):
    encoder = E.SEResNeXt101Encoder(pretrained=pretrained,
                                    layers=[0, 1, 2, 3, 4])
    return UnetV2SegmentationModel(
        encoder,
        num_classes=num_classes,
        disaster_type_classes=len(DISASTER_TYPES) if classifiers else None,
        damage_type_classes=len(DAMAGE_TYPES) if classifiers else None,
        unet_channels=[128, 128, 256, 384],
        dropout=dropout,
        abn_block=partial(ABN, activation=ACT_RELU),
    )
Exemple #2
0
def seresnext101_fpnsum256(num_classes=5, dropout=0.0, pretrained=True):
    encoder = E.SEResNeXt101Encoder(pretrained=pretrained)
    return FPNSumSegmentationModel(encoder, num_classes=num_classes, fpn_channels=256, dropout=dropout)
Exemple #3
0
def seresnext101_deeplab256(num_classes=1, dropout=0.0):
    encoder = E.SEResNeXt101Encoder()
    return DeeplabV3SegmentationModel(encoder,
                                      num_classes=num_classes,
                                      high_level_bottleneck=256,
                                      dropout=dropout)