CUIEMCovidProject / COVID-19-Detection-Using-Ensemble-Learning

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

COVID-19-Detection-Using-Ensemble-Learning

This repository contains all the necessary scripts used for data preparation, model training and building the GUI App.


Dependencies:

  • Tensorflow 2.2.0
  • numpy
  • opencv
  • PyQt5
  • scikit-learn

Link to our npy files


Repository Structure:

The repository has four directories:

  • DataPreparation Script : Contains CreateNPY_Files.py script for making npy arrays out of the images

  • Model Training Script :

    1. Model.py : Contains function for model preparation
    2. Ensembling.py : Contains functions for ensembling and function for measuring the performance of the ensembler
    3. TrainModel.py : Script for training the models
    4. Performance : Script for getting the performance metrics

  • GUI Application : This directory contains Desktop Application made using Qt which uses the trained models and ensembling for COVID-19 detection.

    GUI APP

    1. SavedModels : Contains the trained models
    2. app.py : Main Python application
    3. utils.py : Contains utility functions that is used by the application.
  • K-Fold Cross validation : Contains the notebook for performing 5-fold cross validation & scripts to get the performance metrics like Accuracy, Sensitivity, Specificity, F1-Score & AUC


Steps to prepare data:

1. The Image data are kept into separate directories as COVID_19 +ve and COVID_19 -ve.
2. These images are split into separate diretories as train and test

Thus the directory structure is as:

Images
    |
    ----Train
    |       |
    |       ---- COVID_19 +ve
    |       |
    |       ---- COVID_19 -ve
    |
    -----Test
            |
            ---- COVID_19 +ve
            |
            ---- COVID_19 -ve
    
3. Then run the CreateNPY_Files.py script and the enter the paths according to the prompt.

Steps to train the model:

1. Run the TrainModel.py script and the enter the paths.
2. The models will be saved in the directory.

Check the performance of the ensembling:

1. Run Performance.py to get the performance of the ensembler and enter the paths.    
2. And the accuracy, confusion matrix will be printed in the console

Run the GUI Application

1. Run the app.py script

About


Languages

Language:Jupyter Notebook 99.1%Language:Python 0.9%