Why is Center Crop used for skip connections instead of Padding in U-Net?

Author: dyeddCreated Jan 5, 2025Updated Jan 5, 2025

Hello,

I have been studying the U-Net implementation in this repository and noticed that the skip connections between the encoder and decoder are implemented using Center Crop to match feature map sizes, instead of Padding.

I was wondering if you could clarify the reasoning behind this design choice. Specifically:

  1. Why is Center Crop used rather than padding the smaller feature map to match the larger one?
  2. Are there any specific advantages in this case (e.g., in terms of model performance or efficiency) to cropping the larger feature map instead of padding the smaller one?
  3. Have you noticed any particular challenges or benefits when using Center Crop in comparison to Padding for skip connections, especially in tasks such as segmentation or object detection?

I would really appreciate your insights on this design decision. Thank you!

Source: labmlai/annotated_deep_learning_paper_implementations