Skip to content

Implemented a CNN in Keras, that is trained on Lung Xrays to predict whether a patient has TB or not

Notifications You must be signed in to change notification settings

amaanabbasi/XTB-keras

Repository files navigation

XTB-keras

Identyfying TB from lung X-rays using CNNs.

Screenshot from 2019-07-16 12-24-48

Dataset

Dataset is obtained from here which consisted of 2 differnet set of scans, ChinaSet and Montgomery.

Navigation

  • Notebooks: It contains the code for the training part of the model with the various parameters used in the model. This is the entry point where you can start training the model and experiment with different parameters.

  • Scripts: contains the contains .py files.

  • web-app: Contains code for the web-application, A prototype to give a overview on what the final application might look like.

Requirements

  • Python(3+)
  • keras
  • Jupyter Notebook
  • Flask(to run web-app locally, optional)
  • The web application is live at Heroku

Usage

cd Notebooks

jupyter notebook

Model Performace

Model No. Description epochs learning rate specificity sensitivity accuracy
#1 Vgg16 trained on last 10 layers 50 0.001 * * 0.79
#2 Vgg16 trained on last 5 layers 100 0.0001 0.766 0.85 0.789
#3 Vgg16 trained on all layers 100 0.0001 0 1 0.5

#2 Vgg16

VGG16(m)-accuracy-100-epochs

VGG16(m)-loss-100-epochs

Explainable Model

LIME (Local Interpretable Model-Agnostic Explainations) is method to get explaination about the model on why it is making certain decesion it's making. It will help us improve upon the model and through this we can get an idea how to proceed further and at any point of time we can rely on it for feedback and based on that we can take better decisions to get in the right direction.

Below is an image of a X-ray which is classified as positive, and the black outline tells it is the major contributing factor in the decesion by the classifier. Screenshot from 2020-03-29 13-21-19

About

Implemented a CNN in Keras, that is trained on Lung Xrays to predict whether a patient has TB or not

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published