abrosua / xception-pneumonia

Pneumonia image classifier from X-ray images using Xception network with TensorFlow 2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pneumonia X-Ray Image Classification

This is one of the machine learning project assignment of the bangkit program by Google, an exclusive machine learning academy led by Google, in collaboration with several Indonesian unicorn startups.

In this case, we're tasked to solve one problem from any public datasets. Hence, we chose an image classification problem for chest x-ray images (normal or pneumonia). The dataset is provided by Paul Mooney on Kaggle.

Getting Started

Methodology

Convolutional Neural Networks (CNN), is currently the best solution for handling Computer Vision problem. However, harnessing its full potential might be very resourceful. Therefore we decided to use transfer learning on popular CNN architecture. The model is sorted from ImageNet's image classification leaderboard, since ImageNet is consisted of thousands of classes, thus might provides model with better generalization.

Note: To simplify the problem, we used the built-in models that are available on TensorFlow Keras, and sorted by the ImageNet leaderboard. The network assessment is reported on docs/pneumonia_classifier.xlsx.

Xception and VGG-16 network are chosen due to its performance and number of parameters. Since we're working on limited resources, "lighter" models are preferable.

To limit our scope of work, we decided to tune the optimizer hyperparameter only (e.g., learning rate, scheduler, etc) as it's the one that arguably impacts the performance the most.

Model

  1. Xception (Chollet, 2017)
  2. VGG-16 (Simonyan and Zisserman, 2015)

The chosen model is the Xception network (train02) with the following settings:

  • Adam optimizer
    • learning_rate = 5e-5
  • ReduceLROnPlateau learning rate scheduler
    • factor = 0.2
    • patience = 3
    • min_delta = 0.005
  • image_width and image_height is 299 x 299

Note: For complete training report, go check on docs/Brief report - Xception Net for Pneumonia classifier.pdf.

Built With

File Structure

  • docs--- supporting documentations
    • Training report (hyperparameter tuning record).
    • Network assessment report (TensorFlow's built-in model ranking in ImageNet current leaderboard).
    • Presentation slides.
  • input --- dataset storage
    • xception --- pretrained weights (for offline usage)
  • main --- notebooks working directory
  • output --- training results storage (e.g., trained weights, training history, etc)

Authors

About

Pneumonia image classifier from X-ray images using Xception network with TensorFlow 2

License:MIT License


Languages

Language:Jupyter Notebook 100.0%