Over 31.2M are Infected currently with COVID-19 and it is spreading exponentially worldwide. To avoid the spread of COVID we must first detect who are infected.But current COVID tests do not detect much accurately resulting Non-Covid patients being hospitalised and Covid patients being not taken care.
Note this is not any official COVID testing Model, it is just an experimentfor educational purpose
Introduction :This is not aOfficial COVID-19 Tester.
- It helps to detect COVID from X-ray images.
- OpenVino-Speeds up inference of model by 1.2 Times than normal.
- When User upload or runs inference on image it displays the probability of person being COVID +ve or -ve.
- Easily detect directly from Chest X-rays.
- Can be used to check other Chest disease by slightly changing the data
It is a network of Convolution and MaxPooling Layers with dropout and flattening.
Data is collected from Extensive COVID-19 X-Ray and CT Chest Images Dataset from Mendeley Datasets.
It contains Folders of X-Ray containing COVID and Non-COVID x-rays.
Dataset Contains 5500 Non-COVID images and 4044 COVID images.
Training:Model:
Model: "sequential"
_________________________________________________________________
Layer (type) Output Shape Param #
=================================================================
batch_normalization (BatchNo (None, 150, 150, 3) 12
_________________________________________________________________
conv2d (Conv2D) (None, 150, 150, 32) 896
_________________________________________________________________
max_pooling2d (MaxPooling2D) (None, 75, 75, 32) 0
_________________________________________________________________
dropout (Dropout) (None, 75, 75, 32) 0
_________________________________________________________________
flatten (Flatten) (None, 180000) 0
_________________________________________________________________
dense (Dense) (None, 128) 23040128
_________________________________________________________________
dropout_1 (Dropout) (None, 128) 0
_________________________________________________________________
dense_1 (Dense) (None, 2) 258
=================================================================
Total params: 23,041,294
Trainable params: 23,041,288
Non-trainable params: 6
_________________________________________________________________
Training is run on 7 Epochs giving Accuracy on Validation give Accuracy about 96%.
Normal Inference on Tensorflow:All Codes and Explanation are Given in Colab
Running The Images on Inference of Model, Test Image contains 955 Images.
Results:
Accuracy: 92%
Total Time: 9.34 Seconds Total
FPS: 102.26 Images/Second
Inference using OpenVino:All Codes and Explanation are Given in Colab
First we freeze the.h5 model and then convert frozen model to.xml and.bin required for inference.
source /opt/intel/openvino/bin/setupvars.sh && \
python infer.py
Sample Output
Covid Positive 92.04492%
Covid Positive 95.45542%
Healthy Person 68.92835%
Covid Positive 79.93491%
Results:
Accuracy: 92%
Total Time: 7.82 Seconds Total
FPS: 122.12 Images/Second
Conclusion:Using OpenVino Boosts the performance significantly by 1.2 Times.
OpenVino is the best when doing inferencing and testing on CPU.It is great in fields of Robotics and Computer Vision
Future Work:Making an online platform where Doctors can directly upload X-Ray Images and it will send notification to user on their phone about their Reports automatically and fast.
Openvino Installlation Timestamps: Sep 17, 12:15 AM (IST) aniketdhole991@gmail.com
Comments