From 078ceaf7509900e22e9143f5a797825ae7438f76 Mon Sep 17 00:00:00 2001 From: ncullen93 Date: Wed, 29 May 2024 11:29:27 +0200 Subject: [PATCH] update structure --- book/01-01.ipynb | 2 +- book/01-02.ipynb | 2 +- book/01-03.ipynb | 2 +- book/01-04.ipynb | 2 +- book/02-01.ipynb | 5 +++-- book/02-02.ipynb | 4 ++++ book/02-03.ipynb | 6 +++++- book/02-04.ipynb | 6 +++++- book/03-01.ipynb | 10 ++++++---- book/03-02.ipynb | 6 +++++- book/03-03.ipynb | 6 +++++- book/03-04.ipynb | 22 ++++++++++++++++++++++ 12 files changed, 59 insertions(+), 14 deletions(-) create mode 100644 book/03-04.ipynb diff --git a/book/01-01.ipynb b/book/01-01.ipynb index 915ab81..1873bd8 100644 --- a/book/01-01.ipynb +++ b/book/01-01.ipynb @@ -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", diff --git a/book/01-02.ipynb b/book/01-02.ipynb index 29cd3be..94ec287 100644 --- a/book/01-02.ipynb +++ b/book/01-02.ipynb @@ -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", diff --git a/book/01-03.ipynb b/book/01-03.ipynb index d716119..16adef8 100644 --- a/book/01-03.ipynb +++ b/book/01-03.ipynb @@ -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", diff --git a/book/01-04.ipynb b/book/01-04.ipynb index 5c6e0d7..9448e6f 100644 --- a/book/01-04.ipynb +++ b/book/01-04.ipynb @@ -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", diff --git a/book/02-01.ipynb b/book/02-01.ipynb index 2b013b7..5170a9f 100644 --- a/book/02-01.ipynb +++ b/book/02-01.ipynb @@ -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." ] } ], diff --git a/book/02-02.ipynb b/book/02-02.ipynb index 897322c..143bc6a 100644 --- a/book/02-02.ipynb +++ b/book/02-02.ipynb @@ -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." ] }, diff --git a/book/02-03.ipynb b/book/02-03.ipynb index 4f3408b..fbb097e 100644 --- a/book/02-03.ipynb +++ b/book/02-03.ipynb @@ -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", + ":::" ] }, { diff --git a/book/02-04.ipynb b/book/02-04.ipynb index 60fea05..8834745 100644 --- a/book/02-04.ipynb +++ b/book/02-04.ipynb @@ -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", + ":::" ] }, { diff --git a/book/03-01.ipynb b/book/03-01.ipynb index 9d3bae1..765589e 100644 --- a/book/03-01.ipynb +++ b/book/03-01.ipynb @@ -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." ] }, { diff --git a/book/03-02.ipynb b/book/03-02.ipynb index 9697616..85df62b 100644 --- a/book/03-02.ipynb +++ b/book/03-02.ipynb @@ -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", + ":::" ] }, { diff --git a/book/03-03.ipynb b/book/03-03.ipynb index 19a62a8..e2f1570 100644 --- a/book/03-03.ipynb +++ b/book/03-03.ipynb @@ -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", + ":::" ] }, { diff --git a/book/03-04.ipynb b/book/03-04.ipynb new file mode 100644 index 0000000..534b0d8 --- /dev/null +++ b/book/03-04.ipynb @@ -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 +}