/X-Ray-ConvNet

CNN for Chest X-Ray pathology detection (NIH Chest X-Ray Dataset)

Primary LanguagePythonMIT LicenseMIT

X-Ray Convolutional Neural Network

A Keras simplified implementation based on ChesXNet for pathology detection in frontal chest X-ray images which was in turn based on the original paper presented here. Learning was the main motivation for this work.

Dataset

The ChestX-ray dataset comprises 112,120 frontal-view chest X-ray with 14 disease labels, which are later simplified into 0(Normal xray) and 1(Abnormal xray - Pathology found).

Preprocessing

Preprocessing was applied before training, to reduce in-train cpu time, and images were saved to a new databse (./database_preprocessed/...).

The preprocessing consisted on:

  • Applying Contrast Limited Adaptive Histogram Equalization (CLAHE) to correct contrast(might introduce some error).
  • Resize images from 1024x1024p to 128x128p (Bigger dimensions would be preferable as most often patologies appear on a small area on the image, which might get lost or distorted upon resize. The dimensions were limited by the GPU memory).

Usage

  • Clone repository.
  • Download the ChestX-ray14 database from here.
  • Unpack archives in separate directories (e.g. images_001.tar.gz into images_001).
  • Run PreprocessData.py to create new database with processed data.
  • Run Main.py with desired Parameters.