Ahmadzei's picture
added 3 more tables for large emb model
5fa1a76
raw
history blame contribute delete
352 Bytes
from transformers import MaskFormerConfig, MaskFormerForInstanceSegmentation, ResNetConfig
config = MaskFormerConfig(backbone="microsoft/resnet50", use_pretrained_backbone=False) # backbone and neck config
model = MaskFormerForInstanceSegmentation(config) # head
You could also load the backbone config separately and then pass it to the model config.