Skip to main content
. 2025 Jun 21;25(13):3865. doi: 10.3390/s25133865
Algorithm 1: Adaptive Spatial and Channel Feature Fusion

Input: Feature map FI∈RN×C*×H×W, Fconcat∈RN×(C+C*)×H×W

Output: Fused feature FIP∈R1×C×H×W

AFSM: Channel Attention Branch

      1. havg←GAP(FI);

      2. hmax←GMP(FI);

      3. Fh←Concat(havg,hmax);

      4. Fh*←σ(ReLU(Fh));

      5. FI*∈RN×C×H×W←FI⊙Fh*;

      6. FI*∈R1×C×H×W←ReLU(Conv3D(FI*));

DWLM: Spatial Attention Branch

      7. s←GAP(Fconcat);

      8. x←ReLU(FC1(s));

      9. w←Softmax(FC2(x));

      10. w←reshape(w,N,C,1,1);

      11. Fconcat*∈RN×C×H×W←Fconcat⊙w;

Feature Fusion

      12. F*←FI*⊙Fconcat*;

      13. FIP←ReLU(Conv2D(F*));

return FIP;