I divided the work into various stages in order to successfully build a model that can outperform other models and be ready for a real world scenario. 1) A simple model was constructed which contained equal number of x-ray scans of covid and non-covid(pneumonia/normal) people. 2) The previous model was made complex by adding more convolutional layers. NN was made larger. Batch Normalization, dropout , generators and various other methods were used. Model's performance was measured. 3) In the real world, there are very less number of absolutely confirmed covid-19 scans present whereas the number of normal, viral and bacterial pneumonia scans are very high in number. This leads to a highly imbalanced dataset. Transfer Learning was implemented using ResNet50V2 (Google's state of the art architechture) because our model must perform well on these highly imbalanced dataset too considering real world requirement. Model performed was high. 4) Since ResNet50V2 is trained on different set of images, CovXNet introduced transfer learning which was trained on images of non-covid people first and then through the method of transfer learning, it was made to be trained with folder containing covid and non-covid people too in small number. This model outperformed others by a significant margin. I also implemented a basic skeleton of the working of CovXNet - 128 architechture.
CovXNet is a deep convolutional neural network (CNN) based architecture that utilizes depthwise convolution with varying dilation rates for efficiently extracting diversified features from COVID-19 affected people's chest X-rays. This model outperformed all other models publicly available or built. It tackles the need of providing quick, effective, reliable and economical probability of a person having COVID-19 just by the method of x-ray scans. Since the symptoms of viral and bacterial pneumonia too significantly matches with COVID, including the chest x ray scans, it let to the building of this kind of model on which training and testing is done on normal, pneumonia and COVID x-ray scans. In the real world, there are very less number of absolutely confirmed covid-19 x-ray scans present whereas the number of normal, viral and bacterial pneumonia scans are very high. This leads to a highly imbalanced dataset. It is tackled by the method of transfer learning in this paper. Larger database containing non-COVID pneumonia X-rays are used for initial training stage that are effectively transferred with some additional fine-tuning layers that are further trained with a smaller number of chest X-rays corresponding to COVID-19 and other pneumonia patients. The most important shortcoming the model effectively tackles is that the symptoms of COVID, viral and bacterial pneumonia can be spatial or localized. It is tackled by using different forms of CovXNets that are designed and trained with X-ray images of various resolutions with varying dilation rates for efficiently extracting diversified features . For further optimization of their predictions, a stacking algorithm is employed, where a meta-learner is introduced. It is also trained on some images in order to efficiently provide the correct outcome. Finally, a gradient-based discriminative localization is integrated to distinguish the abnormal regions of X-ray images which led to the corresponding prediction of a person having COVID, pneumonia or that he is a normal person. Extensive experimentations provide very satisfactory detection performance with accuracy of 97.4% for COVID/Normal, 96.9% for COVID/Viral pneumonia, 94.7% for COVID/Bacterial pneumonia, and 90.2% for multiclass COVID/normal/Viral/Bacterial pneumonias. Hence, the proposed architecture can serve as an efficient tool in the current state of COVID-19 pandemic.