Skip to content

Commit

Permalink
add loaders chapter
Browse files Browse the repository at this point in the history
  • Loading branch information
ncullen93 committed May 31, 2024
1 parent 78a55ff commit 2c7d3c5
Showing 1 changed file with 53 additions and 2 deletions.
55 changes: 53 additions & 2 deletions book/03-02.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
},
{
Expand All @@ -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,
Expand Down

0 comments on commit 2c7d3c5

Please sign in to comment.