About
This repository contains a deep convolutional network trained on CT data for the binary classification of COVID/Non-COVID. Transfer learning was used here, where I utilized a pre-trained COVID-Net model (see https://arxiv.org/abs/2003.09871v1), and fine-tuned the parameters of the network using the training set. After selecting the best performing model on the validation set, the performance was quantified using three metrics: accuracy, F1-score, and the area under the ROC curve.
Requirements
This code was run on a linux device equipped with the following packages:
- Python 3.7.5
- numpy 1.18.2
- opencv-python 4.2.0.34
- scikit-learn 0.22.2.post1
- scipy 1.4.1
- tensorflow 1.15.0
I expect that any collection of recently updated Python modules + Tensorflow 1.15 will be able to run these scripts without issue.
Usage
- Clone this repository on your local device
- Unzip the training and validation data sets, keep them in their respective directories
- Download and unzip the pre-trained model (approx 2Gbs) here: https://drive.google.com/open?id=1MYRGcs7aMpzbDEuhpvZshdwaOFq8ZKvF
- Run the script quantify_performance.py and/or inference.py
*Tips
- Do not rearrange the sub-directories or rename them
- To run inference.py, one must include a --imagepath argument specifying the path to an image file one wishes to perform inference on
- Besides the previous point, the default arguments for quantify_performance.py and inference.py should be set so one may run this model directly without adjustment
Results
The model's performance on three metrics of interest here are as follows.
- Prediction Accuracy: Non-COVID - 99%, COVID - 93.9%
- The F1-Score: 0.9674
- The AUC: 0.9646
For any questions or concerns: *[email protected]
Last, code to continue training the model listed here is throwing some weird tensrflow error I have yet to figure out. It will be fixed and uploaded as soon as possible.