Skip to content

Commit

Permalink
update structure
Browse files Browse the repository at this point in the history
  • Loading branch information
ncullen93 committed May 29, 2024
1 parent 14bc999 commit 078ceaf
Show file tree
Hide file tree
Showing 12 changed files with 59 additions and 14 deletions.
2 changes: 1 addition & 1 deletion book/01-01.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"# 1. Introduction\n",
"\n",
":::{warning}\n",
"You are viewing a working draft with expected completion in early 2025.\n",
"This chapter is an unfinished draft. I recommend skipping it for now since it is likely to change.\n",
":::\n",
"\n",
"This section will teach you how to handle individual medical images in Python. Your life as a medical imaging AI expert will be so much easier if you have a good grasp on a library that lets you handle medical images. That primarily entails reading and writing medical imaging files. \n",
Expand Down
2 changes: 1 addition & 1 deletion book/01-02.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"# 2. Reading and writing\n",
"\n",
":::{warning}\n",
"This chapter is still an unfinished draft. I recommend skipping it for now.\n",
"This chapter is an unfinished draft. I recommend skipping it for now since it is likely to change.\n",
":::\n",
"\n",
"As mentioned in the previous chapter, there are multiple libraries for reading and writing medical images. We will use ants because it is fast and allows for seamless interaction with numpy and tensor libraries like pytorch. \n",
Expand Down
2 changes: 1 addition & 1 deletion book/01-03.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"# 3. Image operations\n",
"\n",
":::{warning}\n",
"This chapter is an unfinished draft. I recommend skipping it for now as it is likely to change.\n",
"This chapter is an unfinished draft. I recommend skipping it for now since it is likely to change.\n",
":::\n",
"\n",
"Image operations are functions unique to medical imaging without a similar counterpart in numpy. Such functions exist because medical images (and images in general) have a more meaningful and structured interpretation compared to normal arrays. In this chapter, we will first give you an introduction of the basic preprocessing steps you may need to get your images into a \"trainable\" form. Then, we will go over many of the image operations that you can perform with ants. \n",
Expand Down
2 changes: 1 addition & 1 deletion book/01-04.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"# 4. Visualization\n",
"\n",
":::{warning}\n",
"This chapter is an unfinished draft. I recommend skipping it for now as it is likely to change.\n",
"This chapter is an unfinished draft. I recommend skipping it for now since it is likely to change.\n",
":::\n",
"\n",
"Being able to view medical images is a vital skill when training medical imaging AI models. There is a lot that can go wrong if you don't have a good way to visualize your images: the images could be misaligned, you could be training on blank data, and so on. Viualization is also important for checking whether your model is producing accurate predictions.\n",
Expand Down
5 changes: 3 additions & 2 deletions book/02-01.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@
"This section proceeds as follows:\n",
"\n",
"- In [Using datasets](book.nitrain.dev/02-02), you'll learn about using the powerful Dataset class in nitrain to flexibly map collections of images.\n",
"- In [Using readers](book.nitrain.dev/02-03), you'll be introduced to readers which let you actually read in data from various sources.\n",
"- In [Cloud storage](book.nitrain.dev/02-04), you'll understand what to do when your dataset is not stored locally.\n",
"- In [Applying fixed transforms](book.nitrain.dev/02-05), you'll learn how to applying nitrain transforms to preprocess your data before being returned from your nitrain dataset."
"- In [Applying fixed transforms](book.nitrain.dev/02-05), you'll learn how to applying nitrain transforms to preprocess your data before being returned from your nitrain dataset.\n",
"\n",
"Learning to easily map datasets is a valuable skill that can save you a ton of time having to rearrange, rename, and move data to get it in a specific format."
]
}
],
Expand Down
4 changes: 4 additions & 0 deletions book/02-02.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
"source": [
"# 6. Using datasets\n",
"\n",
":::{warning}\n",
"This chapter is an unfinished draft. I recommend skipping it for now since it is likely to change.\n",
":::\n",
"\n",
"The `nitrain.Dataset` class provides everything you need to map collections of images and related meta-data. This chapter introduces the basic functionality and structure of the class so you can get going. Once you learn the basics, it will be intuitive to expand on it with additional things you'll learn later."
]
},
Expand Down
6 changes: 5 additions & 1 deletion book/02-03.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# 7. Cloud storage"
"# 7. Cloud storage\n",
"\n",
":::{warning}\n",
"This chapter is an unfinished draft. I recommend skipping it for now since it is likely to change.\n",
":::"
]
},
{
Expand Down
6 changes: 5 additions & 1 deletion book/02-04.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# 8. Fixed transforms"
"# 8. Fixed transforms\n",
"\n",
":::{warning}\n",
"This chapter is an unfinished draft. I recommend skipping it for now since it is likely to change.\n",
":::"
]
},
{
Expand Down
10 changes: 6 additions & 4 deletions book/03-01.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,17 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# 9. Using loaders\n",
"# 9. Introduction\n",
"\n",
"In the last section, you learned about how to map entire datasets of medical images and related meta-data from data stored in memory, locally in folders, or in the cloud. You also saw how to attached a wide variety nitrain transforms to pre-process your images every time they're returned from your dataset. The nitrain dataset paradigm will be useful to you even beyond traditional AI tasks.\n",
"\n",
"In this section, we will move to generating processed batches of images and related data that can actually be used to train AI models. Batches require combining data together into structures such as numpy arrays or torch tensors. One training epoch is completed when you loop over all the batches in your dataset. \n",
"In this section, you'll learn about the following:\n",
"\n",
"Generating batches is where you will apply random transforms to artificially augment your dataset. Because medical images have a quite rigid structure, we can do things such as rotate them or alter the intensity to generate \"new\" images that will increase the robustness of the AI model. \n",
"- In [Using loaders](book.nitrain.dev/03-02), you'll learn about uing the `nitrain.Loader` class to generate basic batches of images and meta-data based on your `nitrain.Dataset` class.\n",
"- In [Using samplers](book.nitrain.dev/03-03), you'll see what to do when you want to train on only parts of images such as 2D slices from 3D images or patches / blocks of 2D / 3D images.\n",
"- In [Random transforms](book.nitrain.dev/03-04), you'll learn how to apply nitrain transforms to randomly alter your images in such a way that your dataset will be augmented and your models will be more robust.\n",
"\n",
"Additionally, this section will introduce you to one of the most unique and useful features of nitrain called \"samplers\". Using samplers in nitrain makes it surprisingly easy to train AI models on parts of images such as 2D slices of 3D images, 2D patches of 2D images, or 3D blocks of 3D images. The process of generating slices, patches, or blocks can be quite confusing and difficult to get right, so nitrain makes this process easy."
"Generating batches of data - particularly when slices / patches / blocks of images are involved - is an area that many struggle with mastering. The nitrain framework gives you an organized and robust way to handle the most complex scenarios you'll come across."
]
},
{
Expand Down
6 changes: 5 additions & 1 deletion book/03-02.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# 10. Using samplers"
"# 10. Using loaders\n",
"\n",
":::{warning}\n",
"This chapter is an unfinished draft. I recommend skipping it for now since it is likely to change.\n",
":::"
]
},
{
Expand Down
6 changes: 5 additions & 1 deletion book/03-03.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# 11. Random transforms"
"# 11. Using samplers\n",
"\n",
":::{warning}\n",
"This chapter is an unfinished draft. I recommend skipping it for now since it is likely to change.\n",
":::"
]
},
{
Expand Down
22 changes: 22 additions & 0 deletions book/03-04.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# 12. Random transforms\n",
"\n",
":::{warning}\n",
"This chapter is an unfinished draft. I recommend skipping it for now since it is likely to change.\n",
":::"
]
}
],
"metadata": {
"language_info": {
"name": "python"
}
},
"nbformat": 4,
"nbformat_minor": 2
}

0 comments on commit 078ceaf

Please sign in to comment.