-
I want to implement UNet with timm encoder as a backbone. But usually the 1st feature level has the stride more than 1. What one can do to patch it? I see |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
@rakhimovv I'd say that's not a great idea, it'd mess up the rest of the model. If you have a unet arch that needs the stride 1 feature, just pass the unencoded input to the decoder for stride 1 (ie prepend it to the feature stack). Or you can use a unet arch that is designed to work with the typical ResNet, EfficientNet, etc striding where there is almost always stride=2 for the first level. Something like https://github.com/ternaus/TernausNetV2 |
Beta Was this translation helpful? Give feedback.
@rakhimovv I'd say that's not a great idea, it'd mess up the rest of the model. If you have a unet arch that needs the stride 1 feature, just pass the unencoded input to the decoder for stride 1 (ie prepend it to the feature stack).
Or you can use a unet arch that is designed to work with the typical ResNet, EfficientNet, etc striding where there is almost always stride=2 for the first level. Something like https://github.com/ternaus/TernausNetV2