sithu31296 / semantic-segmentation

SOTA Semantic Segmentation Models in PyTorch
MIT License
830 stars 149 forks source link

Any ImageNet pretrained weights? #34

Open CauchyComplete opened 2 years ago

CauchyComplete commented 2 years ago

Thanks for this awesome repo! Are there any ImageNet pretrained weights? Thanks

sithu31296 commented 2 years ago

Take a look at this. All the weights provided there are trained on imagenet.

CauchyComplete commented 2 years ago

Thanks. Then no ImageNet weights for BiSeNet v2? Plus, could you tell me how to combine encoders with heads?

sithu31296 commented 2 years ago

Yes. BiSeNetv2 doesn't use a separate backbone model. So, no ImageNet weights for it. For custom model creation, please see the sample from here. Basically, you need to know the output channels of an encoder since a head class needs at least 3 parameters (channel dims, head dim, num_classes).

CauchyComplete commented 2 years ago

Thank you :D I have more questions. 1) Do we have to normalize the inputs when using ImageNet pretrained models? 2) When I use BiSeNet (either v1 or v2), this error appears: AttributeError: 'tuple' object has no attribute 'size'. Seems that the model outputs three types of outputs. Shall I just ignore the second and third elements of the output?

scl666 commented 1 year ago

是的。BiSeNetv2 不使用单独的主干模型。因此,没有图像网络的权重。有关自定义模型的创建,请参阅此处的示例。基本上,您需要知道编码器的输出通道,因为 head 类至少需要 3 个参数(通道暗淡、磁头调暗num_classes)。

你好,camvid数据集使用时损失出现nan,cityscapes没有,博主知道啥情况吗