qubvel-org / segmentation_models.pytorch

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

[feat] Adding UPerNet #926

Closed brianhou0208 closed 1 month ago

brianhou0208 commented 2 months ago

Description

I tried to add UperNet before. This may not be the best version. Maybe you can have a look. @GrantorShadow @jawi289o

Issue

906

Reference

brianhou0208 commented 2 months ago

Hi @qubvel , I’ve updated the code according to the commit, along with the README and documentation. I’ve also trained the model using the binary_segmentation_intro.ipynb, and the results are shown below.

Due to device limitations, the default parameters caused an OOM error, so I adjusted the decoder_pyramid_channels and decoder_segmentation_channels parameters.

Arch Backbone pyramid_channels segmentation_channels IoU (Per Image / Dataset)
UPerNet ResNet34 32 32 90.51 / 91.35
UPerNet ResNet34 32 16 90.48 / 91.38
UPerNet ResNet34 32 8 90.01 / 90.92
FPN ResNet34 - - 90.56 / 91.39
DeepLabV3Plus ResNet34 - - 90.26 / 91.07
UNet ResNet34 - - 90.50 / 91.31
Arch Backbone pyramid_channels segmentation_channels IoU (Per Image / Dataset)
UPerNet ResNet34 32 32 91.11 / 91.75
UPerNet ResNet34 32 16 91.10 / 91.76
UPerNet ResNet34 32 8 91.01 / 91.73
FPN ResNet34 - - 90.97 / 91.64
DeepLabV3Plus ResNet34 - - 90.48 / 91.22
UNet ResNet34 - - 91.15 / 91.76
brianhou0208 commented 1 month ago

I've finished it and fixed a few small issues.

qubvel commented 1 month ago

@brianhou0208 Thanks a lot for addressing it!