Implementation of Deep Learning models that can identify COVID-19, Lung Opacity, Viral Pneumonia or nothing(if patient is healthy) from lung X-Ray images.
In order to run the experiments in your local machine you should do the following steps.
- Clone the repo by running
git clone https://github.com/ManosL/XRay-Lung-Disease-Detection.git
- Afterwards, install virtualenv in pip3(if you did not do that already) by running
pip3 install virtualenv
- Then move to this repository directory.
- Then create and activate the virtual environment by running the following commands
virtualenv <venv_name>
source bin/activate
- Afterwards, install the requirements by running
pip3 install -r requirements.txt
- Finally, download the COVID-19 Radiography Database in order to have the dataset in order to run experiments.
- You are ready to move to
code/
directory and run the experiments and demo programs!
In order to run the experiments done in order to write the report, go into code/
directory and run the following
command(you can add -h
to see how you should run it):
python3 main.py --dataset_path <dataset_path> --epochs <epochs>
--batch_size <batch_size> --learning_rate <learning_rate>
--patience <patience> --pretrained_path <prerained_model>
--mask_images --log <log_file>
where:
- <dataset_path>: Path to COVID-19 Radiography Dataset.
- : Number of training epochs.
- <batch_size>: Training batch size.
- <learning_rate>: Learning rate of the optimizer used during training.
- : Patience of the model, i.e how many epochs will the model wait during training to get better Validation Performance from the best epoch.
- <pretrained_model>: Path to state dict of a model that was trained before in order to use those weights at start from training.
- --mask_images: If set we apply masking to images.
- <log_file>: Path to redirect
stdout
Then you just follow the the output tp just specify the model that you want experiments with.
WARNING: This will take time in order to complete.
While running this program you will see logs in terminal and the graphs, will be opened in browser.