Skip to content

Commit

Permalink
Update SpleenSeg_Pretrained-4_27.ipynb
Browse files Browse the repository at this point in the history
fixed formatting by removing h4 format
  • Loading branch information
zbyosufzai authored Mar 8, 2024
1 parent e2f7d4b commit 7284fbf
Showing 1 changed file with 23 additions and 29 deletions.
52 changes: 23 additions & 29 deletions notebooks/SpleenLiverSegmentation/SpleenSeg_Pretrained-4_27.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"id": "f59ba435",
"metadata": {},
"source": [
"##### Uncomment below to install all dependencies"
"Uncomment below to install all dependencies."
]
},
{
Expand Down Expand Up @@ -156,7 +156,7 @@
"id": "6f523cbf",
"metadata": {},
"source": [
"#### Running a pretrained model"
"### Running a pretrained model"
]
},
{
Expand All @@ -174,7 +174,7 @@
"id": "e9f3e5f3",
"metadata": {},
"source": [
"#### Create the directory for storing data"
"Create the directory for storing data"
]
},
{
Expand All @@ -194,7 +194,7 @@
"id": "38463a18",
"metadata": {},
"source": [
"#### Download the public dataset"
"### Download the public dataset"
]
},
{
Expand All @@ -217,7 +217,7 @@
"id": "fae7c51b",
"metadata": {},
"source": [
"#### Create Date Dictionaries and separate files from training and validation"
"### Create Date Dictionaries and separate files from training and validation"
]
},
{
Expand All @@ -243,7 +243,7 @@
"id": "974fc5aa",
"metadata": {},
"source": [
"#### Define your transformations for training and validation"
"### Define your transformations for training and validation"
]
},
{
Expand Down Expand Up @@ -327,7 +327,7 @@
"id": "ba3c7695",
"metadata": {},
"source": [
"#### Visualize Image and Label (example)"
"### Visualize Image and Label (example)"
]
},
{
Expand Down Expand Up @@ -358,9 +358,9 @@
"id": "f45ba707",
"metadata": {},
"source": [
"#### Use a dataloader to load files\n",
" - Ability to use LMDB (Lightning Memory-Mapped Database)\n",
" - Here is where transforms take place and they happen on both images and labels"
"### Use a dataloader to load files\n",
"Ability to use LMDB (Lightning Memory-Mapped Database)\n",
" - Here is where transforms take place and they happen on both images and labels"
]
},
{
Expand Down Expand Up @@ -400,7 +400,7 @@
"id": "a77e7856",
"metadata": {},
"source": [
"#### Now we want to download the pretrained model from NVIDIA"
"### Download the pretrained model from NVIDIA"
]
},
{
Expand Down Expand Up @@ -476,8 +476,7 @@
"id": "39910557",
"metadata": {},
"source": [
"### This will be our test file we will view for reference\n",
" - Here we see how our initial model appears to perform"
"This will be our test file we will view for reference. Here we see how our initial model appears to perform."
]
},
{
Expand All @@ -496,7 +495,7 @@
"id": "2544a774",
"metadata": {},
"source": [
"#### We use a sliding window technique to search the image"
"We use a sliding window technique to search the image."
]
},
{
Expand Down Expand Up @@ -566,8 +565,7 @@
"id": "2f60e5b5",
"metadata": {},
"source": [
"#### Using just the pretrained model, it appears we are performing pretty well\n",
" - We can now continue to train with our data using the NVIDIA models initial weights"
"Using just the pretrained model, it appears we are performing pretty well! We can now continue to train with our data using the NVIDIA models initial weights"
]
},
{
Expand All @@ -576,8 +574,7 @@
"metadata": {},
"source": [
"## Training\n",
"#### Without a GPU, training can take a while\n",
"#### Recommend skipping next three cells and load in model"
" Without a GPU, training can take a while, we recommend skipping next three cells and load in model.",
]
},
{
Expand Down Expand Up @@ -700,7 +697,7 @@
"id": "4ff0035d",
"metadata": {},
"source": [
"#### The model shows that it has improved fairly quickly over just 25 epochs"
"The model shows that it has improved fairly quickly over just 25 epochs."
]
},
{
Expand All @@ -709,7 +706,7 @@
"metadata": {},
"source": [
"## Inference\n",
"#### Without GPU skip to here to load previously trained best model (without a gpu the training will take a while)"
"Without GPU skip to here to load previously trained best model (without a gpu the training will take a while)."
]
},
{
Expand All @@ -727,7 +724,7 @@
"id": "fab5b4b9",
"metadata": {},
"source": [
"#### With the model loaded let's see if much has changed for our example image"
"With the model loaded let's see if much has changed for our example image."
]
},
{
Expand Down Expand Up @@ -798,15 +795,15 @@
"id": "6606bce2",
"metadata": {},
"source": [
"#### We see not much has changed, which is a good sign for how well the NVIDIA model performs out of the box."
"We see not much has changed, which is a good sign for how well the NVIDIA model performs out of the box."
]
},
{
"cell_type": "markdown",
"id": "5cfd20c6",
"metadata": {},
"source": [
"#### Here is the final image of our Spleen"
"Here is the final image of our Spleen!"
]
},
{
Expand All @@ -827,7 +824,7 @@
"id": "6030d210",
"metadata": {},
"source": [
"#### Feel free to play around in this notebook or download it and use it where a GPU is accessible"
"Feel free to play around in this notebook or download it and use it where a GPU is accessible."
]
},
{
Expand All @@ -836,8 +833,7 @@
"metadata": {},
"source": [
"## Additional Exercise: Use liver segmentation in addition to spleen\n",
" - Just need to load liver segmentation from NVIDIA\n",
" - While we can't train this model, since we don't have training data, we can use it as a rough estimate"
"Her we are loading in liver segmentation from NVIDIA. While we can't train this model, since we don't have training data, we can use it as a rough estimate."
]
},
{
Expand Down Expand Up @@ -973,9 +969,7 @@
"id": "af1169b6",
"metadata": {},
"source": [
"#### Continue including more models found at the NGC Catalog: \n",
"#### https://catalog.ngc.nvidia.com/models\n",
"##### - Recommend filtering by 'CT' "
"Continue including more models found at the NGC Catalog: https://catalog.ngc.nvidia.com/models. We recommend filtering by 'CT'.",
]
},
{
Expand Down

0 comments on commit 7284fbf

Please sign in to comment.