Skip to main content
. 2021 Dec 22;12(1):16. doi: 10.3390/diagnostics12010016
Algorithm 1. Coarse-to-Fine Prediction.
Require: Trained WT-DFN model W
for i=1,2,,b do (batch size =b)
1: Obtain raw probability piraw:piraw=W(Iraw,i)
and out attention maps F by Equation (1);
2: Calculate normalize Fk* by Equation (2);
3: Obtain crop image Icrop and erase image
Ierase by Equations (3) and (4), respectively;
4: Predict fine-grained probability
picrop:picrop=W(Icrop,i),
pierase:pierase=W(Ierase,i);
5: Calculate the final prediction pi by Equation (5);
end for
return {pi,,pb}