The purpose of this study is to design and develop a deep learning model with VGG19 architecture for early detection of Covid-19 and making early treatments possible, by using computed tomography scans of the patient's lung.
Open-source dataset "SARS-COV-2 Ct-Scan Dataset" is used to train the model. This dataset contains 1252 CT scans that are positive for SARS-CoV-2 infection (COVID-19) and 1230 CT scans for patients non-infected by SARS-CoV-2, 2482 CT scans in total. CT scans belong to real patients in hospitals from Sao Paulo, Brazil.
This dataset is can be found at: www.kaggle.com/plameneduardo/sarscov2-ctscan-dataset
- Tensorflow
- Keras
- Sklearn
- Imutils
- Matplotlib
- Numpy
- OpenCV
- VGG19
- Pathlib
Train your own model by using "Model_Training.ipynb". Just enter your dataset's path into the following code, and then execute. You can also skip this process. All you have to do is using "model.h5" and "weights.hdf5" from main, which is ready for prediction.
dataset= # Your dataset's path
There are 2 ways to predict your own image. You can either use "Predict_An_Image.ipynb" to predict a single image, or use "Predict_Multiple_Images.ipynb" to predict multiple images in a file. If you don't want to train your own model, you can use already trained model "model.h5" and "weights.hdf5".
model = keras.models.load_model(#' Please enter your model's path here')
model.load_weights(#' Please enter your weight's path here')
Enter your image's path into the following code.
ImagePath = #' Please enter the path of the image you want to predict'
Enter your folder's path that contains CT images into the following code.
path = #' Please enter the path of the folder that contains images you want to predict'
imagePaths = list(paths.list_images(path))
The final accuracy of the model is %88. You can also examine model's training history from the following figures:
Soares, Eduardo, Angelov, Plamen, Biaso, Sarah, Higa Froes, Michele, and Kanda Abe, Daniel. "SARS-CoV-2 CT-scan dataset: A large dataset of real patients CT scans for SARS-CoV-2 identification." medRxiv (2020). doi: https://doi.org/10.1101/2020.04.24.20078584.
Angelov, P., & Soares, E. (2020). Towards explainable deep neural networks (xDNN). Neural Networks, 130, 185-194.
}