def resnet101_unet64(input_channels=3, num_classes=1, dropout=0.5, pretrained=True): encoder = E.Resnet101Encoder(pretrained=pretrained, layers=[0, 1, 2, 3, 4]) if input_channels != 3: encoder.change_input_channels(input_channels) return UnetSegmentationModel(encoder, num_classes=num_classes, unet_channels=[64, 128, 256, 512], dropout=dropout)
def resnet101_fpncatv2_256(num_classes=5, dropout=0.0, pretrained=True, classifiers=True): encoder = E.Resnet101Encoder(pretrained=pretrained) return FPNCatSegmentationModelV2( 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, fpn_channels=256, dropout=dropout, abn_block=partial(ABN, activation=ACT_RELU), )
def resnet101_unet_v2(input_channels=6, num_classes=5, dropout=0.0, pretrained=True, classifiers=True): encoder = E.Resnet101Encoder(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=[64, 128, 256, 384], dropout=dropout, abn_block=partial(ABN, activation=ACT_RELU), )
def resnet101_fpn(num_classes=1, fpn_features=256): encoder = E.Resnet101Encoder() return FPNSegmentationModel(encoder, num_classes, fpn_features)