Introduction to MONAI

01 What is the MONAI Framework
MONAI is an open-source AI framework launched by NVIDIA and King’s College London in 2020. It is a free, community-supported, PyTorch-based framework for deep learning in medical imaging. MONAI enables AI development in medical imaging through industry-specific data processing, high-performance training workflows, and advanced reproducible reference implementations. MONAI is committed to:
- 1. Developing a community for collaboration among academia, industry, and clinical researchers.
- 2. Creating state-of-the-art end-to-end workflows for medical imaging.
- 3. Providing optimized and standardized methods for researchers to create and evaluate deep learning models.
MONAI is currently the most starred and forked open-source project for medical imaging deep learning on GitHub, with over 1.5 million downloads.
02 The Power of MONAI
The MONAI framework makes it more efficient and convenient to handle medical imaging problems by providing a rich set of predefined methods, models, and evaluation metrics, as well as supporting distributed training and GPU acceleration.
- Data Processing and Transformation: MONAI offers a series of predefined data processing and transformation methods that simplify and enhance the handling of medical image data. For example, predefined methods can be used for image enhancement, denoising, cropping, scaling, and rotation, while also supporting custom data transformation methods. These methods can be easily applied to datasets and seamlessly integrated with PyTorch’s DataLoader.
- Model Library: MONAI provides a set of classic deep learning models suitable for medical image segmentation, classification, and generation tasks. These models are widely used in the medical imaging field and have been validated for direct use in building benchmark models or conducting rapid iterative experiments. Additionally, MONAI supports the construction of custom models to meet specific task requirements.
- Evaluation Metrics: MONAI offers a range of commonly used evaluation metrics for assessing model performance in medical imaging tasks. These metrics include the Dice coefficient, cross-entropy loss, mean absolute error, etc., helping users better understand model performance and facilitate model selection and comparison.
- Distributed Training: MONAI supports distributed training, allowing models to be trained in parallel across multiple GPUs or compute nodes. Utilizing PyTorch’s distributed training capabilities enables more efficient training on large datasets and complex tasks, improving training speed and model performance.
- GPU Acceleration: Given that medical image processing often requires substantial computational resources, the MONAI framework fully leverages the advantages of GPU acceleration. By offloading computation to GPUs and using operations optimized specifically for GPUs, training and inference speeds can be significantly enhanced.
MONAI Project Official Website: https://monai.io/
GitHub Address: https://github.com/Project-MONAI
Course Objectives (Flexible Fatty)
I first encountered the MONAI framework in 2021 due to my research needs. At that time, MONAI was newly developed, and there were few tutorials available abroad. As its ecosystem continues to improve, especially with NVIDIA hosting MONAI Bootcamp events abroad every year, the MONAI ecosystem is continually evolving. MONAI has highly packaged deep learning content, optimized for medical personnel who are not programming specialists, making it ready to use out of the box and greatly simplifying the difficulty of writing code. Many domestic institutions have packaged MONAI into software for sale or teaching, which can further reduce learning costs but also leads to corresponding issues. I believe the necessity of learning MONAI is as follows:
- The field of deep learning is advancing rapidly, and no company can keep up with updates to MONAI in a timely manner.
- Some companies have packaged MONAI, preventing further debugging, especially making it impossible to learn and use according to the official tutorials, which increases the learning costs compared to the original MONAI. Moreover, the technology remains in the hands of the company, leaving clinical researchers without autonomy.
- Any pre-trained model may not generalize well to specific data; MONAI label supports applying pre-trained models to fine-tune on one’s own dataset, greatly accelerating the data labeling process.
- The MONAI library has predefined nearly all mainstream medical datasets and commonly used deep learning pre-trained models, allowing for direct loading. This significantly reduces the amount of coding required.
- From data labeling, model training, model interpretation to deployment, MONAI provides a complete set of solutions suitable for publication in top journals.
- Mastering MONAI allows one to stay at the forefront of current medical engineering deep learning and enables communication with international peers.
- Currently, most courses are short-term training. For content that involves deep learning, medical imaging, and programming, most doctors cannot master it in a short time. There are currently no long-term marathon classes for zero-based training.
- There are currently no training classes initiated by clinical doctors and engineering teachers (AI engineers) together. Considering the special nature of medical engineering integration, deep communication and collaboration between both parties are necessary to successfully carry out corresponding projects and publish top journal articles.
Instructors
1. Huawei Cloud Computing Department: Teacher Li
Previously worked long-term in Huawei’s Artificial Intelligence EI department, participating in the development of Huawei’s deep learning platform ModelArts, independently responsible for developing APIs that support PyTorch and optimizing algorithms. Adhering to the design principles and API specifications of the PyTorch framework, ensuring the stability and usability of interfaces.
Research Experience
- AI analysis of medical image analysis and depression diagnosis, USA (remote collaboration)
- This project was consulted by Naibo Zhang, a PhD candidate from the University of Maryland, USA.
- Utilized the PageRank algorithm to extract brain feature information and applied KVM, decision trees, support vector machines, and weighted norm algorithms for depression diagnosis.
- Used Generative Adversarial Networks (GAN) to augment the dataset, overcoming sample size limitations, achieving a model accuracy of 99%.
Deep Learning Model Practice:
- Designed an innovative model based on PMRID UNet during the watermark removal model competition on Baidu Cloud, which can achieve pixel-level regression prediction of watermark images solely by adjusting the depth parameters of the inverse bottleneck and using separable convolution operations, along with a multi-stage training strategy, significantly enhancing model performance and effectiveness, ultimately leading the team to win third place.
- During the document super-resolution competition on Baidu Cloud, improved the SwinIR model under Baidu’s Paddle deep learning framework, designing different parameters for different training stages to achieve the fastest speed for both shallow and deep feature extraction, ultimately using GPU for image training and output, earning an excellent award.
- Participated in CVPR 2023 1st foundation model challenge-Track2, using masked data modeling methods, improved the image encoder in the Baseline using the BEiT-3 pre-trained model, enhancing the matching ability between images and text. This self-created model also utilized the RTMDet object detection algorithm, training cars and people separately, optimizing their features, and removing irrelevant background, ultimately improving the model’s cross-modal matching accuracy, achieving a top 5% score.
- Deployed the Vicuina model on the AI studio cloud server and independently wrote the Gradio web server page, training my dataset to achieve responses in both Chinese and English.
2. Flexible Fatty
PhD in Oncology from a Double First-Class University, currently employed at one of the five major cancer centers in China. Research directions include real-world studies, bioinformatics analysis, and artificial intelligence research. Currently published over 10 SCI papers as the first or co-first author, with a cumulative IF of over 50. Currently collaborating with multiple domestic universities and hospitals on research.
Course Directory and Schedule
Part One: Python Environment Setup, Basic Syntax, and Common Library Applications
- 1. Explanation of conda and basic Linux syntax, as well as Python environment setup, package, and environment management.
- 2. Basic Python syntax.
- 3. Python data structures (concepts and functions of arrays, dictionaries, tuples, sets), object-oriented thinking, class inheritance, closures, and other important ideas.
- 4. Learning and using important libraries, what scenarios to use them in? (pandas, numpy, matplotlib)
- 5. Data processing and analysis using the pandas library: data reading, cleaning, transformation, merging, grouping, and aggregation.
- 6. Numerical computing and array manipulation using the numpy library: array creation, indexing, slicing, operations, and statistics.
- 7. Basic usage of the Matplotlib library and common SCl chart plotting.
Part Two: Python Machine Learning and Survival Analysis (each library includes data preparation, feature engineering, model training, and evaluation)
- 1. Basic concepts and algorithms of machine learning (including applications of supervised and unsupervised learning methods).
- 2. Methods for feature selection.
- 3. Commonly used machine learning models.
- 4. Basic introduction to survival analysis principles.
- 5. Detailed usage of the king of Python machine learning – sklearn library (https://scikit-learn.org/stable/index.html).
- 6. Low-code version of the latest machine learning algorithms – detailed usage of the PyCaret library (https://pycaret.org/).
- 7. Implementation of conventional survival analysis methodology – detailed usage of the lifelines library (https://lifelines.readthedocs.io/en/latest/).
- 8. Comprehensive implementation of survival analysis algorithms based on machine learning/deep learning – detailed usage of the Pycox package (https://github.com/havakv/pycox).
Part Three: Building the Overall Process of Traditional Radiomics (based on pyradiomics)
- Overview of radiomics and detailed explanation of high-quality articles.
- ROI drawing based on 3D slicer (conventional methods).
- Feature extraction based on pyradiomics.
- Preprocessing and normalization of imaging data.
- Feature extraction and selection.
- Building and evaluating radiomics models.
- Visualization using the seaborn library and its application in traditional radiomics.
Part Four: Basics of Deep Learning and PyTorch
- Basic concepts of deep learning and introduction to commonly used models (CNN/RNN/Transformer/registration).
- Introduction to the PyTorch deep learning framework and basic principles.
- torchvision section: data reading, data augmentation, how to build a dataset?
- What is convolution? Principles and understanding of feature extraction.
- Loss functions, gradient computation, and optimization methods.
- Building networks: how to achieve model construction and training in one stop.
- Visualization tools: how to implement training visualization monitoring?
- Model tuning and performance optimization techniques – how to select hyperparameters, model pruning and compression, how to accelerate training, etc.
Part Five: Overall Framework of MONAI and MONAI Label
- Overview of MONAI and introduction to process modules.
- Detailed introduction and basic functional characteristics of MonaiLabel.
- Installing and configuring the MonaiLabel environment with 3D slicer, how to configure and install locally and on the server.
- Official case demonstration of automatic labeling segmentation using MonaiLabel (abdominal/chest).
- Labeling custom datasets using MonaiLabel.
- Custom models for automatic labeling and segmentation.
Part Six: MONAI CORE (Training and Evaluating Deep Learning Models Using MONAI)
- Introduction and advanced topics of MONAI core.
- Practical medical image processing and analysis cases based on MONAI solutions.
- Designing, building, training, and optimizing models.
- Case studies and learning on 2D medical image classification, segmentation, and prediction applications: for example, lung CT image classification and tumor segmentation tasks.
- Case studies and learning on 3D medical image classification, segmentation, and prediction applications: application analysis of MRI images.
- Basics of image registration and registration processes based on MONAI.
Part Seven: Interpretability of Machine Learning/Deep Learning Models
- Common methods and techniques for explaining machine learning models (interpretation of structured data).
- Local explanation methods, such as LIME and SHAP implementation and result interpretation.
- Global explanation methods, such as feature importance graphs and model explanation graphs implementation and result interpretation.
- Common deep learning model explanation and visualization schemes (unstructured data).
- Implementation of deep learning model explanation and visualization schemes (GradCAM/Occlusion sensitivity).
Part Eight: Building and Validating Predictive Models Based on Deep Learning Multi-modal Data
- Overview and methodological summary of multi-modal fusion.
- Characteristics and challenges of multi-modal data.
- Significance and advantages of multi-modal data fusion.
- Basic methods and strategies for multi-modal data fusion.
- Practical integration of deep learning models with traditional radiomics (integration of structured data and deep learning models).
- Introduction and practice of early fusion methodology.
- Introduction and practice of mid-fusion methodology.
- Introduction and practice of late fusion methodology.
Teaching Format and Schedule
Teaching Format: Remote online live teaching.
Teaching Time: The course starts in early March 2023, with a total of no less than 40 hours of instruction, with 5-8 hours of teaching utilizing weekend rest time each week, expected to complete all teaching content in 8-10 weeks.
Q&A Support: Establish a dedicated WeChat group for the course, free Q&A support for course content within one year.
Video Replay: Free unlimited replays within one year.
Course Pricing and After-sales Guarantee
Each chapter is priced at 800 yuan, with a discount price of 6000 yuan for all 8 chapters. Students can purchase by chapter as needed.
Please contact the assistant in advance for procedures for public transfers and other payments.
Organizing Company: Tianqi Zhuli (Tianjin) Productivity Promotion Co., Ltd.
After-sales Guarantee: Students who purchase all 8 chapters can get a full refund unconditionally within 2 weeks of the official start of the course.
Incentive Policy: Students who publish SCI articles with an IF of 10 or above using the learned content can have their tuition refunded (specific requirements and processes need to be consulted with the assistant).
Registration Consultation
Contact my assistant for consultation.
