Skip to main content
. 2024 Jun 17;24(12):3917. doi: 10.3390/s24123917
Algorithm 2 Inference of ETDiffIR
Input: LR image μ=ILR, text caption c, total step T.
Output: The restored image IHR.
  • 1: 

    Initialization: Random sample xTN(0,ρ2), fϕ is the pretrained ERUNet, T = 100. EM is Euler-Maruyama method.

  • 2: 

    for t=T to 1 do

  • 3: 

       t˜=TIFB(μ,c,t);                              ▷Enhance

  • 4: 

       ϵ^t=f^ϕ(xt,μ,c,t˜)                             ▷Predict noise

  • 5: 

       dx=[αt(μx)βt2xlogqt(x)]dt+βtdw˜;    ▷Substitute score into Equation (6)

  • 6: 

       xt1=xtEM(dxt);                            ▷Reverse SDE

  • 7: 

    end for

  • 8: 

    IHR=x0;