
Build and deploy a CNN-based medical diagnosis model from scratch for remote, web-based access. Explore practical techniques in computer vision, deep learning, and pattern recognition for medical image diagnosis.
Explore the diagnosis problem and assemble training, validation, and testing data for a cnn-based image diagnosis model while learning cnn architecture, loss, gradient descent, metrics, visualization, and deployment with Flask.
Get and prepare chest x-ray data for a from-scratch CNN that automatically diagnoses normal vs abnormal images, using Kaggle data organized into training, validation, and testing sets with balanced samples.
Explore the CNN architecture, contrasting end-to-end deep learning with traditional hand-crafted features, and learn how convolution, ReLU, and max-pooling extract features for medical image diagnosis.
Explore the convolutional operation in CNNs by applying 3x3 filters with zero padding to a 6x6 input. Learn how to implement this in Python with a 32-filter convolutional layer.
Apply the ReLU activation to the convolution output, turning negatives to zero and keeping positives, with a Python implementation and placement as a new layer before max-pooling.
Learn how max-pooling follows ReLU, reduces data by applying a 2-by-2 window and taking the maximum from each region, and how to implement this layer in Python.
Explore how the flattening operation converts 2-D CNN outputs into 1-D for subsequent layers, after convolution, ReLU, and max-pooling, with a Python example of adding a flattening layer.
Explore the fully connected layer after the flattening step in CNNs, where inputs connect to neurons through weights and bias, and ReLU activation is applied.
Demonstrates the softmax classifier as the CNN's last layer, using two fully connected neurons for normal and abnormal classes, computing probabilities from inputs, weights, and biases.
Master data normalization before training a CNN for medical image diagnosis. Normalize grayscale pixel values by scaling to 0-1, shifting to zero mean, and standardizing to unit variance using Keras.
Learn how cross entropy loss function guides CNN training for medical image diagnosis by computing error from predicted class probabilities against true labels.
Explore backpropagation for training cnn in medical images diagnosis by updating randomly initialized weights and biases through gradient descent to minimize cross entropy loss using the chain rule.
Implement python cnn training for chest x-ray classification, organize data into training and validation sets, build a 3-block cnn with 32–64–128 filters, train with sgd and cross-entropy, and save model.
Evaluate a CNN in medical image diagnosis with a 2x2 confusion matrix, compute true positives, false positives, false negatives, true negatives, and metrics like accuracy, precision, recall, and F1 score.
Demonstrate how to evaluate a CNN on medical images using a ROC curve, compute true positive rate and false positive rate across thresholds, and compare area under the curve.
Explore a python implementation of cnn evaluations for medical image diagnosis, including reloading the trained model, preparing testing data, and computing accuracy, precision, recall, f1, roc, and two-class confusion matrix.
Explore convolutional neural network hyper-parameters tuning by comparing architectures with different filter counts and sizes, and observe how deeper yet thinner designs can outperform originals in AUC and recall.
Compare the Adam optimizer with gradient descent for CNNs, detailing per-parameter learning rates and beta-based updates. Observe fast training but overfitting and a test ROC AUC of 0.84.
Explore how data augmentation using rotation, shifting, zooming, and brightness via the image data generator improves CNN performance, reduces overfitting, and raises ROC AUC to 0.91 in medical image diagnosis.
Explore dropout regularization in a CNN, including inactive nodes and a dropout layer with 0.2 probability, and observe that testing shows no performance gains (AUC 0.9).
Explore batch normalization, which re-centers and re-scales activations in CNNs and can be added after activation. However, the results show no improvement in performance for medical image diagnosis.
Replace the ReLU with LeakyReLU in a CNN to address zero gradients, improving performance on medical image diagnosis and achieving a roc area of 0.92.
Explains early stopping in cnn training by monitoring validation accuracy and halting if there is no improvement for 10 epochs, reducing training to 30 epochs while preserving testing accuracy.
Apply transfer learning with a pre-trained VGG19 from Oxford. Fine-tune 11 layers, flatten, add two 4096-neuron fully connected layers, and use a softmax classifier with an optimizer.
Explore transfer learning with the Microsoft ResNet network, highlighting deep residual architecture with branches and shortcuts, replaced fully connected layers by average pooling. Results show limited gains versus transfer VGG.
Learn transfer learning with the Google Inception network for medical image diagnosis, comparing Inception v3 and v4, and replacing the classification layer with an average pooling classifier.
Explore how to visualize intermediate CNN activations for medical image diagnosis by building an activation model from the first 10 layers and displaying layer outputs.
To deploy your trained CNN model perform the following steps:
1- Move run_server.py into your current working folder.
2- Move the trained medical_diagnosis_cnn_model.h5 model into your current working folder.
3- Create new folder inside your current working folder and name it templates.
4- Move index.html file into templates folder.
This course was designed and prepared to be a practical CNN-based medical diagnosis application. It focuses on understanding by examples how CNN layers are working, how to train and evaluate CNN, how to improve CNN performances, how to visualize CNN layers, and how to deploy the final trained CNN model.
All the development tools and materials required for this course are FREE. Besides that, all implemented Python codes are attached with this course.