Skip to content

Instantly share code, notes, and snippets.

@yassineAlouini
Created January 13, 2019 12:20
Show Gist options
  • Save yassineAlouini/d4f97acf66022540025dfe78337aef40 to your computer and use it in GitHub Desktop.
Save yassineAlouini/d4f97acf66022540025dfe78337aef40 to your computer and use it in GitHub Desktop.
A use case for getting a pretrained Unet with ResNet34 and trained on the ImageNet dataset
# To get the segmentation_models library, run:
# pip install segmentation-models
from segmentation_models import Unet
def build_pretrained_unet_model():
"""Build a pre-trained Unet model. """
return Unet(backbone_name='resnet34', encoder_weights='imagenet')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment