Deep Learning workflow for computational pathology
Updated 27 Sep 2021
This repository shows an example of how to use MATLAB to manipulate very large images in the context of computational pathology (CPATH).
It is structured in two parts:
- How to handle very large images such as whole slide images (WSIs)
- How to pre- and post-process histology images.
The first part of this example shows how to read, display, explore, and organize WSIs (and their patches) in MATLAB. Thanks to the recently introduced
blockedImage object, it is now possible to handle very large images without running out of memory. A
blockedImage is an image made from discrete blocks (patches), which can be organized and managed using a
blockedImageDatastore object and displayed using
Since the goal of using deep learning techniques in CPATH is to produce solutions that are clinically translatable, i.e., capable of working across large patient populations, it is advisable to deal with some of the most likely WSI artifacts upfront, thereby increasing the abilities of the resulting model to generalize over image artifacts found in other test sets.
The second part of this example shows examples of preprocessing operations to handle commonly found artifacts in histopathology images as well as postprocessing morphological operations for improving the quality of the results at pixel level. Essentially, this example should help the medical image analysis community to create an image analysis pipeline for WSIs (and, as bonus, the ability to reproduce the code and examples described in a recent paper on this topic) using MATLAB.
It highlights the usefulness of MATLAB (and Image Processing Toolbox) functions such as:
- Image thresholding and filtering:
- Morphological image processing operations:
- Feature extraction:
- Download or clone the repository.
- Open MATLAB.
- Ensure that the files
FakePred2.jpgcontaining the test images1 for Part 2 are in the same folder as the
- Run the
cpath_matlab.mlxscript and inspect results.
- You are encouraged to expand and adapt the example to your needs.
- The image used for Part 1 is part of MATLAB.
Oge Marques (2021). Deep Learning workflow for computational pathology (https://github.com/ogemarques/cpath-matlab/releases/tag/v1.0), GitHub. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!