Hi,
I’m working on a semantic segmentation problem. I’m using U-Net architecture. For the encoder, I tested pre-trained ResNet50, ResNext50, Xception, and InceptionResNet v2 and I always get that ResNet 50 is most accurately (F1: 0.78, 0.72, 0.5, 0.51 respectively). For ResNext, Xception, InceptionResNetv2 I’m using the Cadene pre-trained models. This is my code for Xception:
def get_model(model_name:str, pretrained:bool, seq:bool=False, pname:str='imagenet', **kwargs):
pretrained = pname if pretrained else None
model = getattr(pretrainedmodels, model_name)(pretrained=pretrained, **kwargs)
return nn.Sequential(*model.children()) if seq else model
def xception(pretrained:bool=False): return get_model('xception', pretrained)
def _xception_split(m): return (m[0][11], m[1])
learn = unet_learner(data, xception, metrics=metrics, path = path, split_on = _xception_split)
In literature, usually xception and InceptionResNetv2 outperform ResNet. Am I doing something wong?