Exemple #1
0
def hrnet18_unet64(input_channels=3, num_classes=1, dropout=0.0, pretrained=True):
    encoder = E.HRNetV2Encoder18(pretrained=pretrained, layers=[1, 2, 3, 4])
    if input_channels != 3:
        encoder.change_input_channels(input_channels)

    return UnetV3SegmentationModel(
        encoder,
        num_classes=num_classes,
        unet_channels=[64, 128, 256],
        dropout=dropout,
        abn_block=partial(ABN, activation=ACT_RELU),
    )
Exemple #2
0
def hrnet18_unet32(input_channels=3,
                   num_classes=1,
                   dropout=0.0,
                   pretrained=True):
    encoder = E.HRNetV2Encoder18(pretrained=pretrained)
    if input_channels != 3:
        encoder.change_input_channels(input_channels)

    return UnetSegmentationModel(encoder,
                                 num_classes=num_classes,
                                 unet_channels=[32, 64, 128, 256],
                                 dropout=dropout)
def hrnet18(num_classes=1, dropout=0.0, pretrained=True):
    encoder = E.HRNetV2Encoder18(pretrained=pretrained)
    return HRNetSegmentationModel(encoder, num_classes=num_classes, dropout=dropout)