Skip to content

Open Source project to help predict Tuberculosis from chest X-Rays.

License

Notifications You must be signed in to change notification settings

jomollin/TuberculosisNet

 
 

Repository files navigation

Tuberculosis-Net (TB-Net)

TuberculosisNet Logo

Note: The TB-Net model provided here is intended to be used as a reference model that can be built upon and enhanced as new data becomes available. It is currently at a research stage and not yet intended as a production-ready model (not meant for direct clinical diagnosis). We are working continuously to improve it as new data becomes available. Please do not use TB-Net for self-diagnosis; seek help from your local health authorities.

root cause analysis of a tuberculosis sample image
Example chest x-ray images from 3 different patients, and their associated critical factors (highlighted in white) as identified by GSInquire. In this example, all three lungs have been diagnosed with tuberculosis.

Tuberculosis (TB) remains a global health problem, and is the leading cause of death from an infectious disease. A crucial step in the treatment of tuberculosis is screening high risk populations and the early detection of the disease, with chest x-ray (CXR) imaging being the most widely-used imaging modality. As such, there has been significant recent interest in artificial intelligence-based TB screening solutions for use in resource-limited scenarios where there is a lack of trained healthcare workers with expertise in CXR interpretation. Motivated by this pressing need, we introduce TB-Net, a self-attention deep convolutional neural network tailored for TB case screening. More specifically, we leveraged machine-driven design exploration to build a highly customized deep neural network architecture with attention condensers. We conducted an explainability-driven performance validation process to validate TB-Net's decision-making behaviour. Experiments using the Tuberculosis Chest X-Ray benchmark dataset showed that the proposed TB-Net is able to achieve accuracy/sensitivity/specificity of 99.86%/100.0%/99.71%. Radiologist validation was conducted on select cases by two board-certified radiologists with over 10 and 19 years of experience, respectively, and showed consistency between radiologist interpretation and critical factors leveraged by TB-Net for TB case detection. While not a production-ready solution, We hope that the release of TB-Net will support researchers, clinicians, and citizen data scientists in advancing this field.

The World Health Organization (WHO) recently introduced a new recommendation that, for those aged 15 years and older in populations in which TB screening is recommended, computer-aided detection (CAD) approaches may be used in place of human readers for interpreting digital chest X-rays for screening and triaging TB. https://apps.who.int/iris/bitstream/handle/10665/340255/9789240022676-eng.pdf

For a more detailed description of the methodology behind TB-Net, please click here.

If there are any technical questions after the README, FAQ, and past/current issues have been read, please post an issue or contact:

If you find our work useful, you can cite our paper using:

@misc{wong2021tbnet,
      title={TB-Net: A Tailored, Self-Attention Deep Convolutional Neural Network Design for Detection of Tuberculosis Cases from Chest X-ray Images}, 
      author={Alexander Wong and James Ren Hou Lee and Hadi Rahmat-Khah and Ali Sabri and Amer Alaref},
      year={2021},
      eprint={2104.03165},
      archivePrefix={arXiv},
      primaryClass={eess.IV}
}

Table of Contents

  1. Requirements to install on your system
  2. Dataset recreation
  3. Steps for training, evaluation and inference of TB-Net
  4. Results
  5. Links to pretrained models

Requirements

The main requirements are listed below. A full list can be found in "requirements.txt".

  • Tested with Tensorflow 1.15
  • OpenCV 4.5.1
  • Python 3.6
  • Numpy 1.19.5
  • Scikit-Learn 0.24.1

For OpenCV, you may need to install some system dependencies: apt-get install -y --no-install-recommends libgl1-mesa-glx libglib2.0-0

Python packages can be installed with: python3 -m pip install -r requirements.txt

Dataset Recreation

To recreate the dataset that we used for our experiments, follow these steps:

  1. Download the original dataset here.
  2. Extract the files.
  3. Run the create_dataset.py script, making sure to point the 'datapath' argument at the root directory containing the extracted files. This script will perform pre-processing on all the images, converting them into the format we used.
  4. Wait for the processing to complete.

Results

These are the final results for TB-Net on the test dataset. The test dataset contains 348 normal samples and 345 tuberculosis samples.

TB-Net Details
Accuracy Sensitivity Specificity # Params (M) MACs (G)
99.86 100.0 99.71 4.24 0.42

About

Open Source project to help predict Tuberculosis from chest X-Rays.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%