
Explore essential course tips, locate notebooks and resources, and use q&a forums, discord, and support channels to get help while learning PyTorch for medical image analysis.
Download and install Anaconda, create and activate a PyTorch environment from a yml file, and launch Jupyter Notebook to run the course notebooks for medical image analysis.
Learn to create and manipulate numpy arrays in python: convert lists to arrays, form matrices, and use arange, zeros, ones, linspace, and broadcasting, with overview of shape and max min.
Learn to generate random numbers with numpy, using rand, randn, and rand int, set seeds for reproducibility, reshape arrays, and identify max, min, argmax, argmin, and dtype.
Explore numpy indexing and selection for one and two dimensional arrays, mastering slices, broadcasting, and conditional boolean selection, with practical notes on copies and pandas parallels.
Explore numpy's element-wise operations and broadcasting on arrays, including scalar arithmetic and array-to-array operations, division by zero warnings, and universal functions like sqrt, log, and sine.
Practice numpy basics in a notebook, importing numpy as np and creating arrays of zeros, ones, and fives, while ensuring not to overwrite example outputs, even when random values vary.
Define machine learning and show how neural networks power tasks like image classification, contrast supervised and unsupervised learning, and explain deep learning with multiple hidden layers.
Explore supervised learning with labeled data, train on training data, validate on validation data, and test on test data, evaluate performance, adjust hyperparameters, and deploy predictive models.
Explain overfitting and underfitting and how training, validation, and test errors reveal a model's generalization. Use a simple one-feature example and discuss epoch-based training when rising test error suggests stopping.
Learn to evaluate regression performance by comparing continuous predictions to true values using mean absolute error, mean squared error, and root mean squared error, noting outliers and unit interpretation.
Learn PyTorch basics, including 1D to higher-dimensional tensors, how to create them, and common operations. See how tensors support image data and relate to numpy for familiar workflows.
Explore converting numpy arrays to pytorch tensors with torch.from_numpy and torch.as_tensor, compare with torch.tensor, and understand memory links versus copies.
Create and reshape tensors in PyTorch from scratch, control dtype, and use zeros, ones, empty, arange, and linspace. Explore random initialization with rand, randn, rand_int, and achieve reproducibility with manual_seed.
Explore tensor operations in PyTorch, including indexing, slicing, view and reshape, and basic arithmetic. Cover dot products and matrix multiplication with practical Jupyter notebook examples.
Learn true matrix multiplication and dot products in PyTorch using A @ B and torch.dot, with tensor shapes. Grasp Euclidean norm and number of elements.
Practice exercises in PyTorch basics cover importing torch and numpy, setting seeds, creating tensors, reshaping, extracting right-hand column, squaring values, and computing a matrix product; solutions in the next lecture.
Master PyTorch basics by solving exercises that teach tensors, reshaping, slicing, and element-wise operations, and perform matrix multiplication with aligned shapes to prepare for neural networks.
Explore convolutional neural networks by comparing a fully connected network on the MNIST digits, then apply CNN concepts—images, kernels, and strides—and learn how to use GPUs with PyTorch.
Explore the Mnist handwritten digits dataset (0–9) with 28x28 grayscale images, flattened to 784 inputs and 10 outputs, using PyTorch vision, and compare artificial neural networks to convolutional neural networks.
Explore loading and transforming the MNIST dataset with PyTorch, convert images to tensors, and train an ANN using a batch of 100 images, and visualize the first batch with labels.
Build a multi-layer perceptron for MNIST by flattening 28 by 28 images to 784 inputs with 120 and 84 hidden neurons, using ReLU and log-softmax.
Set up and run a PyTorch training loop for an MNIST ANN, with training and evaluation, timing, and progress reporting across ten epochs to monitor losses and accuracy.
Compare training and test performance for an MNIST artificial neural network by plotting loss and accuracy, discuss overfitting across epochs, and demonstrate evaluation with no gradient and confusion matrices.
Discover how image filters or kernels transform pixels through convolution, exploring stride and padding, edge detection, and how a convolutional neural network learns weights in its convolutional layer.
Explore how convolutional layers use local connectivity and learn image filters to reduce parameters, preserve spatial structure, and process grayscale and color images.
Explore pooling layers in deep learning—max and average pooling, window and stride choices—to reduce convolutional tensor sizes and parameters, and note dropout as regularization to prevent overfitting.
Revisit mnist data for cnn by preserving 2d structure with 28 by 28 images, viewing batches as 4d tensors and using one-hot labels aligned to output neurons.
Code along a PyTorch CNN for MNIST: load data, batch size 10, implement two convolutional layers with 3x3 kernels and stride 1, and apply max pooling to deliver 10-class output.
Build a convolutional neural network for MNIST using PyTorch, defining convolutional layers, pooling, and fully connected layers, and implement a training loop with cross-entropy loss and the Adam optimizer.
Master MNIST with a convolutional neural network by evaluating training vs validation loss and accuracy, achieving about 98% on test data and exploring confusion matrices and single-image inferences.
Understand why GPUs speed up training with PyTorch, whether your hardware supports Nvidia CUDA, and how cloud options with Nvidia GPUs on AWS, Google Cloud, and Azure work.
Enable GPU acceleration by verifying CUDA availability, then move tensors and the model to the GPU, and optimize data loading with pin_memory for faster training.
Explore the fundamentals of medical imaging and its modalities: radiography, CT, MRI, ultrasound, PET, and how imaging guides diagnosis, therapy planning, and image-guided interventions, using axial, coronal, and sagittal planes.
Explore projection radiography, where x rays penetrate the body and attenuate to form detector images. Calibrate pixel distances to physical measurements and view thorax, hand, and ankle radiographs with contrasts.
Computed tomography uses rotating x-ray sources and detectors to reconstruct three-dimensional body scans, quantify absorption with hounsfield units, and compare CT to X-ray for better diagnostic confidence.
Explore the basics of magnetic resonance imaging (MRI), its non-ionizing contrast mechanisms, and T1 and T2 weighting. See how MRI uses no ionizing radiation and highlights soft-tissue imaging.
Learn to work with medical images in Python, focusing on dicom and nifti formats, 3d volumes such as mri or ct scans with pydicom, simple itk, and Mne Bible.
Explore the dicom format and its header metadata for medical images. Learn how to reassemble 2d slices into 3d volumes, anonymize data, and use tools like pydicom and 3d slicer.
Learn to handle DICOM data in Python with pydicom to read headers and pixel arrays, visualize CT images, and build 3D MRI volumes using SimpleITK.
Explore the NIfTI format, an open neuroimaging standard for storing 3D and 4D medical images with metadata, where the header holds the relevant information and the body holds pixel data.
Convert dicom to nifti to simplify handling of MRI data with nibabel. Load the nifti, inspect headers, extract image data with get_fdata, apply thresholding, visualize slices, and save processed volumes.
Explore modality-specific pre-processing, orientation, and normalization to standardize images, then learn affine transformations that map voxel coordinates to physical space.
Learn to pre-process 3D brain MRI data, load volumes with nibabel, inspect affine matrices, visualize slices in multiple orientations, and convert coordinates between voxel and physical space.
Learn how to preprocess 3d medical volumes by resizing and changing voxel size with the conform function, then apply normalization and standardization to ct and mri scans for robust analysis.
Explore pneumonia classification on x-ray images with a PyTorch pipeline: preprocess and resize, train a 1-channel, 1-output ResNet-18 with BCE loss and Adam for 30 epochs, and visualize CAM interpretability.
Preprocess the pneumonia dataset by reading labels, removing duplicates, loading dicom images, resizing to 224, converting to float16, and computing mean and std for normalization.
Train a chest x-ray pneumonia classifier by loading npy images with torchvision dataset folder, applying augmentation and normalization, and building train/validation loaders with weighted loss to address imbalance.
Create and train a pneumonia classifier in PyTorch Lightning using a modified ResNet-18, defining init, forward, training and validation steps, optimizer, loss, and metrics.
Create a checkpoint callback to save the top 10 models by validation accuracy, then train with a PyTorch Lightning trainer across 235 epochs, logging to a logs directory with TensorBoard.
Evaluate the pneumonia detection model by loading weights_three or weights_one, running in eval mode on the validation set, and reporting accuracy, precision, recall, and the confusion matrix.
Visualize image regions driving a pneumonia classifier with class activation maps, built on a ResNet-18 backbone, by deriving CAMs from the last convolutional layer and fc weights.
Train a heart bounding-box detector on chest x-rays with PyTorch, covering data preprocessing, augmentation, a ResNet-18 model, and bounding box regression with MSE loss.
Pre-process cardiac x-ray data by converting images to py files, reading dicom with pydicom, and resizing to 224. Draw bounding boxes from labels and compute train mean and std.
Build a custom PyTorch cardiac dataset that loads chest x-ray images and heart bounding boxes, applies synchronized augmentations with a PyTorch seed to align image and bbox, and normalizes data.
Evaluate the dataset to test functionality and catch bugs, applying a gamma contrast and random affine augmentations to x-ray images, and visualize bounding boxes for heart detection.
Load the cardiac detection dataset of x-ray images using torch and torchvision, apply augmentation (random contrast, affine, scaling, rotation, translation), and build train and validation data loaders for training.
Apply transfer learning with ResNet-18 for heart-detection, switch input to one channel and output to four, and train with mean squared error using Adam, visualizing bounding boxes in tensorboard.
Evaluate a cardiac detection model on x-ray images by loading a checkpoint, generating predictions, computing mean coordinate deviations for the four bounding box coordinates, and visualizing results.
Build a two-dimensional U-net to segment the left atrium in cardiac MRI. Crop to focus the heart, apply z-normalization and min-max scaling, train with Adam and dice loss.
Preprocess cardiac MRI scans for atrium segmentation by loading niftis with pathlib and NumPy, replacing images with labels, and visualizing left atrium slices as masked overlays in a video.
Crop 32 pixels from top and bottom, then normalize and standardize per subject to save normalized MRI 2D slices with corresponding masks for training and validation.
Create a dataset class to feed two-dimensional slices and segmentation masks for training, using pathlib, PyTorch, numpy, and IMG.org, with identical augmentation for slices and masks for medical image analysis.
Build and validate a cardiac dataset by defining a preprocessing root, applying a random affine and elastic augmentation pipeline, and visualizing sample slices with their segmentation masks to confirm consistency.
Learn to build a PyTorch U-Net for atrium segmentation, employing an encoder-decoder with skip connections, double conv blocks, downsampling, and upsampling to output a segmentation mask.
Train an atrium segmentation model using a dice loss with a PyTorch workflow, including train/validation datasets, augmentation pipelines, and data loaders, while logging with Tensorboard and checkpointing via PyTorch Lightning.
Build the atrium segmentation model with an Adam optimizer at 1e-4 and sigmoid output, then train and validate on cardiac MRI slices using dice loss and tensorboard logging.
Evaluate a PyTorch-based atrium segmentation model on cardiac MRI, achieving a dice score of about 0.92 on the validation set and visualizing left atrium predictions.
Did you ever want to apply Deep Neural Networks to more than MNIST, CIFAR10 or cats vs dogs?
Do you want to learn about state of the art Machine Learning frameworks while segmenting cancer in CT-images?
Then this is the right course for you!
Welcome to one of the most comprehensive courses on Deep Learning in medical imaging!
This course focuses on the application of state of the art Deep Learning architectures to various medical imaging challenges.
You will tackle several different tasks, including cancer segmentation, pneumonia classification, cardiac detection, Interpretability and many more.
The following topics are covered:
NumPy
Machine Learning Theory
Test/Train/Validation Data Splits
Model Evaluation - Regression and Classification Tasks
Tensors with PyTorch
Convolutional Neural Networks
Medical Imaging
Interpretability of a network's decision - Why does the network do what it does?
A state of the art high level pytorch library: pytorch-lightning
Tumor Segmentation
Three-dimensional data
and many more
Why choose this specific Deep Learning with PyTorch for Medical Image Analysis course ?
This course provides unique knowledge on the application of deep learning to highly complex and non-standard (medical) problems (in 2D and 3D)
All lessons include clearly summarized theory and code-along examples, so that you can understand and follow every step.
Powerful online community with our QA Forums with thousands of students and dedicated Teaching Assistants, as well as student interaction on our Discord Server.
You will learn skills and techniques that the vast majority of AI engineers do not have!
--------------
Jose, Marcel, Sergios & Tobias