Skip to main content
. 2021 Oct 21;21(21):6996. doi: 10.3390/s21216996
Algorithm A1 Conservative loss and accuracy in once gradient descent
Input: Predicetion: ypred
Conservatively annotated label: labelcon
Treshold for sky-annotation: λs
Treshold for ground-annotation: λg
Output: Conservative binary cross-entropy: losscon
Conservative binary accyracy: acccon
1 Initialization:
2 Constant:Np, Ns, Ng = 0;
3 Array:masks, maskg, labels, labelg = 0;
4 forpixel in labelcon do
5 graphic file with name sensors-21-06996-i001.jpg
6
7
8
9
10
11
12
13
14
15 ηs=Ns/Np;
16 ηg=Ng/Np;
17 labels=masks;
18 labelg=maskg;
19 ypred_s=ypredmaskg;
20 ypred_g=(1ypred)maskg;
21 losscon_s  ypred_s,  labels;
22 losscon_g  ypred_g,  labelg;
23 losscon  losscon_s+losscon_g;
24 accs  ypred_s,  labels;
25 acccon_s=(accs ηs) / (1ηs);
26 accg ypred_g,  labelg;
27 acccon_g=(accg ηg) / (1ηg);
28 acccon=(acccon_s acccon_g) / 2;