qubvel-org / segmentation_models.pytorch

Semantic segmentation models with 500+ pretrained convolutional and transformer-based backbones.
https://smp.readthedocs.io/
MIT License
9.6k stars 1.67k forks source link

TypeError: make_dilated() missing 1 required positional argument: 'dilation_list' #535

Closed OneDirection67 closed 2 years ago

OneDirection67 commented 2 years ago

when I use DeepLabV3plus which use vgg16 or Xception as encoder,I met the error : ypeError Traceback (most recent call last)

in () 35 classes=3, 36 activation=None, ---> 37 in_channels=3, 38 ) segmentation_models_pytorch/deeplabv3/model.py in __init__(self, encoder_name, encoder_depth, encoder_weights, encoder_output_stride, decoder_channels, decoder_atrous_rates, in_channels, classes, activation, upsampling, aux_params) 144 depth=encoder_depth, 145 weights=encoder_weights, --> 146 output_stride=encoder_output_stride, 147 ) 148 segmentation_models_pytorch/encoders/__init__.py in get_encoder(name, in_channels, depth, weights, output_stride, **kwargs) 78 encoder.set_in_channels(in_channels, pretrained=weights is not None) 79 if output_stride != 32: ---> 80 encoder.make_dilated(output_stride) 81 82 return encoder TypeError: make_dilated() missing 1 required positional argument: 'dilation_list' i don't konw how to solve it and what cause the problem.
qubvel commented 2 years ago

Sorry, those encoders are not supported. Try using some encoders from timm package with support dilation option, e.g. tu-gluon_xception65 or xception41 see table here https://smp.readthedocs.io/en/latest/encoders_timm.html

Cc-Hy commented 2 years ago

@qubvel Hello, when I use the encoders with 'Support dilation' tag, like timm-resnest, timm-res2net, I still meet the error TypeError: make_dilated() missing 1 required positional argument: 'dilation_list' How can I fix the problem?

thinkinds commented 2 years ago

@qubvel I came across the same issue when trying to build a model of DeepLabV3Plus + timm-res2next50. Any solutions?