From 2c7d3c5eadadb837a36e4c2d1c16b9b442c8be1a Mon Sep 17 00:00:00 2001 From: ncullen93 Date: Fri, 31 May 2024 13:20:56 +0200 Subject: [PATCH] add loaders chapter --- book/03-02.ipynb | 55 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 53 insertions(+), 2 deletions(-) diff --git a/book/03-02.ipynb b/book/03-02.ipynb index 85df62b..e093885 100644 --- a/book/03-02.ipynb +++ b/book/03-02.ipynb @@ -8,7 +8,52 @@ "\n", ":::{warning}\n", "This chapter is an unfinished draft. I recommend skipping it for now since it is likely to change.\n", - ":::" + ":::\n", + "\n", + "In the previous sections, you learned how to handle both individual images and entire collections of images and related meta-data via datasets. To train medical imaging AI models, however, it is necessary to combine your data records into a single array / tensor called a \"batch\". The `nitrain.Loader` class is the way to accomplish this task in a flexible and powerful way.\n", + "\n", + "In this chapter, we will go through the basic ways to generate trainable batches of data from your dataset. In future chapters in this section, we will expand on these basic examples by adding samplers and random augmentation transforms.\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Prequisites\n", + "\n", + "In this chapter, we will use the standard libraries of nitrain, ants, and numpy. As before, we will be primarily using images already loaded into memory but the concepts still apply to reading images from local folders or the cloud." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import nitrain as nt\n", + "import ants\n", + "import numpy as np" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Initializing loaders" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Controlling channels" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Summary\n" ] }, { @@ -18,8 +63,14 @@ } ], "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, "language_info": { - "name": "python" + "name": "python", + "version": "3.11.5" } }, "nbformat": 4,