Skip to content

Can I use my own custom feature extraction model to export to the backbone? #586

Open
@emrullahpolat

Description

@emrullahpolat

Hello, I want to use the UNet of Segmentation Model, I tried VGG and effnetB3 to add backbone. I wonder if I can add my own Keras feature extraction model. For example ;

`feature_extract_model = tf.keras.models.Sequential([

tf.keras.layers.Conv2D(128, (5, 5), strides=(4, 4), activation='relu', input_shape=(image_width, image_height, 3)),
tf.keras.layers.BatchNormalization(),
tf.keras.layers.MaxPooling2D(3, strides=(2, 2)),

tf.keras.layers.Conv2D(256, (3, 3), strides=(1, 1), activation='relu', padding='same'),
tf.keras.layers.BatchNormalization(),


tf.keras.layers.Conv2D(128, (5, 5), strides=(1, 1), activation='relu', padding='same'),
tf.keras.layers.BatchNormalization(),
tf.keras.layers.MaxPooling2D(3, strides=(2, 2))
])

model = sm.Linknet(BACKBONE=feature_extract_model , classes=n_classes, activation=activation, encoder_weights=None, encoder_freeze=True)

Do you think It is true?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions