matheushent / covid-19-detector

Repository containing scripts to train and test a neural network whose goal is to detect presence of COVID-19
https://coronax.com.br/
Apache License 2.0
16 stars 5 forks source link
convolutional-neural-networks covid-19 cuda deep-learning efficientnet gpu-tensorflow grad-cam keras machine-learning-algorithms occlusion-sensitivity python3 resnet-152 resnet-50 tensorflow transfer-learning vgg16 vgg19

"# covid-19-detector"

ATTENTION

Do NOT use any result of this repo for scientific purposes without medical assistance

Pre-requisites

We assume you have an GPU available and python 3.6+ installed. Make sure you have installed all the correct drivers for gpu training. Check out https://www.tensorflow.org/install/gpu for information about GPU setup.

Assuming you're ok, run pip install -r requirements.txt to install all necessary packages.

Training

Set the following options to train:

Example of training command line:

python train.py -p dataset/ -g True --network vgg19 --mn vgg19_1

Predicting

Set the following options to predict:

Pattern Visualization

Set the following options to run the vis script:

Grad-CAM

Alt text

Occlusion Sensitivity

Alt text

Server

To run the server just enter the following line on cmd:

python server.py -m path/to/model/weights/file

The weights file were generated after training

After, to make an http request run request.py:

python request.py -p path/to/folder/containing/images/to/be/classified

Results

All the models were run on a GPU RTX 2080 6GB. Each epoch took ~22s

Credits