IanTaehoonYoo / semantic-segmentation-pytorch

Pytorch implementation of FCN, UNet, PSPNet, and various encoder models.
MIT License
86 stars 19 forks source link

Using on high channel image dataset #15

Open torjusn opened 3 years ago

torjusn commented 3 years ago

I want to try e.g. FCN8 on a custom dataset of high channel images(100ch+) but I'm not used to image segmentation with pretrained encoders. Are the models w/ corresponding encoders for one particular dataset since the encoders are pretrained or could it work on a different dataset with much higher amount of channels?

IanTaehoonYoo commented 3 years ago

Hi, snoofalus

Pretrained encoders were trained based on the ImageNet dataset. If your dataset and ImageNet has very different features in images, it is better to avoid pretrained encoders. You can set like 'pretrained = false', the encoder's weights are initialized based on an optimizer without pretrained weights.

    model = all_models.model_from_name[model_name](n_classes, batch_size,
                                                   pretrained=false)