muhammedtalo / COVID-19

Automated Detection of COVID-19 Cases Using Deep Neural Networks with X-Ray Images
122 stars 109 forks source link

3 classes #1

Open hassane11 opened 4 years ago

hassane11 commented 4 years ago

HI there, I was testing your model for the 3 classes using the images you provided...I tested it several times and the best accuracy was 80%... I even got better results using Densenet..

I took random images and from the dataset and set them as validation... am i doing something wrong?

muhammedtalo commented 4 years ago

Hi, I have provided the notebook for also three classes. Please see COVID-19 main repository.

JakiaSultana commented 4 years ago

HI there, I was testing your model for the 3 classes using the images you provided...I tested it several times and the best accuracy was 80%... I even got better results using Densenet..

I took random images and from the dataset and set them as validation... am i doing something wrong?

Hello, Hassane11..I'm Jenny from Bangladesh. I'm trying to run this model but somehow I'm facing some difficulties..would you please help me to work it out? please give me your email address to reach you.

yaelbeng commented 4 years ago

Hi, I run your notebook for three classes many times and got COVID-19 recall in the range of 0.7-0.78 the most. Is it possible that something is missing in the notebook? I really appreciate your help.

muhammedtalo commented 4 years ago

Please install the "fastai" (v1) and use the "one-fit-cycle"

let us know if you get the desired results.

yaelbeng commented 4 years ago

I run the notebook on the colab, I did not make any changes to the code. I used fastai version =1.0.61 , torch version =1.4 and torchvision version =0.5.0. I attached the colab notebook after I downloaded the data to a folder called dataset. https://drive.google.com/file/d/1U9_w1U59yQAn9xEqTZ7ZrifMXY2NJCMK/view?usp=sharing Is there anything I need to change? Thanks.

These are the results:

225 188 0.8355555555555556 [[21 3 3] [ 0 91 17] [ 0 14 76]] precision recall f1-score support

Covid-19 1.00 0.78 0.88 27 No_findings 0.84 0.84 0.84 108 Pneumonia 0.79 0.84 0.82 90

accuracy                           0.84       225

macro avg 0.88 0.82 0.84 225 weighted avg 0.84 0.84 0.84 225

epoch train_loss valid_loss accuracy time
0 0.802216 1.120054 0.146667 03:18
1 0.719557 0.613483 0.733333 00:49
2 0.657062 0.565587 0.746667 00:50
3 0.616445 0.561667 0.720000 00:49
4 0.597185 0.604905 0.755556 00:48
5 0.595375 0.593846 0.751111 00:48
6 0.551170 0.499635 0.800000 00:48
7 0.528017 0.564676 0.768889 00:49
8 0.522138 0.666555 0.702222 00:48
9 0.498333 0.450894 0.808889 00:48
10 0.506787 0.859526 0.684444 00:48
11 0.506639 0.832571 0.724444 00:49
12 0.510909 1.550252 0.524444 00:48
13 0.509355 0.843340 0.622222 00:47
14 0.510913 0.761859 0.755556 00:47
15 0.524859 1.158196 0.604444 00:48
16 0.527368 0.469246 0.831111 00:49
17 0.550249 1.834808 0.471111 00:48
18 0.548067 0.792381 0.666667 00:48
19 0.546760 0.573853 0.742222 00:48
20 0.546302 0.621358 0.724444 00:48
21 0.555524 0.745503 0.737778 00:48
22 0.540617 1.023847 0.653333 00:49
23 0.536341 0.667747 0.715556 00:49
24 0.549241 0.595138 0.755556 00:49
25 0.525991 0.646543 0.755556 00:49
26 0.528114 2.888739 0.431111 00:49
27 0.522915 1.264647 0.586667 00:50
28 0.523076 0.820289 0.671111 00:49
29 0.519192 0.934004 0.617778 00:49
30 0.511381 0.672165 0.706667 00:50
31 0.518954 1.238636 0.551111 00:50
32 0.534379 0.647150 0.737778 00:50
33 0.498529 0.499963 0.826667 00:49
34 0.511284 0.718220 0.715556 00:49
35 0.519870 0.530848 0.808889 00:49
36 0.496464 1.174538 0.640000 00:49
37 0.492945 0.631620 0.746667 00:49
38 0.478762 0.654109 0.720000 00:50
39 0.486948 0.843268 0.648889 00:50
40 0.478552 0.560477 0.777778 00:49
41 0.479822 0.517507 0.791111 00:49
42 0.477410 1.204803 0.462222 00:48
43 0.472072 0.764760 0.697778 00:48
44 0.457440 0.539294 0.791111 00:48
45 0.454724 0.534468 0.800000 00:49
46 0.464955 1.174639 0.555556 00:49
47 0.468718 1.059415 0.497778 00:49
48 0.454491 1.226268 0.640000 00:48
49 0.440996 0.494795 0.826667 00:49
50 0.441115 0.492688 0.813333 00:50
51 0.434957 0.565116 0.786667 00:50
52 0.416702 0.671017 0.777778 00:50
53 0.410208 0.797799 0.733333 00:50
54 0.397721 0.500998 0.826667 00:50
55 0.403954 0.932937 0.617778 00:49
56 0.402539 0.552333 0.791111 00:49
57 0.392269 0.856246 0.671111 00:49
58 0.393315 0.508536 0.804444 00:50
59 0.398827 0.539836 0.800000 00:49
60 0.392190 0.617230 0.777778 00:50
61 0.383788 0.462455 0.791111 00:50
62 0.375399 0.667062 0.706667 00:50
63 0.363777 0.595107 0.768889 00:50
64 0.363340 0.530078 0.773333 00:49
65 0.363703 0.510627 0.786667 00:50
66 0.364770 0.585928 0.777778 00:49
67 0.365704 0.485989 0.800000 00:50
68 0.346458 0.455922 0.826667 00:50
69 0.340564 0.687559 0.715556 00:51
70 0.344715 0.583831 0.777778 00:51
71 0.336572 0.678242 0.782222 00:50
72 0.324699 0.628685 0.782222 00:50
73 0.316564 0.438614 0.826667 00:50
74 0.311029 0.514318 0.795556 00:51
75 0.309957 0.543917 0.804444 00:50
76 0.293605 0.579203 0.813333 00:50
77 0.293663 0.446774 0.844444 00:50
78 0.295200 0.499016 0.817778 00:50
79 0.283304 0.535741 0.813333 00:50
80 0.279290 0.472687 0.835556 00:50
81 0.277194 0.455442 0.848889 00:50
82 0.277741 0.472730 0.813333 00:50
83 0.275161 0.452817 0.848889 00:50
84 0.281002 0.478777 0.808889 00:50
85 0.276415 0.447774 0.835556 00:50
86 0.272619 0.447729 0.848889 00:50
87 0.268938 0.441842 0.853333 00:49
88 0.268014 0.478940 0.835556 00:50
89 0.280847 0.480289 0.831111 00:50
90 0.274180 0.438755 0.853333 00:50
91 0.272975 0.446968 0.848889 00:50
92 0.265561 0.445463 0.853333 00:50
93 0.257683 0.445405 0.848889 00:50
94 0.256960 0.453300 0.844444 00:50
95 0.253767 0.450355 0.844444 00:50
96 0.245825 0.444155 0.848889 00:50
97 0.251146 0.445887 0.844444 00:51
98 0.244173 0.446138 0.848889 00:50
99 0.246019 0.449752 0.835556 00:50
muhammedtalo commented 4 years ago

Way to go! You have improved your previous score. In our paper we have reported five fold cross validation evaluation. For Fold-3, we have reported a classification accuracy of 83.6% . Your result is better than that.

For the next task, you can do 5-fold cross validation and see how the results in other folds or you can change the seed number (np.random.seed(41)) in the code and see how the results change for different distributions.

Would you also share your binary results. Best

yaelbeng commented 4 years ago

Hi, thanks for your answer. My problem was with the recall, for all 5-fold cross validation the COVID-19 recalls that were reported in the paper are higher than 0.94, and my result was significantly lower. Changing the seed number helps. Thank you.

minaahmed commented 3 years ago

Hello, How did you split the dataset for three classes code?

jaideep11061982 commented 3 years ago

@minaahmed do you know if all the models https://github.com/lindawangg/COVID-Net/blob/master/docs/models.md

are 3 classs models only?

One more q. Can this model detect all kind of opacities or Pneumonia opacity and Covid Opacity only ?

mohanades commented 3 years ago

Hi muhammed I have a problem in first run.When I run your source I have a problem I attach that message. How can I upload dataset? Can I have first of your source code? Thank you 1