
Develop a deep learning model to detect pneumonia from chest X-rays using Python, TensorFlow, and Kira's libraries, and test it with static images on Google Cloud.
Discover how Google Colab powers deep learning projects by running code in Jupyter notebooks and avoiding local setup, using free tier hardware for large image data with TensorFlow and OpenCV.
Explore the project folder structure for a chest x-ray pneumonia detection project in Google Colab, including dataset, output with training plots, sample images, and utilities for dataset creation and training.
Understand the chest x-ray dataset structure, including zip download and extraction, with train, test, and validation folders for normal and pneumonia images.
Set up Google Colab for data access by creating a Google account, generating an API token, and downloading data from Google to Colab.
Set up the chest X-ray pneumonia detection project in Google Colab by mounting Google Drive, downloading the Kaggle dataset, and organizing a structured dataset for train, test, and validation.
Explore how to configure the deals package, set up a custom dataset with train/validation/test splits, shuffle images, and organize normal and pneumonia classes for model training.
Import and configure libraries for chest xray pneumonia detection, enable backend plotting, preprocess input with MobileNet, and set up model training, callbacks, and evaluation metrics.
Plot data counts for normal and pneumonia images across train and test directories using a reusable function and seaborn bar plots, highlighting dataset imbalance and the role of shuffling.
Plot pneumonia and normal chest x-ray samples to understand the dataset, extract jpg images, build a data frame, and visualize ten labeled samples for classifier development.
Create a common method to count jpeg image files in a directory by recursively traversing subfolders and returning the list length as the total file count.
Explore defining a training plot method to visualize training and validation accuracy and loss across epochs for chest x-ray pneumonia detection, including saving the plots to an output location.
Calculate class weights from the train directory to address the unbalanced normal and pneumonia classes, and apply these weights when fitting the CNN model for chest x-ray pneumonia detection.
Explore data augmentation as a data generation approach for machine learning, creating new representative images with rotation, flipping, translation, and noise to boost performance and reduce overfitting.
Explore data augmentation techniques for chest x-ray pneumonia detection with MobileNet, detailing pre process input, rotation, zoom, shifts, shear, flips, and fill mode for training data.
Leverage data generators to enable real-time data augmentation and batch loading, saving memory and streaming augmented images from CPU to IGP during training.
Implement data generators to train a two-class chest x-ray model using flow_from_directory with augmentation, for training and validation, 224x224 rgb images, shuffle enabled, and strict folder structure.
Learn how a convolutional neural network processes images with convolutional and fully connected layers, using filters to automatically extract features and apply softmax for probabilistic classification.
OpenCV, the open source computer vision library, enables image and video processing, object detection, and medical imaging analysis, guiding chest X-ray pneumonia detection and predictive modeling.
Explore pre-trained models as starting points for image classification. Use transfer learning to tailor them for a specific task by leveraging learned feature maps.
Explore MobileNetV2, a 53-layer convolutional neural network optimized for mobile and embedded vision; uses separable convolutions to deliver lightweight, low-latency models with high accuracy.
Load the MobileNetV2 classifier with ImageNet weights, excluding the top layers to customize the pretrained model. Set the input shape to 224x224x3 and store the result in base model object.
Adds a new fully connected head to the base model, using flattening, average pooling, a 128-neuron ReLU dense layer, dropout, and softmax for normal or pneumonia.
Build the final MobileNetV2 model by attaching a head model to the base model input and freezing base layers so only the head trains.
Explore essential CNN concepts such as Conv2D, filters, Relu activation, Batch Normalization, MaxPooling2, dropout, flattening, and dense layers to prepare for building a custom CNN architecture.
Build a custom CNN architecture in TensorFlow Keras for chest X-ray pneumonia detection, featuring conv layers with activation, batch normalization, max pooling, dropout, and a two-class softmax classifier.
Explore how optimizers drive deep learning training by adjusting weights to minimize loss. The lecture covers gradient descent variants, including stochastic and mini-batch, and the Adam optimizer for efficient training.
Explore the Adam optimizer, an adaptive moment estimation method using momentum with first and second order movements. It uses exponentially decaying averages of gradients to speed convergence.
Explore how binary cross entropy serves as the loss function to evaluate and optimize a model predicting pneumonia from chest x-rays, by comparing predicted probabilities to actual labels.
Apply mobile-centric model compilation for mobile networks using an Adam optimizer with learning rate decay across epochs. Compile the model with binary cross-entropy loss and accuracy, preparing MobileNetV2 for training.
Compile a custom CNN model using Adam optimizer with learning rate from config and a decay schedule, applying binary cross entropy loss for two-class pneumonia detection and tracking accuracy.
Explore how the model checkpoint callback saves training states at set frequencies, choosing between best performing or all saved models, and what to monitor to maximize or minimize performance.
This lecture demonstrates implementing a model checkpoint that saves the best performing model based on the lowest validation loss, with epoch-based naming and callbacks during model fitting.
Explore the concepts of epochs and batch size in neural network training, including how many passes the model makes over the training data and how data is divided into batches.
Fitting MobileNetV2 and a custom CNN for chest X-ray pneumonia detection using a training generator, batch size, validation steps, and class weighting with model checkpoint callbacks to save the best model.
Apply predictions on test data with MobileNetV2 and a custom CNN, using best checkpoints by validation loss and softmax probabilities to detect pneumonia versus normal.
Learn how the classification report evaluates model performance with precision, recall, F1 score (harmonic mean of precision and recall), and support, defined by true positives, false positives, and false negatives.
Generate a classification report for chest x-ray pneumonia detection using MobileNetV2 and a custom CNN, showing actual vs predicted values, 0/1 labels, and 92% accuracy.
Plot the confusion matrix for chest x-ray pneumonia predictions and derive accuracy, sensitivity, and specificity with the given formulas.
Plot training and validation accuracy and loss to monitor a CNN model during chest x-ray pneumonia detection, saving the best model around epoch 16 and interpreting signs of overfitting.
Learn how to save a trained CNN model to disk with a single line of code, and how model checkpoints save automatically for predicting on new images.
If you want to learn the process to detect whether a person is having Pneumonia using Chest XRays with the help of AI and Machine Learning algorithms then this course is for you.
In this course I will cover, how to build a model to predict whether an X-ray scan shows presence of pneumonia with very high accuracy using Deep Learning Models. This is a hands on project where I will teach you the step by step process in creating and evaluating a deep learning model using Tensorflow, CNN and OpenCV.
This course will walk you through the initial data exploration and understanding, Data Augumentation,Data Generators,customizing pretrained Models like MobileNetV2, Model Checkpoints, model building and evaluation.Then using the trained model to detect the presence of Pneumonia using Chest XRays.
I have splitted and segregated the entire course in Tasks below, for ease of understanding of what will be covered.
Task 1 : Project Overview.
Task 2 : Introduction to Google Colab.
Task 3 : Understanding the project folder structure.
Task 4 : Understanding the dataset and the folder structure.
Task 5 : Setting up the project in Google Colab_Part1
Task 6 : Setting up the project in Google Colab_Part2
Task 7 : About Config and Create_Dataset File
Task 8 : Importing the Libraries.
Task 9 : Plotting the count of data against each class in each directory
Task 10 : Plotting some samples from both the classes
Task 11 : Creating a common method to get the number of files from a directory
Task 12 : Defining a method to plot training and validation accuracy and loss
Task 13 : Calculating the class weights in train directory
Task 14 : About Data Augmentation.
Task 15 : Implementing Data Augmentation techniques.
Task 16 : About Data Generators.
Task 17 : Implementing Data Generators.
Task 18 : About Convolutional Neural Network (CNN).
Task 19 : About OpenCV.
Task 20 : Understanding pre-trained models.
Task 21 : About MobileNetV2 model.
Task 22 : Loading the MobileNetV2 classifier.
Task 23 : Building a new fully-connected (FC) head.
Task 24 : Building the final MobileNetV2 model.
Task 25 : Understanding Conv2D, Filters, Relu activation, Batch Normalization, MaxPooling2D, Dropout, Flatten, Dense
Task 26 : Building a custom CNN network architecture.
Task 27 : Role of Optimizer in Deep Learning.
Task 28 : About Adam Optimizer.
Task 29 : About binary cross entropy loss function.
Task 30 : Putting all together for MobileNetV2.
Task 31 : Putting all together for Custom CNN Model.
Task 32 : About Model Checkpoint
Task 33 : Implementing Model Checkpoint
Task 34 : About Epoch and Batch Size.
Task 35 : MobileNetV2 and Custom CNN Model Fitting.
Task 36 : Predicting on the test data using both MobileNetV2 and Custom CNN Model
Task 37 : About Classification Report.
Task 38 : Classification Report in action for both MobileNetV2 and Custom CNN Model.
Task 39 : Computing the confusion matrix and and using the same to derive the accuracy, sensitivity and specificity.
Task 40 : Plot training and validation accuracy and loss
Task 41 : Serialize/Writing the mode to disk
Task 42 : Loading the final model from drive
Task 43 : Loading an image and predicting using the model whether the person has Pneumonia.
Machine learning has a phenomenal range of applications, including in health and diagnostics. This course will explain the complete pipeline from loading data to predicting results on cloud, and it will explain how to build an X-ray image classification model from scratch to predict whether an X-ray scan shows presence of pneumonia. This is especially useful during these current times as COVID-19 is known to cause pneumonia.
Take the course now, and have a much stronger grasp of Deep learning in just a few hours!
You will receive :
1. Certificate of completion from AutomationGig.
2. The Jupyter notebook and other project files are provided at the end of the course in the resource section.
So what are you waiting for?
Grab a cup of coffee, click on the ENROLL NOW Button and start learning the most demanded skill of the 21st century. We'll see you inside the course!
Happy Learning !!
[Please note that this course and its related contents are for educational purpose only]
[Music : bensound]