Skip to main content
. 2025 Oct 30;11(11):382. doi: 10.3390/jimaging11110382
Algorithm 1 CMAWRNet Image Restoration Algorithm
Require: Input image I0,1W×H×3
Ensure: Restored image Iclean
  1. Initialization: Set parameters γt,γs,γ, and patch size Ω

  2. Compute guidance map: GIγt  Equation (5)

  3. Compute structure map: S01Ωi,jΩIi,jγs  Equation (6)

  4. Compute texture component: T0IS0  Since I=S0T0

  5. Refine components using DNet:

  6. SDNetS0  Refined structure

  7. TDNetT0  Refined texture

  8. Clean components:

  9. ScleanTNet-HS  Clean structure component

  10. TcleanTNet-ST  Clean texture component

  11. Estimate latent variable from structure:

  12. MConv1x1Sclean

  13. S~cleanMSclean

  14. S^cleanScleanγ  Gamma correction

  15. Compute attention maps using FNet:

  16. MSσW2SReLUW1SSclean,I

  17. MTσW2TReLUW1TTclean,I

  18. Fuse components:

  19. SfusedMSSclean

  20. TfusedMTTclean

  21. IcleanSfusedTfused

  22. return Iclean