segmentation_models.pytorch icon indicating copy to clipboard operation
segmentation_models.pytorch copied to clipboard

Accessing inner layers outputs in segmentation models

Open meshghi opened this issue 2 years ago • 0 comments

Hello! Let's say I define a segmentation model as follows. Is there a way that I can access multiple prediction layers from different levels of the decoder so that I could bring them to the final output size with upsampling?

model = smp.Unet(
    encoder_name="resnet34",
    encoder_weights="imagenet",     
    in_channels=1,                  
    classes=3,                     
)

In a more general way, can I build a custom model that inherits from the model above (or from the smp module in some way) so that I could customize/expand upon the smp models for my needs?

Thanks!

meshghi avatar Aug 31 '22 05:08 meshghi