-
Notifications
You must be signed in to change notification settings - Fork 765
Improve root README and 2d classification documentation #2005
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 1 commit
d5886dd
902de29
4d3e789
6899421
9c47cb0
5e21039
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,14 +17,27 @@ | |
| "\n", | ||
| "# Medical Image Classification Tutorial with the MedNIST Dataset\n", | ||
| "\n", | ||
| "In this tutorial, we introduce an end-to-end training and evaluation example based on the MedNIST dataset.\n", | ||
| "This comprehensive tutorial demonstrates how to build a complete medical image classification system using MONAI and the MedNIST dataset. You'll learn to integrate MONAI's powerful features into PyTorch workflows for medical AI applications.\n", | ||
| "\n", | ||
| "We'll go through the following steps:\n", | ||
| "* Create a dataset for training and testing\n", | ||
| "* Use MONAI transforms to pre-process data\n", | ||
| "* Use the DenseNet from MONAI for classification\n", | ||
| "* Train the model with a PyTorch program\n", | ||
| "* Evaluate on test dataset\n", | ||
| "## Tutorial Overview\n", | ||
| "\n", | ||
| "This end-to-end tutorial covers the complete machine learning pipeline for medical image classification:\n", | ||
| "\n", | ||
| "1. **Dataset Preparation**: Create training, validation, and test datasets\n", | ||
| "2. **Data Preprocessing**: Apply medical image transforms and augmentations\n", | ||
| "3. **Model Architecture**: Implement DenseNet121 for medical image classification\n", | ||
mingxin-zheng marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| "4. **Training Workflow**: Train with PyTorch using MONAI optimizations\n", | ||
mingxin-zheng marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| "5. **Model Evaluation**: Comprehensive performance assessment and visualization\n", | ||
| "6. **Advanced Features**: Occlusion sensitivity analysis for model interpretability\n", | ||
| "\n", | ||
| "## Learning Objectives\n", | ||
| "\n", | ||
| "- Understand MONAI's integration with PyTorch workflows\n", | ||
| "- Learn medical image preprocessing techniques\n", | ||
| "- Implement data augmentation strategies for medical images\n", | ||
| "- Train robust classification models for medical data\n", | ||
| "- Evaluate model performance with medical AI metrics\n", | ||
| "- Use interpretation techniques to understand model decisions\n", | ||
| "\n", | ||
| "[](https://colab.research.google.com/github/Project-MONAI/tutorials/blob/main/2d_classification/mednist_tutorial.ipynb)" | ||
| ] | ||
|
|
@@ -217,11 +230,21 @@ | |
| "cell_type": "markdown", | ||
| "metadata": {}, | ||
| "source": [ | ||
| "## Read image filenames from the dataset folders\n", | ||
| "## Explore the Dataset Structure\n", | ||
| "\n", | ||
| "Let's examine our MedNIST dataset to understand its organization and characteristics. This exploration step is crucial for understanding the data before training.\n", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is a stylistic choice of voice when describing what's being done. One way is to be neutral and not referring to personal perspectives, eg. no "us" or "you" when describing actions or observations. This could read instead "Here the dataset is explored...." to not have any 2nd or 3rd person voices used. It's a question of what we want to do and prompting the network to adhere to that. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For this particular point, we could add some guidance to CONTRIBUTING.md and use an agent to review PRs for stylistic consistency. We can also instruct the coding agent to follow these contributing guidelines directly. Either approach — or both — should help keep the voice aligned. |
||
| "\n", | ||
| "### Dataset Organization\n", | ||
| "\n", | ||
| "The MedNIST dataset contains 6 medical image categories:\n", | ||
| "- **Hand**: X-ray images of hands\n", | ||
| "- **AbdomenCT**: CT scans of the abdomen \n", | ||
| "- **CXR**: Chest X-rays\n", | ||
| "- **ChestCT**: CT scans of the chest\n", | ||
| "- **BreastMRI**: MRI images of breast tissue\n", | ||
| "- **HeadCT**: CT scans of the head\n", | ||
| "\n", | ||
| "First of all, check the dataset files and show some statistics. \n", | ||
| "There are 6 folders in the dataset: Hand, AbdomenCT, CXR, ChestCT, BreastMRI, HeadCT, \n", | ||
| "which should be used as the labels to train our classification model." | ||
| "Each folder name serves as the class label for our classification model." | ||
| ] | ||
| }, | ||
| { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel that generated text like this often gets too wordy or overclaims on occasion. I think if we have a workflow of seeing what's generated and then paring it down a bit would work though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point — I agree that a bit of guardrailing would help. We could add additional prompts to steer the generation style more tightly. For example, we could use a system prompt for OpenAI API endpoint usage, or define stricter rules for coding agents (like these cursor rules).