IanTaehoonYoo / semantic-segmentation-pytorch

Pytorch implementation of FCN, UNet, PSPNet, and various encoder models.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Using on high channel image dataset

torjusn opened this issue · comments

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?

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)