NSH531 / xcovid

0 stars 0 forks source link

what's the problem in this code? #1

Open NSH531 opened 4 years ago

NSH531 commented 4 years ago

I meant to line 69 in https://github.com/NSH531/xcovid/blob/master/covid/test.py

NSH531 commented 4 years ago

I fixed this

output: stage1 correct percent:82.57839721254355 True: 278 False: 76

NSH531 commented 4 years ago

I fixed this again:

output: stage1 correct percent:82.29166666666667 True: 277 False: 77

ghost commented 4 years ago

Hello, First, sorry, my explanation in the email was wrong, the problem I mentioned happened when images of healthy patients were tagged as having corona and not the other way. This issue is fixed with the current code, but after deeper review, this is not the main issue right now. I noticed two new issues. Firstly, the code is correct and the predictions are technically highly accurate, but looking closely you can understand that what the third class learned to recognize is not a first stage of corona, but simply dark images. I ran a test myself, here is the full output: test/COVID--201b87f9902cce6732917d2f292bd3_big_gallery.jpeg actual data: [1.6291822e-13 9.8098644e-05 9.9906212e-01] test/COVID-19 (17).jpg actual data: [1.0000000e+00 1.0000000e+00 6.3311353e-27] test/COVID-19 (18).jpeg actual data: [1.6807700e-09 4.6585184e-01 3.7537422e-05] test/COVID-19 (18).jpg actual data: [1.6675216e-09 4.6517518e-01 3.7892420e-05] test/COVID-19 (19).jpg actual data: [9.999871e-01 9.991743e-01 5.805849e-14] test/COVID-19 (20).jpeg actual data: [9.9999535e-01 9.9999917e-01 2.7881304e-23] test/COVID-19 (20).jpg actual data: [1.0000000e+00 9.9999976e-01 3.1980554e-25] test/COVID-19 (21).jpeg actual data: [9.9241829e-01 9.9076384e-01 1.1699657e-12] test/COVID-19 (21).jpg actual data: [1.0057350e-05 1.5492263e-01 2.3909142e-05] test/COVID-19 (22).jpeg actual data: [9.9999869e-01 9.9730611e-01 1.4243846e-13] test/COVID-19 (22).jpg actual data: [9.9999297e-01 9.9801624e-01 1.2044083e-13] test/COVID-19 (23).jpeg actual data: [8.8792191e-08 3.1553939e-01 3.7890575e-07] test/COVID-19 (23).jpg actual data: [8.6792753e-08 3.1324917e-01 3.8972595e-07] test/COVID-19 (24).jpeg actual data: [1.8157709e-03 8.7977916e-01 1.6060764e-09] test/COVID-19 (24).jpg actual data: [2.2873503e-27 7.4476709e-09 1.0000000e+00] test/COVID-19 (25).jpg actual data: [1.0473213e-08 2.3954201e-02 1.8212455e-03] test/COVID-19 (26).jpeg actual data: [9.9936992e-01 7.0525664e-03 1.5872484e-11] test/COVID-19 (26).jpg actual data: [9.9936992e-01 7.0525664e-03 1.5872484e-11] test/COVID-19 (27).jpg actual data: [4.5484192e-08 9.8025739e-06 9.0696275e-01] test/Non-Covid (10).png actual data: [9.9497813e-01 6.6474862e-02 2.4894800e-04] test/Non-Covid (11).png actual data: [9.7554648e-01 1.6798002e-01 9.6683949e-04] test/Non-Covid (12).png actual data: [9.9033189e-01 2.0193431e-01 4.4827542e-04] test/Non-Covid (13).png actual data: [0.88042337 0.16981824 0.00813224] test/Non-Covid (15).png actual data: [9.8958814e-01 4.0340522e-01 5.7696336e-04] test/Non-Covid (16).png actual data: [9.8853254e-01 3.6882666e-01 6.4026297e-04] test/Non-Covid (17).png actual data: [9.8653877e-01 4.4833463e-01 8.0279435e-04] test/Non-Covid (18).png actual data: [0.97938305 0.2442739 0.00152426] test/Non-Covid (19).png actual data: [0.8607346 0.08758847 0.00978573] test/Non-Covid (20).png actual data: [0.6655691 0.05290295 0.02884902] test/Non-Covid (21).png actual data: [1.3954660e-05 1.5353631e-03 9.9950135e-01] test/Non-Covid (22).png actual data: [0.17686877 0.15950125 0.20458008] test/Non-Covid (23).png actual data: [0.97864944 0.47240525 0.00166243] test/Non-Covid (24).png actual data: [9.9639904e-01 2.6558170e-01 1.8825674e-04] test/Non-Covid (25).png actual data: [9.9626237e-01 3.1604967e-01 1.8882878e-04] test/Non-Covid (26).png actual data: [9.9573779e-01 3.2183617e-01 2.4673223e-04] test/Non-Covid (27).png actual data: [9.9204212e-01 4.0786108e-01 4.2129005e-04] test/Non-Covid (28).png actual data: [9.9506760e-01 4.0775755e-01 2.4795855e-04] test/Non-Covid (29).png actual data: [9.936320e-01 3.540434e-01 2.966973e-04] test/Non-Covid (30).png actual data: [9.9780315e-01 3.4926578e-01 9.6830277e-05] test/Non-Covid (31).png actual data: [9.9457502e-01 4.1752937e-01 2.7887864e-04] test/Non-Covid (32).png actual data: [9.9220407e-01 5.4840821e-01 4.3170908e-04] test/Non-Covid (33).png actual data: [9.929931e-01 4.466025e-01 3.447398e-04] test/Non-Covid (34).png actual data: [9.9213481e-01 4.9829069e-01 3.9165906e-04] test/Non-Covid (35).png actual data: [9.8686558e-01 5.1516151e-01 7.3584524e-04] test/Non-Covid (36).png actual data: [0.97614735 0.5274898 0.00148169] test/Non-Covid (37).png actual data: [9.8624241e-01 4.5987493e-01 8.7597873e-04] test/Non-Covid (38).png actual data: [9.8452747e-01 5.0189406e-01 8.4096147e-04] test/Non-Covid (39).png actual data: [0.98457736 0.4695454 0.00107568] test/Non-Covid (40).png actual data: [0.93587863 0.64033896 0.00517373] test/Non-Covid (41).png actual data: [0.69010395 0.5948991 0.06347012] test/Non-Covid (42).png actual data: [0.3035279 0.23429617 0.5144244 ] test/Non-Covid (43).png actual data: [0.34247446 0.25396416 0.46713227] test/Non-Covid (44).png actual data: [0.33004686 0.24944963 0.48308417] test/Non-Covid (9).png actual data: [0.9509092 0.0347417 0.00178838] test/Non-Covid.jpeg actual data: [7.1713626e-13 2.4833907e-06 9.9999797e-01] test/Non-covid-A (192).jpg actual data: [2.5663216e-09 2.6103358e-14 1.0000000e+00] test/Non-covid-A (193).jpg actual data: [1.8184587e-09 2.3467507e-14 1.0000000e+00] test/Non-covid-A (194).jpg actual data: [4.9485358e-09 3.9467666e-14 1.0000000e+00] test/Non-covid-A (195).jpg actual data: [1.0054524e-08 5.0625607e-14 9.9999976e-01] test/Non-covid-A (196).jpg actual data: [7.7277679e-07 8.0303814e-13 9.9998212e-01] test/Non-covid-A (197).jpg actual data: [9.9953354e-07 1.0281677e-12 9.9997735e-01] test/Non-covid-A (198).jpg actual data: [4.5679050e-07 6.8913197e-13 9.9998903e-01] test/Non-covid-A (199).jpg actual data: [1.885869e-06 2.880297e-12 9.999577e-01] test/Non-covid-A (200).jpg actual data: [4.9107216e-06 6.2294267e-12 9.9989736e-01] test/Non-covid-A (201).jpg actual data: [1.2614838e-05 2.4726979e-11 9.9975353e-01] test/Non-covid-A (202).jpg actual data: [2.6709509e-05 5.9081740e-11 9.9946266e-01] test/Non-covid-A (203).jpg actual data: [1.0721585e-05 2.0964430e-11 9.9978083e-01] test/Non-covid-A (204).jpg actual data: [1.3423445e-05 3.2106932e-11 9.9970776e-01] test/Non-covid-A (205).jpg actual data: [4.9502851e-06 1.9324504e-11 9.9988043e-01] test/Non-covid-A (206).jpg actual data: [4.1098210e-06 1.3417772e-11 9.9989808e-01] test/Non-covid-A (207).jpg actual data: [2.6250480e-06 6.7781067e-12 9.9993503e-01] test/Non-covid-A (208).jpg actual data: [7.4839008e-08 1.5261113e-13 9.9999845e-01] test/Non-covid-A (209).jpg actual data: [1.48419765e-08 7.47501900e-14 9.99999642e-01] test/Non-covid-A (210).jpg actual data: [4.04270e-09 3.80746e-14 1.00000e+00] test/Non-covid-A (211).jpg actual data: [2.6499731e-09 3.6723205e-14 1.0000000e+00] test/Non-covid-A (212).jpg actual data: [1.6882176e-09 2.8753702e-14 1.0000000e+00] test/Non-covid-A (213).jpg actual data: [4.3973416e-09 4.2011991e-14 1.0000000e+00] test/Non-covid-A (214).jpg actual data: [4.3882253e-09 4.1534023e-14 1.0000000e+00] test/Non-covid-A (215).jpg actual data: [9.3449781e-10 2.0273208e-14 1.0000000e+00] test/Non-covid-A (216).jpg actual data: [6.88065271e-10 1.26712936e-14 1.00000000e+00] test/Non-covid-A (217).jpg actual data: [2.2648863e-10 1.0360468e-14 1.0000000e+00] test/Non-covid-A (218).jpg actual data: [1.1992212e-09 2.2526850e-14 1.0000000e+00] test/Non-covid-A (219).jpg actual data: [6.1676947e-10 1.5557949e-14 1.0000000e+00] test/Non-covid-A (220).jpg actual data: [9.4196961e-09 4.8979287e-14 9.9999976e-01] test/Non-covid-A (221).jpg actual data: [3.7979535e-09 3.2506173e-14 1.0000000e+00] test/Non-covid-A (222).jpg actual data: [3.1034257e-09 3.2322737e-14 1.0000000e+00] test/Non-covid-A (223).jpg actual data: [1.6126730e-09 2.7779779e-14 1.0000000e+00] test/Non-covid-A (224).jpg actual data: [4.7235744e-09 3.2489809e-14 1.0000000e+00] test/Non-covid-A (225).jpg actual data: [5.9115585e-10 1.5488252e-14 1.0000000e+00] test/Non-covid-A (226).jpg actual data: [1.1885481e-09 2.2319167e-14 1.0000000e+00] test/Non-covid-A (227).jpg actual data: [9.6941732e-10 1.6713383e-14 1.0000000e+00] test/Non-covid-A (228).jpg actual data: [7.2747397e-10 1.5606125e-14 1.0000000e+00] test/Non-covid-A (229).jpg actual data: [7.3882012e-10 1.7974398e-14 1.0000000e+00] test/Non-covid-A (230).jpg actual data: [1.1946779e-09 2.0218182e-14 1.0000000e+00] test/Non-covid-A (231).jpg actual data: [6.1440592e-10 1.4053773e-14 1.0000000e+00] test/covid-ct (1).png actual data: [0.3392579 0.48470074 0.33346847] test/covid-ct (10).png actual data: [0.48341364 0.41288888 0.18734291] test/covid-ct (11).png actual data: [0.52247256 0.36751515 0.16939022] test/covid-ct (12).png actual data: [0.5412354 0.43384695 0.09739574] test/covid-ct (13).png actual data: [0.6083216 0.37453684 0.06982682] test/covid-ct (14).png actual data: [0.44200742 0.447749 0.15646854] test/covid-ct (15).png actual data: [0.1763933 0.22611818 0.43631247] test/covid-ct (16).png actual data: [0.45285413 0.3908796 0.25275406] test/covid-ct (17).png actual data: [0.60228765 0.47940814 0.12607752] test/covid-ct (18).png actual data: [0.49181008 0.28242934 0.22636151] test/covid-ct (19).png actual data: [0.11698184 0.00258629 0.32579643] test/covid-ct (2).png actual data: [0.9305394 0.12655228 0.00677783] test/covid-ct (20).png actual data: [0.7397412 0.02713317 0.02745371] test/covid-ct (21).png actual data: [0.92134607 0.25152636 0.01031127] test/covid-ct (3).png actual data: [0.51152825 0.05418758 0.0956555 ] test/covid-ct (4).png actual data: [0.96245414 0.25781336 0.00333105] test/covid-ct (5).png actual data: [9.95111883e-01 8.91041040e-01 1.51791655e-05] test/covid-ct (6).png actual data: [0.8649844 0.32518893 0.01206569] test/covid-ct (7).png actual data: [0.68210214 0.5913501 0.05647076] test/covid-ct (8).png actual data: [0.6769201 0.5066635 0.05479397] test/covid-ct (9).png actual data: [0.4771208 0.40382537 0.18912975] test/covid-ct.png actual data: [0.9305394 0.12655228 0.00677783] test/stage1 (1).jpg actual data: [1.2270284e-08 6.4471147e-14 9.9999964e-01] test/stage1 (10).jpg actual data: [9.1199666e-08 2.1373818e-13 9.9999774e-01] test/stage1 (11).jpg actual data: [9.2292829e-08 2.6795943e-13 9.9999762e-01] test/stage1 (12).jpg actual data: [1.8524927e-06 1.2554341e-12 9.9996603e-01] test/stage1 (13).jpg actual data: [3.6240069e-06 2.4099956e-12 9.9993443e-01] test/stage1 (14).jpg actual data: [1.3220551e-07 1.8550707e-13 9.9999666e-01] test/stage1 (15).jpg actual data: [1.1812000e-07 1.7959466e-13 9.9999702e-01] test/stage1 (16).jpg actual data: [4.098144e-07 4.384937e-13 9.999907e-01] test/stage1 (17).jpg actual data: [2.5374274e-07 2.3697274e-13 9.9999368e-01] test/stage1 (18).jpg actual data: [6.9827354e-07 4.2223771e-13 9.9998474e-01] test/stage1 (19).jpg actual data: [5.8612073e-07 5.7283919e-13 9.9998677e-01] test/stage1 (2).jpg actual data: [3.8297294e-08 1.2334147e-13 9.9999905e-01] test/stage1 (20).jpg actual data: [4.1116184e-07 4.3094518e-13 9.9999034e-01] test/stage1 (21).jpg actual data: [2.4647616e-07 2.8342888e-13 9.9999368e-01] test/stage1 (22).jpg actual data: [8.3512838e-08 1.5653623e-13 9.9999797e-01] test/stage1 (23).jpg actual data: [9.1821732e-08 2.0305532e-13 9.9999762e-01] test/stage1 (24).jpg actual data: [1.3022290e-07 1.5673072e-13 9.9999678e-01] test/stage1 (25).jpg actual data: [5.4821733e-08 1.1715997e-13 9.9999857e-01] test/stage1 (26).jpg actual data: [1.1118671e-08 6.3215844e-14 9.9999964e-01] test/stage1 (27).jpg actual data: [3.8178051e-08 1.2006996e-13 9.9999893e-01] test/stage1 (273).jpg actual data: [7.0704603e-10 1.6009646e-14 1.0000000e+00] test/stage1 (274).jpg actual data: [1.038906e-07 1.664036e-13 9.999975e-01] test/stage1 (275).jpg actual data: [1.06891996e-07 2.84322804e-13 9.99997258e-01] test/stage1 (276).jpg actual data: [1.2327305e-07 1.9064989e-13 9.9999702e-01] test/stage1 (277).jpg actual data: [8.3716456e-09 3.6332004e-14 9.9999976e-01] test/stage1 (278).jpg actual data: [3.7349892e-08 1.3479784e-13 9.9999905e-01] test/stage1 (279).jpg actual data: [7.6265128e-09 5.4097474e-14 9.9999976e-01] test/stage1 (28).jpg actual data: [1.7829771e-07 2.6630098e-13 9.9999547e-01] test/stage1 (280).jpg actual data: [3.4874142e-06 1.7784875e-12 9.9993289e-01] test/stage1 (281).jpg actual data: [3.5765959e-07 3.8134215e-13 9.9999189e-01] test/stage1 (282).jpg actual data: [1.062086e-06 9.483983e-13 9.999763e-01] test/stage1 (283).jpg actual data: [4.2713475e-07 3.4075358e-13 9.9999058e-01] test/stage1 (284).jpg actual data: [4.5362731e-06 1.4742211e-12 9.9991727e-01] test/stage1 (285).jpg actual data: [6.7070928e-08 9.8238346e-14 9.9999821e-01] test/stage1 (286).jpg actual data: [1.0877148e-09 1.7948875e-14 1.0000000e+00] test/stage1 (287).jpg actual data: [9.9905037e-07 1.1208697e-12 9.9997926e-01] test/stage1 (288).jpg actual data: [1.1886174e-07 1.7640171e-13 9.9999726e-01] test/stage1 (289).jpg actual data: [6.3488814e-10 1.1047609e-14 1.0000000e+00] test/stage1 (29).jpg actual data: [5.990785e-07 4.423798e-13 9.999869e-01] test/stage1 (290).jpg actual data: [2.0633222e-06 1.2323360e-12 9.9996281e-01] test/stage1 (291).jpg actual data: [1.3145927e-08 5.4757817e-14 9.9999964e-01] test/stage1 (292).jpg actual data: [1.9013171e-07 2.4647659e-13 9.9999547e-01] test/stage1 (293).jpg actual data: [4.8508053e-07 5.2037861e-13 9.9998915e-01] test/stage1 (294).jpg actual data: [1.4648806e-06 9.0349332e-13 9.9996889e-01] test/stage1 (295).jpg actual data: [4.9121856e-05 7.0983432e-12 9.9926347e-01] test/stage1 (296).jpg actual data: [4.0121673e-08 1.1680632e-13 9.9999881e-01] test/stage1 (297).jpg actual data: [3.1089756e-10 1.2184493e-14 1.0000000e+00] test/stage1 (298).jpg actual data: [7.9911990e-07 6.3196226e-13 9.9998236e-01] test/stage1 (299).jpg actual data: [3.0402296e-07 2.4037602e-13 9.9999273e-01] test/stage1 (3).jpg actual data: [4.0524448e-08 1.3240586e-13 9.9999905e-01] test/stage1 (30).jpg actual data: [1.9286377e-07 3.3737390e-13 9.9999535e-01] test/stage1 (300).jpg actual data: [2.2578064e-08 6.4860288e-14 9.9999940e-01] test/stage1 (301).jpg actual data: [2.4779456e-09 3.8019447e-14 1.0000000e+00] test/stage1 (302).jpg actual data: [2.6426116e-07 5.0219594e-13 9.9999404e-01] test/stage1 (303).jpg actual data: [4.6550545e-07 5.2779764e-13 9.9999034e-01] test/stage1 (304).jpg actual data: [1.16913995e-07 2.76965706e-13 9.99997258e-01] test/stage1 (305).jpg actual data: [3.1000923e-07 2.8553090e-13 9.9999309e-01] test/stage1 (306).jpg actual data: [7.8942691e-08 1.4903610e-13 9.9999785e-01] test/stage1 (307).jpg actual data: [3.204157e-07 3.603375e-13 9.999924e-01] test/stage1 (308).jpg actual data: [3.1057027e-07 3.6127205e-13 9.9999273e-01] test/stage1 (309).jpg actual data: [3.99645685e-08 1.08000163e-13 9.99999046e-01] test/stage1 (31).jpg actual data: [1.0548860e-07 2.0357303e-13 9.9999738e-01] test/stage1 (310).jpg actual data: [4.7191552e-08 9.6466217e-14 9.9999857e-01] test/stage1 (311).jpg actual data: [7.2185302e-09 4.3817075e-14 9.9999976e-01] test/stage1 (312).jpg actual data: [5.3006343e-06 1.8754035e-12 9.9990141e-01] test/stage1 (313).jpg actual data: [2.0935532e-08 5.6592867e-14 9.9999940e-01] test/stage1 (314).jpg actual data: [1.3962467e-06 6.8082410e-13 9.9997127e-01] test/stage1 (315).jpg actual data: [1.16434915e-08 7.35518620e-14 9.99999642e-01] test/stage1 (316).jpg actual data: [1.0310453e-07 1.9823204e-13 9.9999750e-01] test/stage1 (317).jpg actual data: [1.8082048e-08 7.6525903e-14 9.9999952e-01] test/stage1 (318).jpg actual data: [9.9826799e-08 1.3367641e-13 9.9999738e-01] test/stage1 (319).jpg actual data: [7.5501980e-08 1.6053993e-13 9.9999797e-01] test/stage1 (32).jpg actual data: [4.2221808e-07 3.3901880e-13 9.9999046e-01] test/stage1 (320).jpg actual data: [8.4857987e-10 1.7714676e-14 1.0000000e+00] test/stage1 (321).jpg actual data: [5.0647932e-06 5.0860167e-12 9.9989951e-01] test/stage1 (322).jpg actual data: [2.0957917e-07 1.6570206e-13 9.9999523e-01] test/stage1 (323).jpg actual data: [2.6870977e-09 4.0798324e-14 1.0000000e+00] test/stage1 (324).jpg actual data: [1.0329424e-06 1.5968554e-12 9.9997902e-01] test/stage1 (325).jpg actual data: [1.1018503e-07 1.6794335e-13 9.9999774e-01] test/stage1 (326).jpg actual data: [9.3222370e-06 2.6372726e-12 9.9983346e-01] test/stage1 (327).jpg actual data: [1.3649931e-08 6.7273152e-14 9.9999964e-01] test/stage1 (328).jpg actual data: [1.9092768e-06 1.9432162e-12 9.9996436e-01] test/stage1 (329).jpg actual data: [1.1843352e-06 9.9941236e-13 9.9997497e-01] test/stage1 (33).jpg actual data: [2.5445664e-07 3.7536266e-13 9.9999392e-01] test/stage1 (330).jpg actual data: [2.784883e-08 1.498779e-13 9.999994e-01] test/stage1 (331).jpg actual data: [9.4762314e-08 1.5113236e-13 9.9999738e-01] test/stage1 (332).jpg actual data: [2.1085812e-08 8.4145269e-14 9.9999940e-01] test/stage1 (333).jpg actual data: [2.3181658e-06 9.1270784e-13 9.9995637e-01] test/stage1 (334).jpg actual data: [4.0149153e-08 9.5493593e-14 9.9999881e-01] test/stage1 (335).jpg actual data: [4.013254e-08 9.762065e-14 9.999989e-01] test/stage1 (336).jpg actual data: [1.2094334e-06 8.1753452e-13 9.9997616e-01] test/stage1 (337).jpg actual data: [1.2154302e-07 2.5732324e-13 9.9999702e-01] test/stage1 (338).jpg actual data: [3.4732464e-09 3.5544504e-14 1.0000000e+00] test/stage1 (339).jpg actual data: [4.343865e-09 3.006255e-14 1.000000e+00] test/stage1 (34).jpg actual data: [8.1512826e-07 5.9065226e-13 9.9998319e-01] test/stage1 (340).jpg actual data: [1.1395789e-08 7.1591414e-14 9.9999964e-01] test/stage1 (341).jpg actual data: [9.4202085e-07 7.1854789e-13 9.9997985e-01] test/stage1 (342).jpg actual data: [4.76671183e-08 1.04596514e-13 9.99998569e-01] test/stage1 (343).jpg actual data: [5.3060145e-10 1.3665623e-14 1.0000000e+00] test/stage1 (344).jpg actual data: [8.0796383e-07 5.8129987e-13 9.9998474e-01] test/stage1 (345).jpg actual data: [2.9853851e-08 6.5965300e-14 9.9999917e-01] test/stage1 (346).jpg actual data: [6.5895335e-08 1.2817828e-13 9.9999833e-01] test/stage1 (347).jpg actual data: [1.2297539e-07 1.7153884e-13 9.9999690e-01] test/stage1 (348).jpg actual data: [7.3094600e-07 6.3443565e-13 9.9998534e-01] test/stage1 (349).jpg actual data: [3.875078e-09 5.042545e-14 1.000000e+00] test/stage1 (35).jpg actual data: [5.4532103e-07 3.3843344e-13 9.9998808e-01] test/stage1 (350).jpg actual data: [1.5289172e-09 2.5329406e-14 1.0000000e+00] test/stage1 (351).jpg actual data: [6.0905109e-08 1.6356647e-13 9.9999833e-01] test/stage1 (352).jpg actual data: [2.7458643e-07 4.2572310e-13 9.9999380e-01] test/stage1 (353).jpg actual data: [7.6007112e-08 2.1397394e-13 9.9999809e-01] test/stage1 (354).jpg actual data: [1.8131468e-08 8.9712546e-14 9.9999952e-01] test/stage1 (355).jpg actual data: [1.3857814e-06 7.4779321e-13 9.9997246e-01] test/stage1 (356).jpg actual data: [1.2099122e-06 5.5646156e-13 9.9997568e-01] test/stage1 (357).jpg actual data: [3.66957984e-08 1.03366886e-13 9.99999046e-01] test/stage1 (358).jpg actual data: [2.4332530e-07 5.5912664e-13 9.9999392e-01] test/stage1 (359).jpg actual data: [1.6912301e-10 1.1052331e-14 1.0000000e+00] test/stage1 (36).jpg actual data: [4.0015195e-07 3.4935702e-13 9.9999130e-01] test/stage1 (360).jpg actual data: [4.5851248e-08 8.9051589e-14 9.9999881e-01] test/stage1 (361).jpg actual data: [7.1255921e-09 5.7065999e-14 9.9999976e-01] test/stage1 (362).jpg actual data: [2.2448813e-08 7.3803553e-14 9.9999940e-01] test/stage1 (363).jpg actual data: [2.1888368e-07 2.3971030e-13 9.9999487e-01] test/stage1 (364).jpg actual data: [4.2383985e-07 4.5738890e-13 9.9998999e-01] test/stage1 (365).jpg actual data: [5.7048192e-07 7.0021923e-13 9.9998677e-01] test/stage1 (366).jpg actual data: [3.4400245e-09 3.7573782e-14 1.0000000e+00] test/stage1 (367).jpg actual data: [8.2840337e-08 1.8280183e-13 9.9999774e-01] test/stage1 (368).jpg actual data: [2.2438014e-09 1.8349900e-14 1.0000000e+00] test/stage1 (369).jpg actual data: [2.5580138e-09 3.2649651e-14 1.0000000e+00] test/stage1 (37).jpg actual data: [3.6151235e-07 3.8783533e-13 9.9999189e-01] test/stage1 (370).jpg actual data: [7.915963e-05 1.094281e-11 9.988426e-01] test/stage1 (371).jpg actual data: [5.9726183e-08 1.3263385e-13 9.9999845e-01] test/stage1 (372).jpg actual data: [2.2761560e-07 2.2470818e-13 9.9999511e-01] test/stage1 (373).jpg actual data: [5.5019189e-08 1.4731494e-13 9.9999845e-01] test/stage1 (374).jpg actual data: [4.2555757e-07 3.5183187e-13 9.9999046e-01] test/stage1 (375).jpg actual data: [1.1118671e-08 6.3215844e-14 9.9999964e-01] test/stage1 (376).jpg actual data: [4.098144e-07 4.384937e-13 9.999907e-01] test/stage1 (377).jpg actual data: [6.7439082e-08 1.9749499e-13 9.9999833e-01] test/stage1 (378).jpg actual data: [1.7832399e-08 6.0371392e-14 9.9999952e-01] test/stage1 (379).jpg actual data: [8.676941e-08 1.972153e-13 9.999982e-01] test/stage1 (38).jpg actual data: [1.8106681e-07 1.9354436e-13 9.9999547e-01] test/stage1 (380).jpg actual data: [8.1734987e-07 5.8399038e-13 9.9998367e-01] test/stage1 (381).jpg actual data: [1.8122756e-06 1.0287914e-12 9.9996352e-01] test/stage1 (382).jpg actual data: [6.2020678e-07 4.8853451e-13 9.9998724e-01] test/stage1 (383).jpg actual data: [1.5623232e-07 3.0192781e-13 9.9999583e-01] test/stage1 (384).jpg actual data: [3.8053207e-07 6.2188693e-13 9.9999058e-01] test/stage1 (385).jpg actual data: [1.9262058e-07 2.5855861e-13 9.9999547e-01] test/stage1 (386).jpg actual data: [3.9803959e-07 4.8849444e-13 9.9999118e-01] test/stage1 (387).jpg actual data: [1.499946e-09 2.474723e-14 1.000000e+00] test/stage1 (388).jpg actual data: [8.0698314e-08 1.3246270e-13 9.9999774e-01] test/stage1 (389).jpg actual data: [8.0465924e-08 1.7758562e-13 9.9999785e-01] test/stage1 (39).jpg actual data: [1.8034920e-07 1.7594236e-13 9.9999547e-01] test/stage1 (390).jpg actual data: [2.7635497e-07 4.0329415e-13 9.9999392e-01] test/stage1 (391).jpg actual data: [3.8439687e-09 3.0223992e-14 1.0000000e+00] test/stage1 (392).jpg actual data: [1.9845888e-07 1.6056842e-13 9.9999499e-01] test/stage1 (393).jpg actual data: [1.8674511e-08 5.7111515e-14 9.9999940e-01] test/stage1 (394).jpg actual data: [2.1215856e-06 1.1022111e-12 9.9995780e-01] test/stage1 (395).jpg actual data: [8.6851870e-08 2.3178326e-13 9.9999785e-01] test/stage1 (396).jpg actual data: [5.3536803e-07 3.8922630e-13 9.9998748e-01] test/stage1 (397).jpg actual data: [5.6852940e-07 3.6988170e-13 9.9998784e-01] test/stage1 (398).jpg actual data: [8.7218956e-07 6.6869318e-13 9.9998093e-01] test/stage1 (399).jpg actual data: [8.8180222e-08 1.2481276e-13 9.9999774e-01] test/stage1 (4).jpg actual data: [1.8082048e-08 7.6525903e-14 9.9999952e-01] test/stage1 (40).jpg actual data: [2.1337000e-07 3.0219281e-13 9.9999464e-01] test/stage1 (400).jpg actual data: [1.0882066e-09 2.0700326e-14 1.0000000e+00] test/stage1 (401).jpg actual data: [2.3973951e-06 1.3098597e-12 9.9995291e-01] test/stage1 (402).jpg actual data: [4.9873787e-08 1.4377181e-13 9.9999893e-01] test/stage1 (403).jpg actual data: [8.0045037e-10 1.6151655e-14 1.0000000e+00] test/stage1 (404).jpg actual data: [4.0997506e-07 5.0768358e-13 9.9999130e-01] test/stage1 (405).jpg actual data: [2.3881828e-08 7.5705508e-14 9.9999928e-01] test/stage1 (406).jpg actual data: [5.1600028e-07 5.0474935e-13 9.9998820e-01] test/stage1 (407).jpg actual data: [5.5938432e-07 4.9114304e-13 9.9998748e-01] test/stage1 (408).jpg actual data: [1.4633838e-06 1.0797468e-12 9.9996889e-01] test/stage1 (409).jpg actual data: [4.4725807e-06 1.7411370e-12 9.9991870e-01] test/stage1 (41).jpg actual data: [4.0421605e-07 3.3429986e-13 9.9999034e-01] test/stage1 (410).jpg actual data: [8.0896342e-08 1.0967581e-13 9.9999785e-01] test/stage1 (411).jpg actual data: [2.5094837e-10 8.6867633e-15 1.0000000e+00] test/stage1 (412).jpg actual data: [3.2984908e-06 1.9040869e-12 9.9993694e-01] test/stage1 (413).jpg actual data: [6.531520e-07 5.451566e-13 9.999850e-01] test/stage1 (414).jpg actual data: [2.9995515e-08 6.6329924e-14 9.9999917e-01] test/stage1 (415).jpg actual data: [1.3308964e-07 1.6514422e-13 9.9999654e-01] test/stage1 (416).jpg actual data: [8.1861833e-07 7.8583147e-13 9.9998271e-01] test/stage1 (417).jpg actual data: [1.5188070e-07 1.7891224e-13 9.9999642e-01] test/stage1 (418).jpg actual data: [1.5960850e-08 1.1108935e-13 9.9999952e-01] test/stage1 (419).jpg actual data: [7.4809009e-07 5.8524035e-13 9.9998486e-01] test/stage1 (42).jpg actual data: [9.5316643e-08 1.9264534e-13 9.9999750e-01] test/stage1 (420).jpg actual data: [1.2559211e-07 1.5814055e-13 9.9999666e-01] test/stage1 (421).jpg actual data: [8.7785025e-08 1.3253901e-13 9.9999762e-01] test/stage1 (422).jpg actual data: [5.5381161e-08 1.1513433e-13 9.9999845e-01] test/stage1 (423).jpg actual data: [7.8885044e-08 1.4872032e-13 9.9999809e-01] test/stage1 (424).jpg actual data: [1.4187640e-07 2.5715446e-13 9.9999654e-01] test/stage1 (425).jpg actual data: [8.8647978e-09 5.5683285e-14 9.9999976e-01] test/stage1 (426).jpg actual data: [3.8210760e-06 1.0642606e-12 9.9993086e-01] test/stage1 (43).jpg actual data: [3.4941056e-08 1.4710381e-13 9.9999905e-01] test/stage1 (44).jpg actual data: [1.7122874e-08 7.0972254e-14 9.9999952e-01] test/stage1 (45).jpg actual data: [4.1368516e-08 8.8132708e-14 9.9999881e-01] test/stage1 (46).jpg actual data: [7.8159715e-08 1.6273778e-13 9.9999774e-01] test/stage1 (47).jpg actual data: [5.0430193e-09 4.4090545e-14 9.9999988e-01] test/stage1 (48).jpg actual data: [2.3995781e-09 2.0438995e-14 1.0000000e+00] test/stage1 (49).jpg actual data: [4.3515460e-08 9.1040185e-14 9.9999881e-01] test/stage1 (5).jpg actual data: [3.31851702e-08 1.04173235e-13 9.99999166e-01] test/stage1 (50).jpg actual data: [1.2820118e-07 2.2899160e-13 9.9999654e-01] test/stage1 (51).jpg actual data: [7.4776336e-09 3.6525094e-14 9.9999976e-01] test/stage1 (52).jpg actual data: [6.7515117e-07 4.2092623e-13 9.9998689e-01] test/stage1 (53).jpg actual data: [1.9432119e-07 3.1420203e-13 9.9999583e-01] test/stage1 (54).jpg actual data: [1.11593415e-07 1.29759972e-13 9.99997497e-01] test/stage1 (55).jpg actual data: [5.4529316e-08 8.5889215e-14 9.9999869e-01] test/stage1 (56).jpg actual data: [5.9726183e-08 1.3263385e-13 9.9999845e-01] test/stage1 (57).jpg actual data: [1.665288e-08 6.627201e-14 9.999995e-01] test/stage1 (58).jpg actual data: [2.1622563e-08 6.0596581e-14 9.9999940e-01] test/stage1 (59).jpg actual data: [1.5388594e-08 8.2574430e-14 9.9999952e-01] test/stage1 (6).jpg actual data: [9.3664546e-08 2.0170584e-13 9.9999774e-01] test/stage1 (60).jpg actual data: [2.742853e-08 6.163131e-14 9.999993e-01] test/stage1 (61).jpg actual data: [4.3792141e-08 1.1619392e-13 9.9999881e-01] test/stage1 (62).jpg actual data: [4.5704386e-08 7.6384455e-14 9.9999881e-01] test/stage1 (63).jpg actual data: [3.6121509e-08 8.0244974e-14 9.9999905e-01] test/stage1 (64).jpg actual data: [2.0800245e-08 7.4996968e-14 9.9999952e-01] test/stage1 (65).jpg actual data: [6.0992527e-08 1.1477847e-13 9.9999857e-01] test/stage1 (66).jpg actual data: [2.2761560e-07 2.2470818e-13 9.9999511e-01] test/stage1 (67).jpg actual data: [3.2504104e-08 1.3537137e-13 9.9999917e-01] test/stage1 (68).jpg actual data: [9.8899244e-09 7.5208686e-14 9.9999976e-01] test/stage1 (69).jpg actual data: [6.031239e-09 4.586423e-14 1.000000e+00] test/stage1 (7).jpg actual data: [1.2685607e-07 2.4064071e-13 9.9999690e-01] test/stage1 (70).jpg actual data: [5.4478764e-09 4.7325804e-14 1.0000000e+00] test/stage1 (71).jpg actual data: [2.4164999e-08 6.1049839e-14 9.9999928e-01] test/stage1 (72).jpg actual data: [6.0026855e-09 3.4271665e-14 9.9999988e-01] test/stage1 (73).jpg actual data: [2.2662834e-09 2.0775321e-14 1.0000000e+00] test/stage1 (74).jpg actual data: [5.9927214e-09 3.6980178e-14 9.9999988e-01] test/stage1 (75).jpg actual data: [9.0736183e-09 5.5628191e-14 9.9999976e-01] test/stage1 (76).jpg actual data: [2.5580138e-09 3.2649651e-14 1.0000000e+00] test/stage1 (77).jpg actual data: [7.4396209e-09 4.1131252e-14 9.9999976e-01] test/stage1 (78).jpg actual data: [2.9484102e-08 9.1659773e-14 9.9999917e-01] test/stage1 (79).jpg actual data: [4.7002189e-08 1.4285663e-13 9.9999869e-01] test/stage1 (8).jpg actual data: [2.0916744e-07 2.0089187e-13 9.9999523e-01] test/stage1 (80).jpg actual data: [1.7912370e-08 4.9471925e-14 9.9999940e-01] test/stage1 (81).jpg actual data: [3.5574658e-08 8.1747949e-14 9.9999905e-01] test/stage1 (82).jpg actual data: [2.1850412e-05 5.5976287e-12 9.9962080e-01] test/stage1 (9).jpg actual data: [1.4694230e-07 2.0510393e-13 9.9999654e-01] test/stage1.jpg actual data: [4.286133e-08 1.333619e-13 9.999988e-01] stage1 correct percent:82.29166666666667 True: 277 False: 77

I opened images in which the third value is very close to 1, and they are all dark, its true not only for the 'stage1' but for many 'Non-Covid' too, but since there are 237 out of 354 images tagged as stage1, and all are very dark, the output gives the wrong assumption that the trained network learned to recognize corona. Opening any image that doesn't have a strong prediction of third class shows to be bright and more detailed, which strengthens my conclusion. I tried to explain this before - to gain meaningful accuracy, the images have to be from the same source, shape and quality, both in training and in testing, otherwise the network will start learning things we didn't intended it to. Another problem with the current test set is that it has mostly ct images, but it's also mixed with x-rays from a completely different angle (front vs dissection) which should be treated as a different problem with a separate model and not mixed together.

The second issue I noticed from the output is that the sum of the 3 predictions for each image is not 1 as it should be as those represent probabilities. I'm not sure what the cause is but it seems that the same model was trained on a different number of classes instead of starting a new model from scratch when the change was made.

In conclusion, the model is accurate right now, but it just correctly shows which images are dark and not what we intended it to predict.

NSH531 commented 4 years ago

what's I can to do?

ghost commented 4 years ago

The data set has to be designed carefully and when it's ready, retrain the model again starting from imagenet.

NSH531 commented 4 years ago

I'll retrain the model with thousands of images of stage1

ghost commented 4 years ago

I'll retrain the model with thousands of images of stage1

This will lead to good results only if the images of the other classes are from the same source and the quantity is the same.

NSH531 commented 4 years ago

I'm training this

Shabbat Shalom! :)