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 FIRN×C*×H×W, FconcatRN×(C+C*)×H×W

Output: Fused feature FIPR1×C×H×W

AFSM: Channel Attention Branch

      1. havgGAP(FI);

      2. hmaxGMP(FI);

      3. FhConcat(havg,hmax);

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

      5. FI*RN×C×H×WFIFh*;

      6. FI*R1×C×H×WReLU(Conv3D(FI*));

DWLM: Spatial Attention Branch

      7. sGAP(Fconcat);

      8. xReLU(FC1(s));

      9. wSoftmax(FC2(x));

      10. wreshape(w,N,C,1,1);

      11. Fconcat*RN×C×H×WFconcatw;

Feature Fusion

      12. F*FI*Fconcat*;

      13. FIPReLU(Conv2D(F*));

return FIP;