From 95897d9cb997c025a244a0e6eb832f664be4fef2 Mon Sep 17 00:00:00 2001 From: thibaultdvx <154365476+thibaultdvx@users.noreply.github.com> Date: Thu, 30 May 2024 13:09:42 +0200 Subject: [PATCH] Update notebooks (#45) --- notebooks/generate.ipynb | 52 +++++------ notebooks/inference.ipynb | 40 ++++----- notebooks/interpretability.ipynb | 40 ++++----- notebooks/label_extraction.ipynb | 112 ++++++++++++------------ notebooks/preprocessing.ipynb | 102 ++++++++++----------- notebooks/random_search.ipynb | 42 ++++----- notebooks/training.ipynb | 72 +++++++-------- notebooks/training_classification.ipynb | 84 +++++++++--------- notebooks/training_reconstruction.ipynb | 78 ++++++++--------- notebooks/training_regression.ipynb | 62 ++++++------- 10 files changed, 342 insertions(+), 342 deletions(-) diff --git a/notebooks/generate.ipynb b/notebooks/generate.ipynb index 15316c1..382a2fb 100644 --- a/notebooks/generate.ipynb +++ b/notebooks/generate.ipynb @@ -3,17 +3,17 @@ { "cell_type": "code", "execution_count": null, - "id": "98e2c0cc", + "id": "6b249afa", "metadata": {}, "outputs": [], "source": [ "# Uncomment this cell if running in Google Colab\n", - "!pip install clinicadl==1.3.0" + "!pip install clinicadl==1.6.1" ] }, { "cell_type": "markdown", - "id": "6535c01d", + "id": "6a516f13", "metadata": { "lines_to_next_cell": 0 }, @@ -43,19 +43,19 @@ { "cell_type": "code", "execution_count": null, - "id": "47318d40", + "id": "3a1b7f1d", "metadata": { "lines_to_next_cell": 0 }, "outputs": [], "source": [ - "!curl -k https://aramislab.paris.inria.fr/clinicadl/files/data/handbook_2023/data_oasis/CAPS_example.tar.gz -o oasisCaps.tar.gz\n", + "!curl -k https://aramislab.paris.inria.fr/clinicadl/files/handbook_2023/data_oasis/CAPS_example.tar.gz -o oasisCaps.tar.gz\n", "!tar xf oasisCaps.tar.gz" ] }, { "cell_type": "markdown", - "id": "ae43371d", + "id": "5737c2cc", "metadata": { "lines_to_next_cell": 0 }, @@ -101,7 +101,7 @@ { "cell_type": "code", "execution_count": null, - "id": "24375018", + "id": "2978c583", "metadata": { "lines_to_next_cell": 0 }, @@ -112,7 +112,7 @@ }, { "cell_type": "markdown", - "id": "a16e3639", + "id": "ff2a5926", "metadata": { "lines_to_next_cell": 0 }, @@ -127,7 +127,7 @@ }, { "cell_type": "markdown", - "id": "db02b1ea", + "id": "fd8651a4", "metadata": {}, "source": [ "#### Get the labels AD and CN\n", @@ -140,7 +140,7 @@ { "cell_type": "code", "execution_count": null, - "id": "56525e32", + "id": "68d3a21d", "metadata": { "lines_to_next_cell": 0 }, @@ -153,7 +153,7 @@ { "cell_type": "code", "execution_count": null, - "id": "7e5a6729", + "id": "3018c01a", "metadata": { "lines_to_next_cell": 0 }, @@ -166,7 +166,7 @@ { "cell_type": "code", "execution_count": null, - "id": "9abb1c9a", + "id": "34eea13c", "metadata": { "lines_to_next_cell": 0 }, @@ -178,7 +178,7 @@ }, { "cell_type": "markdown", - "id": "22a6fe39", + "id": "6ac39bfd", "metadata": { "lines_to_next_cell": 0 }, @@ -201,7 +201,7 @@ { "cell_type": "code", "execution_count": null, - "id": "4f4ad49b", + "id": "70ade2f2", "metadata": { "lines_to_next_cell": 0 }, @@ -212,7 +212,7 @@ }, { "cell_type": "markdown", - "id": "6eba2f26", + "id": "51b695b2", "metadata": { "lines_to_next_cell": 0 }, @@ -224,7 +224,7 @@ { "cell_type": "code", "execution_count": null, - "id": "fb7308dc", + "id": "d5b4707b", "metadata": { "lines_to_next_cell": 0 }, @@ -243,7 +243,7 @@ { "cell_type": "code", "execution_count": null, - "id": "d5ba6a82", + "id": "8b7780cd", "metadata": { "lines_to_next_cell": 0 }, @@ -255,7 +255,7 @@ }, { "cell_type": "markdown", - "id": "bd122070", + "id": "cb3bed6f", "metadata": { "lines_to_next_cell": 0 }, @@ -268,7 +268,7 @@ { "cell_type": "code", "execution_count": null, - "id": "14e0cdee", + "id": "6199da50", "metadata": { "lines_to_next_cell": 0 }, @@ -281,7 +281,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f617fd3b", + "id": "204ac99a", "metadata": {}, "outputs": [], "source": [ @@ -299,7 +299,7 @@ }, { "cell_type": "markdown", - "id": "b9af9c02", + "id": "92075683", "metadata": { "lines_to_next_cell": 2 }, @@ -335,7 +335,7 @@ { "cell_type": "code", "execution_count": null, - "id": "fcf4cb72", + "id": "6dd2bf6c", "metadata": {}, "outputs": [], "source": [ @@ -344,7 +344,7 @@ }, { "cell_type": "markdown", - "id": "7a49d044", + "id": "51bd7a07", "metadata": {}, "source": [ "The command generates 3D images of same size as the input images formatted as\n", @@ -355,7 +355,7 @@ }, { "cell_type": "markdown", - "id": "3e241670", + "id": "f7de8d12", "metadata": { "lines_to_next_cell": 2 }, @@ -389,7 +389,7 @@ }, { "cell_type": "markdown", - "id": "4ed71edc", + "id": "d4d834f0", "metadata": {}, "source": [ "### Running the task\n", @@ -403,7 +403,7 @@ { "cell_type": "code", "execution_count": null, - "id": "9991f499", + "id": "fddc70be", "metadata": {}, "outputs": [], "source": [ diff --git a/notebooks/inference.ipynb b/notebooks/inference.ipynb index bc615db..90de8a7 100644 --- a/notebooks/inference.ipynb +++ b/notebooks/inference.ipynb @@ -3,19 +3,19 @@ { "cell_type": "code", "execution_count": null, - "id": "43d1cf22", + "id": "05baad6c", "metadata": { "lines_to_next_cell": 0 }, "outputs": [], "source": [ "# Uncomment this cell if running in Google Colab\n", - "!pip install clinicadl==1.3.0" + "!pip install clinicadl==1.6.1" ] }, { "cell_type": "markdown", - "id": "e282e32d", + "id": "926641e6", "metadata": { "lines_to_next_cell": 0 }, @@ -84,7 +84,7 @@ }, { "cell_type": "markdown", - "id": "c37c9b9e", + "id": "72dfbf7c", "metadata": { "lines_to_next_cell": 0 }, @@ -110,7 +110,7 @@ { "cell_type": "code", "execution_count": null, - "id": "c3c68ac5", + "id": "9235964f", "metadata": { "lines_to_next_cell": 0 }, @@ -135,7 +135,7 @@ }, { "cell_type": "markdown", - "id": "75ff167a", + "id": "0388f991", "metadata": { "lines_to_next_cell": 0 }, @@ -156,7 +156,7 @@ { "cell_type": "code", "execution_count": null, - "id": "e184e78b", + "id": "5b1e59cf", "metadata": { "lines_to_next_cell": 0 }, @@ -170,7 +170,7 @@ }, { "cell_type": "markdown", - "id": "6db943f4", + "id": "41ebad1a", "metadata": { "lines_to_next_cell": 0 }, @@ -194,7 +194,7 @@ }, { "cell_type": "markdown", - "id": "6ede8598", + "id": "21722da5", "metadata": { "lines_to_next_cell": 0 }, @@ -205,7 +205,7 @@ { "cell_type": "code", "execution_count": null, - "id": "4ab97fd1", + "id": "1549ae37", "metadata": { "lines_to_next_cell": 0 }, @@ -216,7 +216,7 @@ }, { "cell_type": "markdown", - "id": "d9a61f55", + "id": "9dc0a014", "metadata": { "lines_to_next_cell": 0 }, @@ -227,7 +227,7 @@ { "cell_type": "code", "execution_count": null, - "id": "8b210854", + "id": "e369c517", "metadata": { "lines_to_next_cell": 0 }, @@ -240,7 +240,7 @@ }, { "cell_type": "markdown", - "id": "23bb45a7", + "id": "e66c5960", "metadata": { "lines_to_next_cell": 0 }, @@ -251,7 +251,7 @@ { "cell_type": "code", "execution_count": null, - "id": "3d79d636", + "id": "ce67c0b5", "metadata": { "lines_to_next_cell": 0 }, @@ -265,7 +265,7 @@ }, { "cell_type": "markdown", - "id": "f4a81ec1", + "id": "a2b3f78b", "metadata": { "lines_to_next_cell": 0 }, @@ -282,7 +282,7 @@ { "cell_type": "code", "execution_count": null, - "id": "1b5a09f0", + "id": "0b76c2eb", "metadata": { "lines_to_next_cell": 0 }, @@ -294,7 +294,7 @@ }, { "cell_type": "markdown", - "id": "d61210cc", + "id": "48fab235", "metadata": { "lines_to_next_cell": 0 }, @@ -305,7 +305,7 @@ { "cell_type": "code", "execution_count": null, - "id": "eac273dd", + "id": "830744c4", "metadata": { "lines_to_next_cell": 0 }, @@ -321,7 +321,7 @@ { "cell_type": "code", "execution_count": null, - "id": "9f28bd8e", + "id": "2b501d3e", "metadata": { "lines_to_next_cell": 0 }, @@ -337,7 +337,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f3adfb4f", + "id": "9d233554", "metadata": {}, "outputs": [], "source": [ diff --git a/notebooks/interpretability.ipynb b/notebooks/interpretability.ipynb index fb07aff..2095c53 100644 --- a/notebooks/interpretability.ipynb +++ b/notebooks/interpretability.ipynb @@ -3,19 +3,19 @@ { "cell_type": "code", "execution_count": null, - "id": "e0505734", + "id": "297afdc9", "metadata": { "lines_to_next_cell": 0 }, "outputs": [], "source": [ "# Uncomment this cell if running in Google Colab\n", - "!pip install clinicadl==1.3.0" + "!pip install clinicadl==1.6.1" ] }, { "cell_type": "markdown", - "id": "84bd10aa", + "id": "ab2a5c26", "metadata": {}, "source": [ "# Generate saliency maps on trained networks\n", @@ -38,7 +38,7 @@ }, { "cell_type": "markdown", - "id": "f7aa21c0", + "id": "9d005d06", "metadata": {}, "source": [ "## Use of trivial datasets\n", @@ -52,7 +52,7 @@ { "cell_type": "code", "execution_count": null, - "id": "be87ea33", + "id": "da505234", "metadata": {}, "outputs": [], "source": [ @@ -64,7 +64,7 @@ { "cell_type": "code", "execution_count": null, - "id": "befaefe0", + "id": "fe6aa582", "metadata": {}, "outputs": [], "source": [ @@ -75,7 +75,7 @@ }, { "cell_type": "markdown", - "id": "7a179e73", + "id": "328f4240", "metadata": {}, "source": [ "In this trivial dataset, \"AD\" brains are atrophied according to the first mask\n", @@ -87,7 +87,7 @@ { "cell_type": "code", "execution_count": null, - "id": "5e2c3539", + "id": "3c3462ad", "metadata": {}, "outputs": [], "source": [ @@ -100,7 +100,7 @@ }, { "cell_type": "markdown", - "id": "a44eac5e", + "id": "cceb3c3f", "metadata": {}, "source": [ "Saliency maps will be generated using trivial data generated from OASIS. If\n", @@ -112,7 +112,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f8aabb20", + "id": "4e45cdc0", "metadata": { "lines_to_next_cell": 2 }, @@ -128,7 +128,7 @@ }, { "cell_type": "markdown", - "id": "3d3d6aac", + "id": "70d4e259", "metadata": {}, "source": [ "# Generate individual saliency maps\n", @@ -157,7 +157,7 @@ }, { "cell_type": "markdown", - "id": "3ae956f5", + "id": "1ae111f2", "metadata": {}, "source": [ "In the following we chose to generate saliency map based on the opposite\n", @@ -175,7 +175,7 @@ { "cell_type": "code", "execution_count": null, - "id": "c998e4f1", + "id": "01c8d858", "metadata": { "lines_to_next_cell": 2 }, @@ -188,7 +188,7 @@ { "cell_type": "code", "execution_count": null, - "id": "b5374af8", + "id": "b566aa5d", "metadata": { "lines_to_next_cell": 2 }, @@ -200,7 +200,7 @@ }, { "cell_type": "markdown", - "id": "89353f65", + "id": "771c64e5", "metadata": {}, "source": [ "This command will generate saliency maps for the model selected on validation \n", @@ -215,7 +215,7 @@ { "cell_type": "code", "execution_count": null, - "id": "7ba761e0", + "id": "d0f0cb5c", "metadata": {}, "outputs": [], "source": [ @@ -224,7 +224,7 @@ }, { "cell_type": "markdown", - "id": "8f0b351f", + "id": "5222d285", "metadata": { "lines_to_next_cell": 2 }, @@ -238,7 +238,7 @@ { "cell_type": "code", "execution_count": null, - "id": "87416c32", + "id": "fd574038", "metadata": {}, "outputs": [], "source": [ @@ -264,7 +264,7 @@ }, { "cell_type": "markdown", - "id": "ca1f6d15", + "id": "b52ea5c1", "metadata": { "lines_to_next_cell": 0 }, @@ -277,7 +277,7 @@ { "cell_type": "code", "execution_count": null, - "id": "9a805b07", + "id": "118d85d9", "metadata": {}, "outputs": [], "source": [] diff --git a/notebooks/label_extraction.ipynb b/notebooks/label_extraction.ipynb index dab72a9..599f41b 100644 --- a/notebooks/label_extraction.ipynb +++ b/notebooks/label_extraction.ipynb @@ -3,17 +3,17 @@ { "cell_type": "code", "execution_count": null, - "id": "b2353959", + "id": "5f97905f", "metadata": {}, "outputs": [], "source": [ "# Uncomment the next lines if running in Google Colab\n", - "!pip install clinicadl==1.3.0" + "!pip install clinicadl==1.6.1" ] }, { "cell_type": "markdown", - "id": "d14d9104", + "id": "3905db98", "metadata": { "lines_to_next_cell": 2 }, @@ -35,7 +35,7 @@ }, { "cell_type": "markdown", - "id": "5fe8c3f5", + "id": "e20db782", "metadata": {}, "source": [ "## Before starting\n", @@ -51,32 +51,32 @@ { "cell_type": "code", "execution_count": null, - "id": "d9e9fe9e", + "id": "090a5244", "metadata": {}, "outputs": [], "source": [ "# #OASIS BIDS\n", - "!curl -k https://aramislab.paris.inria.fr/files/data/handbook_2023/data_oasis/BIDS_example.tar.gz -o BIDS_example.tar.gz\n", + "!curl -k https://aramislab.paris.inria.fr/clinicadl/files/handbook_2023/data_oasis/BIDS_example.tar.gz -o BIDS_example.tar.gz\n", "!tar xf BIDS_example.tar.gz " ] }, { "cell_type": "code", "execution_count": null, - "id": "55ab43b6", + "id": "1eb7c0ab", "metadata": { "lines_to_next_cell": 2 }, "outputs": [], "source": [ "# #ADNI BIDS\n", - "!curl -k https://aramislab.paris.inria.fr/files/data/handbook_2023/data_adni/BIDS_example.tar.gz -o BIDS_example.tar.gz\n", + "!curl -k https://aramislab.paris.inria.fr/clinicadl/files/handbook_2023/data_adni/BIDS_example.tar.gz -o BIDS_example.tar.gz\n", "!tar xf BIDS_example.tar.gz " ] }, { "cell_type": "markdown", - "id": "a4c73d62", + "id": "a05858a0", "metadata": {}, "source": [ "## Get metadata from a BIDS hierarchy with `clinica iotools`\n", @@ -102,7 +102,7 @@ }, { "cell_type": "markdown", - "id": "cdf85436", + "id": "5c4cb2dd", "metadata": {}, "source": [ "We are going to run some experiments on the ADNI and OASIS datasets, \n", @@ -115,7 +115,7 @@ { "cell_type": "code", "execution_count": null, - "id": "8fe6cac7", + "id": "6eac395d", "metadata": {}, "outputs": [], "source": [ @@ -126,7 +126,7 @@ { "cell_type": "code", "execution_count": null, - "id": "2b8edc9e", + "id": "4e71aa68", "metadata": { "lines_to_next_cell": 0 }, @@ -137,7 +137,7 @@ }, { "cell_type": "markdown", - "id": "ef5f166e", + "id": "25b0b153", "metadata": {}, "source": [ "### Check missing modalities for each subject\n", @@ -163,7 +163,7 @@ { "cell_type": "code", "execution_count": null, - "id": "79b47f92", + "id": "cdca2e47", "metadata": { "lines_to_next_cell": 0 }, @@ -176,7 +176,7 @@ { "cell_type": "code", "execution_count": null, - "id": "846ee251", + "id": "4ce5d933", "metadata": { "lines_to_next_cell": 0 }, @@ -187,7 +187,7 @@ }, { "cell_type": "markdown", - "id": "35417aba", + "id": "00f4e094", "metadata": {}, "source": [ "The output of this command, `missing_mods/`, is a folder with a series of\n", @@ -197,7 +197,7 @@ }, { "cell_type": "markdown", - "id": "9a07d968", + "id": "529364dd", "metadata": {}, "source": [ "## Prepare metadata with `clinicadl tsvtools` \n", @@ -219,7 +219,7 @@ { "cell_type": "code", "execution_count": null, - "id": "06b12749", + "id": "d1ac7ae0", "metadata": {}, "outputs": [], "source": [ @@ -232,7 +232,7 @@ { "cell_type": "code", "execution_count": null, - "id": "4899cea7", + "id": "be3e112b", "metadata": {}, "outputs": [], "source": [ @@ -244,7 +244,7 @@ }, { "cell_type": "markdown", - "id": "0af71c49", + "id": "28a481d1", "metadata": {}, "source": [ "### Get the labels\n", @@ -273,7 +273,7 @@ }, { "cell_type": "markdown", - "id": "53482736", + "id": "2eb7d208", "metadata": { "lines_to_next_cell": 0 }, @@ -286,7 +286,7 @@ { "cell_type": "code", "execution_count": null, - "id": "261b4d37", + "id": "f69efd82", "metadata": { "lines_to_next_cell": 0 }, @@ -297,7 +297,7 @@ }, { "cell_type": "markdown", - "id": "14959fbb", + "id": "3f29c9bc", "metadata": { "lines_to_next_cell": 0 }, @@ -314,7 +314,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a9577db5", + "id": "a4c132af", "metadata": { "lines_to_next_cell": 0 }, @@ -325,7 +325,7 @@ }, { "cell_type": "markdown", - "id": "1682021d", + "id": "71a0cf40", "metadata": {}, "source": [ "This tool writes a unique TSV file containing the labels asked by the user.\n", @@ -344,7 +344,7 @@ }, { "cell_type": "markdown", - "id": "4f9c33f0", + "id": "cfe53db1", "metadata": {}, "source": [ "### Analyze the population\n", @@ -358,7 +358,7 @@ { "cell_type": "code", "execution_count": null, - "id": "dd03aba9", + "id": "fb45a198", "metadata": { "lines_to_next_cell": 0 }, @@ -384,7 +384,7 @@ { "cell_type": "code", "execution_count": null, - "id": "722d6071", + "id": "80b79883", "metadata": {}, "outputs": [], "source": [ @@ -393,7 +393,7 @@ }, { "cell_type": "markdown", - "id": "ea422f74", + "id": "c7089a17", "metadata": { "lines_to_next_cell": 0 }, @@ -422,7 +422,7 @@ { "cell_type": "code", "execution_count": null, - "id": "76cbf250", + "id": "0f0923bc", "metadata": { "lines_to_next_cell": 0 }, @@ -435,7 +435,7 @@ { "cell_type": "code", "execution_count": null, - "id": "37ac519f", + "id": "5266375f", "metadata": {}, "outputs": [], "source": [ @@ -446,7 +446,7 @@ { "cell_type": "code", "execution_count": null, - "id": "4ce5ca3f", + "id": "330b476d", "metadata": { "lines_to_next_cell": 0 }, @@ -492,7 +492,7 @@ { "cell_type": "code", "execution_count": null, - "id": "fe22b57a", + "id": "87ac17be", "metadata": { "lines_to_next_cell": 0 }, @@ -504,7 +504,7 @@ { "cell_type": "code", "execution_count": null, - "id": "6c4d4bcc", + "id": "b9dbb64f", "metadata": { "lines_to_next_cell": 0 }, @@ -515,7 +515,7 @@ }, { "cell_type": "markdown", - "id": "b07c445f", + "id": "0e645e2b", "metadata": { "lines_to_next_cell": 0 }, @@ -531,7 +531,7 @@ }, { "cell_type": "markdown", - "id": "7cd184e9", + "id": "84ff5107", "metadata": {}, "source": [ "There is no significant bias on age anymore, but do you notice any other\n", @@ -552,7 +552,7 @@ }, { "cell_type": "markdown", - "id": "c6e0e680", + "id": "1d726d1e", "metadata": {}, "source": [ "### Get the progression of the Alzheimer's disease\n", @@ -591,7 +591,7 @@ }, { "cell_type": "markdown", - "id": "f3959685", + "id": "48342788", "metadata": { "lines_to_next_cell": 0 }, @@ -602,7 +602,7 @@ { "cell_type": "code", "execution_count": null, - "id": "73569dcb", + "id": "61eab36d", "metadata": {}, "outputs": [], "source": [ @@ -612,7 +612,7 @@ { "cell_type": "code", "execution_count": null, - "id": "fcddbbfe", + "id": "6375b6b8", "metadata": {}, "outputs": [], "source": [ @@ -624,7 +624,7 @@ }, { "cell_type": "markdown", - "id": "2885fc5c", + "id": "071dadb4", "metadata": { "lines_to_next_cell": 0 }, @@ -685,7 +685,7 @@ { "cell_type": "code", "execution_count": null, - "id": "e9ccf08e", + "id": "c6ab7f38", "metadata": {}, "outputs": [], "source": [ @@ -695,7 +695,7 @@ { "cell_type": "code", "execution_count": null, - "id": "1eea0f3f", + "id": "6abeb5fe", "metadata": { "lines_to_next_cell": 0 }, @@ -707,7 +707,7 @@ }, { "cell_type": "markdown", - "id": "69ac5b7f", + "id": "55070732", "metadata": {}, "source": [ "The differences between the populations of the train + validation and test \n", @@ -718,7 +718,7 @@ { "cell_type": "code", "execution_count": null, - "id": "5ef425c7", + "id": "6d7c3c48", "metadata": { "lines_to_next_cell": 0 }, @@ -730,7 +730,7 @@ { "cell_type": "code", "execution_count": null, - "id": "c9d13a14", + "id": "e5e8d35d", "metadata": { "lines_to_next_cell": 0 }, @@ -742,7 +742,7 @@ { "cell_type": "code", "execution_count": null, - "id": "7f0bba8b", + "id": "5d3dad40", "metadata": { "lines_to_next_cell": 0 }, @@ -756,7 +756,7 @@ }, { "cell_type": "markdown", - "id": "0cdb43ca", + "id": "f8123d84", "metadata": { "lines_to_next_cell": 0 }, @@ -778,7 +778,7 @@ }, { "cell_type": "markdown", - "id": "0a60ea4a", + "id": "656ca4a7", "metadata": { "lines_to_next_cell": 0 }, @@ -812,7 +812,7 @@ { "cell_type": "code", "execution_count": null, - "id": "b8caa94d", + "id": "bca6146b", "metadata": {}, "outputs": [], "source": [ @@ -822,7 +822,7 @@ { "cell_type": "code", "execution_count": null, - "id": "d148346c", + "id": "8cc98119", "metadata": { "lines_to_next_cell": 0 }, @@ -834,7 +834,7 @@ }, { "cell_type": "markdown", - "id": "e53f436f", + "id": "22637121", "metadata": { "lines_to_next_cell": 0 }, @@ -863,7 +863,7 @@ { "cell_type": "code", "execution_count": null, - "id": "600f180f", + "id": "294a1bae", "metadata": { "lines_to_next_cell": 0 }, @@ -950,7 +950,7 @@ }, { "cell_type": "markdown", - "id": "b5c11df2", + "id": "4fc968c4", "metadata": {}, "source": [ "If no Error was raised, then none of the three conditions was broken. It is now\n", @@ -971,7 +971,7 @@ }, { "cell_type": "markdown", - "id": "990c7b70", + "id": "cacc0d0c", "metadata": { "lines_to_next_cell": 0 }, @@ -983,7 +983,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f873881c", + "id": "6793c3f7", "metadata": {}, "outputs": [], "source": [] diff --git a/notebooks/preprocessing.ipynb b/notebooks/preprocessing.ipynb index 9f9a8bd..4b1e1e9 100644 --- a/notebooks/preprocessing.ipynb +++ b/notebooks/preprocessing.ipynb @@ -3,17 +3,17 @@ { "cell_type": "code", "execution_count": null, - "id": "21197d4f", + "id": "93e0b753", "metadata": {}, "outputs": [], "source": [ "# Uncomment the next line if running in Google Colab\n", - "# !pip install clinicadl==1.3.0" + "# !pip install clinicadl==1.6.1" ] }, { "cell_type": "markdown", - "id": "545460bd", + "id": "bab86962", "metadata": {}, "source": [ "# Prepare your neuroimaging data\n", @@ -28,7 +28,7 @@ }, { "cell_type": "markdown", - "id": "6ff9d1d9", + "id": "1229d82a", "metadata": { "lines_to_next_cell": 0 }, @@ -73,7 +73,7 @@ }, { "cell_type": "markdown", - "id": "fb3d24d9", + "id": "18b701f3", "metadata": {}, "source": [ "\n", @@ -103,7 +103,7 @@ }, { "cell_type": "markdown", - "id": "714b0c06", + "id": "60a812f6", "metadata": {}, "source": [ "### Before starting\n", @@ -114,7 +114,7 @@ }, { "cell_type": "markdown", - "id": "c964a259", + "id": "c26b3f0b", "metadata": { "lines_to_next_cell": 0 }, @@ -127,7 +127,7 @@ { "cell_type": "code", "execution_count": null, - "id": "0b401f32", + "id": "acd05b37", "metadata": {}, "outputs": [], "source": [ @@ -139,7 +139,7 @@ { "cell_type": "code", "execution_count": null, - "id": "77aef766", + "id": "bcae68f5", "metadata": {}, "outputs": [], "source": [ @@ -149,7 +149,7 @@ }, { "cell_type": "markdown", - "id": "7e264314", + "id": "d31970af", "metadata": {}, "source": [ "\n", @@ -161,7 +161,7 @@ }, { "cell_type": "markdown", - "id": "a9e0767e", + "id": "87f8dab6", "metadata": { "lines_to_next_cell": 0 }, @@ -174,7 +174,7 @@ { "cell_type": "code", "execution_count": null, - "id": "6d2a5ccd", + "id": "1cc94c17", "metadata": { "lines_to_next_cell": 0 }, @@ -186,7 +186,7 @@ }, { "cell_type": "markdown", - "id": "c0e9b892", + "id": "e37d40e4", "metadata": {}, "source": [ "# Why prepare data ?\n", @@ -215,7 +215,7 @@ }, { "cell_type": "markdown", - "id": "4c8bcedc", + "id": "f309a63e", "metadata": {}, "source": [ "\n", @@ -241,7 +241,7 @@ }, { "cell_type": "markdown", - "id": "3954e768", + "id": "f96b6d4b", "metadata": {}, "source": [ "This notebook presents three possible preprocessing steps using the [Clinica](https://www.clinica.run/doc/)\n", @@ -254,7 +254,7 @@ }, { "cell_type": "markdown", - "id": "0731a32d", + "id": "9e279250", "metadata": {}, "source": [ "\n", @@ -283,7 +283,7 @@ { "cell_type": "code", "execution_count": null, - "id": "3ab3a606", + "id": "3b7c9e1f", "metadata": {}, "outputs": [], "source": [ @@ -294,7 +294,7 @@ }, { "cell_type": "markdown", - "id": "13dd7a71", + "id": "14dbe884", "metadata": {}, "source": [ "These steps can be run with this simple command line:\n", @@ -311,7 +311,7 @@ }, { "cell_type": "markdown", - "id": "1be4ed8b", + "id": "0f90c3cf", "metadata": { "lines_to_next_cell": 0 }, @@ -329,7 +329,7 @@ }, { "cell_type": "markdown", - "id": "de5c6ac7", + "id": "d44cafc1", "metadata": { "lines_to_next_cell": 0 }, @@ -340,7 +340,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a850ce36", + "id": "422f676e", "metadata": { "lines_to_next_cell": 0 }, @@ -351,7 +351,7 @@ }, { "cell_type": "markdown", - "id": "12b5e853", + "id": "315fe6b7", "metadata": { "lines_to_next_cell": 0 }, @@ -363,7 +363,7 @@ }, { "cell_type": "markdown", - "id": "21c5d89c", + "id": "82b43fe2", "metadata": { "lines_to_next_cell": 0 }, @@ -375,7 +375,7 @@ { "cell_type": "code", "execution_count": null, - "id": "286c5d95", + "id": "bd58ebc7", "metadata": { "lines_to_next_cell": 0 }, @@ -387,7 +387,7 @@ }, { "cell_type": "markdown", - "id": "c9ef2a36", + "id": "9bc8035c", "metadata": { "lines_to_next_cell": 0 }, @@ -403,7 +403,7 @@ }, { "cell_type": "markdown", - "id": "46d9174a", + "id": "3a9e9b9c", "metadata": { "lines_to_next_cell": 0 }, @@ -415,7 +415,7 @@ { "cell_type": "code", "execution_count": null, - "id": "2d2e6765", + "id": "3156cb3f", "metadata": {}, "outputs": [], "source": [ @@ -438,7 +438,7 @@ }, { "cell_type": "markdown", - "id": "5bf410ed", + "id": "a0834aeb", "metadata": {}, "source": [ "\n", @@ -458,7 +458,7 @@ }, { "cell_type": "markdown", - "id": "d2b25f01", + "id": "f696178b", "metadata": {}, "source": [ "```{note}\n", @@ -468,7 +468,7 @@ }, { "cell_type": "markdown", - "id": "65642a93", + "id": "1d4efd5a", "metadata": {}, "source": [ "The pipeline can be run with the following command line:\n", @@ -496,7 +496,7 @@ }, { "cell_type": "markdown", - "id": "a9d13f1d", + "id": "a8c2981a", "metadata": { "lines_to_next_cell": 0 }, @@ -514,7 +514,7 @@ }, { "cell_type": "markdown", - "id": "010bfca2", + "id": "70ef4ada", "metadata": {}, "source": [ "### Run the pipeline\n", @@ -525,7 +525,7 @@ { "cell_type": "code", "execution_count": null, - "id": "30360ff6", + "id": "fa8fb43d", "metadata": { "lines_to_next_cell": 0 }, @@ -538,7 +538,7 @@ { "cell_type": "code", "execution_count": null, - "id": "9362e758", + "id": "b327de9e", "metadata": { "lines_to_next_cell": 0 }, @@ -550,7 +550,7 @@ }, { "cell_type": "markdown", - "id": "136b2b59", + "id": "3bb6b711", "metadata": {}, "source": [ "Once the pipeline has been run, the necessary outputs for the next steps are\n", @@ -560,7 +560,7 @@ }, { "cell_type": "markdown", - "id": "c217792b", + "id": "8e56c0cd", "metadata": { "lines_to_next_cell": 0 }, @@ -572,7 +572,7 @@ { "cell_type": "code", "execution_count": null, - "id": "5fa87eee", + "id": "d753c89d", "metadata": { "lines_to_next_cell": 0 }, @@ -584,7 +584,7 @@ }, { "cell_type": "markdown", - "id": "1ac96289", + "id": "779668b0", "metadata": { "lines_to_next_cell": 0 }, @@ -596,7 +596,7 @@ { "cell_type": "code", "execution_count": null, - "id": "17a2ece2", + "id": "a4207824", "metadata": {}, "outputs": [], "source": [ @@ -619,7 +619,7 @@ }, { "cell_type": "markdown", - "id": "21ac492e", + "id": "fad40d63", "metadata": {}, "source": [ "# Quality check of your preprocessed data" @@ -627,7 +627,7 @@ }, { "cell_type": "markdown", - "id": "56324764", + "id": "8908b2cb", "metadata": {}, "source": [ "From the 2 visualizations above, we can see that after the preprocessing, some\n", @@ -644,7 +644,7 @@ }, { "cell_type": "markdown", - "id": "1fdb08a9", + "id": "7a851a04", "metadata": {}, "source": [ "To automatically assess the quality of the **t1-linear** or the **pet-linear** preprocessing, we\n", @@ -672,7 +672,7 @@ }, { "cell_type": "markdown", - "id": "b0545ef5", + "id": "c6d4f301", "metadata": {}, "source": [ "```{note}\n", @@ -684,7 +684,7 @@ }, { "cell_type": "markdown", - "id": "8b2869e8", + "id": "75af0600", "metadata": { "lines_to_next_cell": 0 }, @@ -695,7 +695,7 @@ { "cell_type": "code", "execution_count": null, - "id": "01657786", + "id": "c6c69c1e", "metadata": {}, "outputs": [], "source": [ @@ -706,7 +706,7 @@ { "cell_type": "code", "execution_count": null, - "id": "2a717e12", + "id": "84f8aa87", "metadata": {}, "outputs": [], "source": [ @@ -716,7 +716,7 @@ }, { "cell_type": "markdown", - "id": "3995c67b", + "id": "be6e8420", "metadata": {}, "source": [ "```{warning}\n", @@ -729,7 +729,7 @@ { "cell_type": "code", "execution_count": null, - "id": "0efe8e28", + "id": "8b134ba3", "metadata": {}, "outputs": [], "source": [ @@ -740,7 +740,7 @@ }, { "cell_type": "markdown", - "id": "fd9a1e0e", + "id": "2e6aa98b", "metadata": {}, "source": [ "Based on these TSV file, participant `OASIS10304` should be discarded for the\n", @@ -753,7 +753,7 @@ { "cell_type": "code", "execution_count": null, - "id": "6bf75569", + "id": "3b75fd90", "metadata": {}, "outputs": [], "source": [ @@ -764,7 +764,7 @@ }, { "cell_type": "markdown", - "id": "e2a04432", + "id": "b37e1985", "metadata": { "lines_to_next_cell": 2 }, diff --git a/notebooks/random_search.ipynb b/notebooks/random_search.ipynb index 346a930..a621650 100644 --- a/notebooks/random_search.ipynb +++ b/notebooks/random_search.ipynb @@ -3,19 +3,19 @@ { "cell_type": "code", "execution_count": null, - "id": "8c74ca91", + "id": "c9b870be", "metadata": { "lines_to_next_cell": 0 }, "outputs": [], "source": [ "# Uncomment this cell if running in Google Colab\n", - "!pip install clinicadl==1.3.0" + "!pip install clinicadl==1.6.1" ] }, { "cell_type": "markdown", - "id": "c1b77e45", + "id": "3c6416a5", "metadata": { "lines_to_next_cell": 0 }, @@ -43,18 +43,18 @@ { "cell_type": "code", "execution_count": null, - "id": "a26d6985", + "id": "092236a7", "metadata": {}, "outputs": [], "source": [ - "!curl -k https://aramislab.paris.inria.fr/files/data/handbook_2023/data_oasis/CAPS_extracted.tar.gz -o oasisCaps.tar.gz\n", + "!curl -k https://aramislab.paris.inria.fr/clinicadl/files/handbook_2023/data_oasis/CAPS_extracted.tar.gz -o oasisCaps.tar.gz\n", "!tar xf oasisCaps.tar.gz" ] }, { "cell_type": "code", "execution_count": null, - "id": "08dd369f", + "id": "1e2a3966", "metadata": { "lines_to_next_cell": 0 }, @@ -65,7 +65,7 @@ }, { "cell_type": "markdown", - "id": "a71cd395", + "id": "b6fe0f4f", "metadata": { "lines_to_next_cell": 0 }, @@ -89,7 +89,7 @@ { "cell_type": "code", "execution_count": null, - "id": "84f569ef", + "id": "9ca54f20", "metadata": { "lines_to_next_cell": 0 }, @@ -122,7 +122,7 @@ }, { "cell_type": "markdown", - "id": "a40717b6", + "id": "4e3972d4", "metadata": { "lines_to_next_cell": 0 }, @@ -159,7 +159,7 @@ { "cell_type": "code", "execution_count": null, - "id": "b691ce65", + "id": "a841467e", "metadata": {}, "outputs": [], "source": [ @@ -188,7 +188,7 @@ }, { "cell_type": "markdown", - "id": "69efc37c", + "id": "f30a9a2e", "metadata": {}, "source": [ "# Prerequisites\n", @@ -204,7 +204,7 @@ }, { "cell_type": "markdown", - "id": "b257108b", + "id": "3cb03c7c", "metadata": {}, "source": [ "# Running the task\n", @@ -256,7 +256,7 @@ { "cell_type": "code", "execution_count": null, - "id": "4216fcba", + "id": "306de0d4", "metadata": { "lines_to_next_cell": 0 }, @@ -267,7 +267,7 @@ }, { "cell_type": "markdown", - "id": "622633fb", + "id": "14c93f18", "metadata": { "lines_to_next_cell": 0 }, @@ -280,7 +280,7 @@ { "cell_type": "code", "execution_count": null, - "id": "d7cf2f7a", + "id": "f061d080", "metadata": { "lines_to_next_cell": 0 }, @@ -293,7 +293,7 @@ { "cell_type": "code", "execution_count": null, - "id": "2ef9ebb2", + "id": "95302e54", "metadata": { "lines_to_next_cell": 0 }, @@ -313,7 +313,7 @@ }, { "cell_type": "markdown", - "id": "acdef25a", + "id": "eef847a5", "metadata": { "lines_to_next_cell": 0 }, @@ -333,7 +333,7 @@ }, { "cell_type": "markdown", - "id": "445bf05a", + "id": "3959de77", "metadata": {}, "source": [ "One convolutional block is described by the following values:\n", @@ -349,7 +349,7 @@ }, { "cell_type": "markdown", - "id": "c4a911e2", + "id": "938479ac", "metadata": {}, "source": [ "### Convolutional block - example 1\n", @@ -373,7 +373,7 @@ }, { "cell_type": "markdown", - "id": "2277686e", + "id": "44378fed", "metadata": { "lines_to_next_cell": 0 }, @@ -404,7 +404,7 @@ { "cell_type": "code", "execution_count": null, - "id": "b57352ac", + "id": "14424f88", "metadata": {}, "outputs": [], "source": [ diff --git a/notebooks/training.ipynb b/notebooks/training.ipynb index ae22d8e..386005f 100644 --- a/notebooks/training.ipynb +++ b/notebooks/training.ipynb @@ -3,19 +3,19 @@ { "cell_type": "code", "execution_count": null, - "id": "07687ffd", + "id": "b1f2b712", "metadata": { "lines_to_next_cell": 0 }, "outputs": [], "source": [ "# Uncomment this cell if running in Google Colab\n", - "!pip install clinicadl==1.3.0" + "!pip install clinicadl==1.6.1" ] }, { "cell_type": "markdown", - "id": "92be36e0", + "id": "03a36ddc", "metadata": { "lines_to_next_cell": 0 }, @@ -36,7 +36,7 @@ { "cell_type": "code", "execution_count": null, - "id": "d25a5154", + "id": "0dff17a8", "metadata": { "lines_to_next_cell": 0 }, @@ -52,7 +52,7 @@ { "cell_type": "code", "execution_count": null, - "id": "be7d0658", + "id": "808e0d05", "metadata": { "lines_to_next_cell": 0, "title": "[markwdown]" @@ -76,7 +76,7 @@ }, { "cell_type": "markdown", - "id": "2ec493e3", + "id": "f35c6631", "metadata": { "lines_to_next_cell": 0 }, @@ -156,7 +156,7 @@ }, { "cell_type": "markdown", - "id": "b40acc20", + "id": "1371a563", "metadata": { "lines_to_next_cell": 0 }, @@ -205,7 +205,7 @@ { "cell_type": "code", "execution_count": null, - "id": "6abd2255", + "id": "00519972", "metadata": { "lines_to_next_cell": 0 }, @@ -219,7 +219,7 @@ { "cell_type": "code", "execution_count": null, - "id": "7aca0989", + "id": "fd0f04fc", "metadata": { "lines_to_next_cell": 0 }, @@ -233,7 +233,7 @@ { "cell_type": "code", "execution_count": null, - "id": "bde03d22", + "id": "4f0bff8a", "metadata": { "lines_to_next_cell": 0 }, @@ -244,7 +244,7 @@ }, { "cell_type": "markdown", - "id": "9cf724d5", + "id": "c5a198cb", "metadata": { "lines_to_next_cell": 0 }, @@ -320,7 +320,7 @@ }, { "cell_type": "markdown", - "id": "76a2b1ae", + "id": "7d83c6b4", "metadata": { "lines_to_next_cell": 0 }, @@ -334,7 +334,7 @@ { "cell_type": "code", "execution_count": null, - "id": "33739eaa", + "id": "c2159b78", "metadata": { "lines_to_next_cell": 0 }, @@ -348,7 +348,7 @@ { "cell_type": "code", "execution_count": null, - "id": "57e4a9d8", + "id": "a780bb5d", "metadata": { "lines_to_next_cell": 0 }, @@ -366,7 +366,7 @@ { "cell_type": "code", "execution_count": null, - "id": "4c7faff6", + "id": "f8eb72ca", "metadata": { "lines_to_next_cell": 0 }, @@ -385,7 +385,7 @@ }, { "cell_type": "markdown", - "id": "fdd5d9fa", + "id": "1099a9c3", "metadata": { "lines_to_next_cell": 0 }, @@ -402,7 +402,7 @@ { "cell_type": "code", "execution_count": null, - "id": "23740462", + "id": "b12d9778", "metadata": { "lines_to_next_cell": 0 }, @@ -416,7 +416,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f81b19cb", + "id": "2bd98725", "metadata": { "lines_to_next_cell": 0 }, @@ -434,7 +434,7 @@ { "cell_type": "code", "execution_count": null, - "id": "016049c9", + "id": "2d7acb49", "metadata": { "lines_to_next_cell": 0 }, @@ -453,7 +453,7 @@ }, { "cell_type": "markdown", - "id": "92ebd2ca", + "id": "23f3ef3a", "metadata": { "lines_to_next_cell": 0 }, @@ -492,7 +492,7 @@ { "cell_type": "code", "execution_count": null, - "id": "4e3b8469", + "id": "a7a8a64f", "metadata": { "lines_to_next_cell": 0 }, @@ -506,7 +506,7 @@ { "cell_type": "code", "execution_count": null, - "id": "09982978", + "id": "733e317f", "metadata": { "lines_to_next_cell": 0 }, @@ -523,7 +523,7 @@ }, { "cell_type": "markdown", - "id": "61964f5d", + "id": "26688170", "metadata": { "lines_to_next_cell": 0 }, @@ -587,7 +587,7 @@ }, { "cell_type": "markdown", - "id": "300e7514", + "id": "0947b42c", "metadata": { "lines_to_next_cell": 0 }, @@ -602,7 +602,7 @@ }, { "cell_type": "markdown", - "id": "6d1e51eb", + "id": "58c55d96", "metadata": { "lines_to_next_cell": 0 }, @@ -612,7 +612,7 @@ }, { "cell_type": "markdown", - "id": "114aad32", + "id": "9b19f82d", "metadata": { "lines_to_next_cell": 0 }, @@ -637,7 +637,7 @@ { "cell_type": "code", "execution_count": null, - "id": "803da3ba", + "id": "5eecd87e", "metadata": {}, "outputs": [], "source": [ @@ -647,7 +647,7 @@ { "cell_type": "code", "execution_count": null, - "id": "3ba7a910", + "id": "fe889ce3", "metadata": { "lines_to_next_cell": 0 }, @@ -660,7 +660,7 @@ }, { "cell_type": "markdown", - "id": "364f0f76", + "id": "b6932b2f", "metadata": { "lines_to_next_cell": 0 }, @@ -674,7 +674,7 @@ }, { "cell_type": "markdown", - "id": "02ae76e9", + "id": "0824d0ec", "metadata": { "lines_to_next_cell": 0 }, @@ -703,7 +703,7 @@ { "cell_type": "code", "execution_count": null, - "id": "23ba97e5", + "id": "37885557", "metadata": { "lines_to_next_cell": 2 }, @@ -714,7 +714,7 @@ }, { "cell_type": "markdown", - "id": "078f46ef", + "id": "544a605c", "metadata": { "lines_to_next_cell": 0 }, @@ -725,7 +725,7 @@ { "cell_type": "code", "execution_count": null, - "id": "0cf7712c", + "id": "580952d7", "metadata": { "lines_to_next_cell": 0 }, @@ -736,7 +736,7 @@ }, { "cell_type": "markdown", - "id": "373fffa4", + "id": "bb020d00", "metadata": { "lines_to_next_cell": 0 }, @@ -747,7 +747,7 @@ { "cell_type": "code", "execution_count": null, - "id": "5f829302", + "id": "1ecad234", "metadata": {}, "outputs": [], "source": [ @@ -757,7 +757,7 @@ { "cell_type": "code", "execution_count": null, - "id": "259cc877", + "id": "d9da7e6d", "metadata": {}, "outputs": [], "source": [] diff --git a/notebooks/training_classification.ipynb b/notebooks/training_classification.ipynb index b180838..4777543 100644 --- a/notebooks/training_classification.ipynb +++ b/notebooks/training_classification.ipynb @@ -3,17 +3,17 @@ { "cell_type": "code", "execution_count": null, - "id": "d7cc0e9e", + "id": "b69a7f7f", "metadata": {}, "outputs": [], "source": [ "# Uncomment this cell if running in Google Colab\n", - "!pip install clinicadl==1.3.0" + "!pip install clinicadl==1.6.1" ] }, { "cell_type": "markdown", - "id": "d88d11a5", + "id": "aab007d4", "metadata": {}, "source": [ "# Classification with a CNN on 2D slice\n", @@ -47,7 +47,7 @@ }, { "cell_type": "markdown", - "id": "b6ee3964", + "id": "017007cc", "metadata": {}, "source": [ "## 2D slice-level tensor extraction with the `prepare-data` pipeline\n", @@ -66,7 +66,7 @@ }, { "cell_type": "markdown", - "id": "36b66112", + "id": "bb91495d", "metadata": {}, "source": [ "You need to run the following command line:\n", @@ -88,7 +88,7 @@ }, { "cell_type": "markdown", - "id": "dae0cc82", + "id": "6a3842f5", "metadata": {}, "source": [ "Output files are stored into a new folder (inside the CAPS) and follows a\n", @@ -119,7 +119,7 @@ }, { "cell_type": "markdown", - "id": "59517908", + "id": "2e5c0d20", "metadata": {}, "source": [ "In short, there is a folder for each feature (**image**, **slice**, **roi** or **patch**)\n", @@ -140,7 +140,7 @@ }, { "cell_type": "markdown", - "id": "8afe75f9", + "id": "980b9dc8", "metadata": { "lines_to_next_cell": 2 }, @@ -166,7 +166,7 @@ }, { "cell_type": "markdown", - "id": "a658c564", + "id": "359a8bb3", "metadata": { "lines_to_next_cell": 0 }, @@ -180,7 +180,7 @@ { "cell_type": "code", "execution_count": null, - "id": "d9a2ca13", + "id": "71086e22", "metadata": {}, "outputs": [], "source": [ @@ -190,7 +190,7 @@ }, { "cell_type": "markdown", - "id": "af6447ec", + "id": "4c61e184", "metadata": { "lines_to_next_cell": 0 }, @@ -203,7 +203,7 @@ }, { "cell_type": "markdown", - "id": "6d21191c", + "id": "73a5f856", "metadata": { "lines_to_next_cell": 0 }, @@ -214,7 +214,7 @@ { "cell_type": "code", "execution_count": null, - "id": "46dfbe4f", + "id": "56e8cac6", "metadata": { "lines_to_next_cell": 0 }, @@ -225,7 +225,7 @@ }, { "cell_type": "markdown", - "id": "f618d903", + "id": "77d79286", "metadata": {}, "source": [ "At the end of this command, a new directory named `deeplearning_prepare_data`\n", @@ -237,7 +237,7 @@ { "cell_type": "code", "execution_count": null, - "id": "9d0e047a", + "id": "7e25a588", "metadata": { "lines_to_next_cell": 0 }, @@ -250,7 +250,7 @@ { "cell_type": "code", "execution_count": null, - "id": "3c190557", + "id": "4b1970aa", "metadata": {}, "outputs": [], "source": [ @@ -259,7 +259,7 @@ }, { "cell_type": "markdown", - "id": "524a2cbd", + "id": "3ce02af0", "metadata": {}, "source": [ "# Train your own models\n", @@ -276,7 +276,7 @@ { "cell_type": "code", "execution_count": null, - "id": "640cf991", + "id": "34f398dd", "metadata": {}, "outputs": [], "source": [ @@ -288,7 +288,7 @@ }, { "cell_type": "markdown", - "id": "a8e88ce3", + "id": "da6a03cf", "metadata": {}, "source": [ "\n", @@ -306,7 +306,7 @@ }, { "cell_type": "markdown", - "id": "c8644ec9", + "id": "6fc78011", "metadata": { "lines_to_next_cell": 2 }, @@ -322,7 +322,7 @@ }, { "cell_type": "markdown", - "id": "6feeaeba", + "id": "afc072e5", "metadata": { "lines_to_next_cell": 0 }, @@ -352,7 +352,7 @@ }, { "cell_type": "markdown", - "id": "7c8cd2a5", + "id": "6c91e43f", "metadata": { "lines_to_next_cell": 0 }, @@ -367,7 +367,7 @@ }, { "cell_type": "markdown", - "id": "62c37ef0", + "id": "8f15961c", "metadata": {}, "source": [ "### Running the task\n", @@ -407,7 +407,7 @@ }, { "cell_type": "markdown", - "id": "34653d78", + "id": "c87359e0", "metadata": {}, "source": [ "A few options depend on the classification task:\n", @@ -425,7 +425,7 @@ }, { "cell_type": "markdown", - "id": "78129c68", + "id": "0dafeb96", "metadata": {}, "source": [ "```{note}\n", @@ -439,7 +439,7 @@ }, { "cell_type": "markdown", - "id": "3c95b0e1", + "id": "1a5e369c", "metadata": { "lines_to_next_cell": 0 }, @@ -450,7 +450,7 @@ }, { "cell_type": "markdown", - "id": "8f3465c6", + "id": "e0e73e9d", "metadata": { "lines_to_next_cell": 2 }, @@ -465,7 +465,7 @@ { "cell_type": "code", "execution_count": null, - "id": "039dcf8d", + "id": "c7075e1b", "metadata": {}, "outputs": [], "source": [ @@ -477,7 +477,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f03daf42", + "id": "9646cb6b", "metadata": {}, "outputs": [], "source": [ @@ -487,7 +487,7 @@ }, { "cell_type": "markdown", - "id": "b7eb498b", + "id": "96b20cef", "metadata": {}, "source": [ "The `clinicadl train` command outputs a MAPS structure in which there are only\n", @@ -542,7 +542,7 @@ }, { "cell_type": "markdown", - "id": "393a246d", + "id": "86a4087e", "metadata": { "lines_to_next_cell": 0 }, @@ -555,7 +555,7 @@ { "cell_type": "code", "execution_count": null, - "id": "4a4651a0", + "id": "034921d8", "metadata": {}, "outputs": [], "source": [ @@ -566,7 +566,7 @@ { "cell_type": "code", "execution_count": null, - "id": "347a15bf", + "id": "85f0a372", "metadata": {}, "outputs": [], "source": [ @@ -576,7 +576,7 @@ }, { "cell_type": "markdown", - "id": "f50a61ad", + "id": "280b4cdf", "metadata": {}, "source": [ "If you failed to train the model, you also need to download the TSV files with \n", @@ -589,7 +589,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ed6813ac", + "id": "50b19197", "metadata": {}, "outputs": [], "source": [ @@ -599,7 +599,7 @@ }, { "cell_type": "markdown", - "id": "6f141575", + "id": "702ddfbc", "metadata": {}, "source": [ "The `predict` functionality performs individual prediction and metrics\n", @@ -611,7 +611,7 @@ }, { "cell_type": "markdown", - "id": "5c0d6a0d", + "id": "d9b61b42", "metadata": {}, "source": [ "### Running the task \n", @@ -640,7 +640,7 @@ { "cell_type": "code", "execution_count": null, - "id": "b27490f6", + "id": "5c4526ef", "metadata": {}, "outputs": [], "source": [ @@ -651,7 +651,7 @@ { "cell_type": "code", "execution_count": null, - "id": "dd9623f1", + "id": "5624b5a4", "metadata": {}, "outputs": [], "source": [ @@ -660,7 +660,7 @@ }, { "cell_type": "markdown", - "id": "122ba143", + "id": "f58757e9", "metadata": { "lines_to_next_cell": 0 }, @@ -689,7 +689,7 @@ { "cell_type": "code", "execution_count": null, - "id": "310c210c", + "id": "96793a96", "metadata": { "lines_to_next_cell": 0 }, @@ -703,7 +703,7 @@ { "cell_type": "code", "execution_count": null, - "id": "6e709720", + "id": "00783676", "metadata": {}, "outputs": [], "source": [] diff --git a/notebooks/training_reconstruction.ipynb b/notebooks/training_reconstruction.ipynb index aeb7c0d..c1eb75f 100644 --- a/notebooks/training_reconstruction.ipynb +++ b/notebooks/training_reconstruction.ipynb @@ -3,17 +3,17 @@ { "cell_type": "code", "execution_count": null, - "id": "dc7ebb47", + "id": "4a899113", "metadata": {}, "outputs": [], "source": [ "# Uncomment this cell if running in Google Colab\n", - "!pip install clinicadl==1.3.0" + "!pip install clinicadl==1.6.1" ] }, { "cell_type": "markdown", - "id": "45248f5f", + "id": "f881cf8b", "metadata": { "lines_to_next_cell": 2 }, @@ -55,7 +55,7 @@ }, { "cell_type": "markdown", - "id": "cc831c84", + "id": "c129139b", "metadata": { "lines_to_next_cell": 2 }, @@ -76,7 +76,7 @@ }, { "cell_type": "markdown", - "id": "6fcb41ee", + "id": "770cf607", "metadata": {}, "source": [ "## 3D patch-level tensor extraction with the `prepare-data` pipeline\n", @@ -161,7 +161,7 @@ }, { "cell_type": "markdown", - "id": "8d14dba3", + "id": "a3f382aa", "metadata": { "lines_to_next_cell": 0 }, @@ -173,7 +173,7 @@ { "cell_type": "code", "execution_count": null, - "id": "0ab11b73", + "id": "cf16b095", "metadata": { "lines_to_next_cell": 0 }, @@ -185,7 +185,7 @@ }, { "cell_type": "markdown", - "id": "285c67c9", + "id": "b427f11b", "metadata": { "lines_to_next_cell": 0 }, @@ -196,7 +196,7 @@ { "cell_type": "code", "execution_count": null, - "id": "b41f166b", + "id": "4c91a087", "metadata": { "lines_to_next_cell": 0 }, @@ -207,7 +207,7 @@ }, { "cell_type": "markdown", - "id": "fbfc0b98", + "id": "1146b556", "metadata": { "lines_to_next_cell": 0 }, @@ -219,7 +219,7 @@ { "cell_type": "code", "execution_count": null, - "id": "55b3e424", + "id": "0c317576", "metadata": {}, "outputs": [], "source": [ @@ -229,7 +229,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ce2157b9", + "id": "2521e2db", "metadata": { "lines_to_next_cell": 0 }, @@ -247,7 +247,7 @@ { "cell_type": "code", "execution_count": null, - "id": "1e690e07", + "id": "faf37224", "metadata": {}, "outputs": [], "source": [ @@ -257,7 +257,7 @@ }, { "cell_type": "markdown", - "id": "92edbfbe", + "id": "e27cd581", "metadata": { "lines_to_next_cell": 0 }, @@ -274,7 +274,7 @@ }, { "cell_type": "markdown", - "id": "5557be1e", + "id": "04d3e704", "metadata": {}, "source": [ "As for the 2D slice-level model, the gradient updates are done based on the\n", @@ -305,7 +305,7 @@ }, { "cell_type": "markdown", - "id": "7320fc03", + "id": "ecd4c355", "metadata": {}, "source": [ "## Before starting \n", @@ -321,7 +321,7 @@ { "cell_type": "code", "execution_count": null, - "id": "d3fe8821", + "id": "c8fb62a1", "metadata": { "lines_to_next_cell": 2 }, @@ -337,7 +337,7 @@ }, { "cell_type": "markdown", - "id": "3f6257e4", + "id": "c56bf4bb", "metadata": { "lines_to_next_cell": 0 }, @@ -357,7 +357,7 @@ }, { "cell_type": "markdown", - "id": "59580cec", + "id": "a153194c", "metadata": {}, "source": [ "## `clinicadl train RECONSTRUCTION` \n", @@ -371,7 +371,7 @@ }, { "cell_type": "markdown", - "id": "36598fca", + "id": "17d274b6", "metadata": {}, "source": [ "### Prerequisites\n", @@ -383,7 +383,7 @@ }, { "cell_type": "markdown", - "id": "81c5a014", + "id": "e546a2ab", "metadata": { "lines_to_next_cell": 0 }, @@ -425,7 +425,7 @@ }, { "cell_type": "markdown", - "id": "5bb3bc2a", + "id": "ad478cb3", "metadata": { "lines_to_next_cell": 2 }, @@ -440,7 +440,7 @@ }, { "cell_type": "markdown", - "id": "8ba8804c", + "id": "0e6b1ed7", "metadata": { "lines_to_next_cell": 0 }, @@ -452,7 +452,7 @@ { "cell_type": "code", "execution_count": null, - "id": "64d25350", + "id": "bb8bd424", "metadata": {}, "outputs": [], "source": [ @@ -462,7 +462,7 @@ }, { "cell_type": "markdown", - "id": "7c2ac389", + "id": "bbbf2d4c", "metadata": { "lines_to_next_cell": 0 }, @@ -475,7 +475,7 @@ { "cell_type": "code", "execution_count": null, - "id": "d9f76cd7", + "id": "0e424476", "metadata": { "lines_to_next_cell": 2 }, @@ -488,7 +488,7 @@ }, { "cell_type": "markdown", - "id": "7db30855", + "id": "bca3fab4", "metadata": { "lines_to_next_cell": 0 }, @@ -528,7 +528,7 @@ { "cell_type": "code", "execution_count": null, - "id": "7478bdfe", + "id": "1a591cde", "metadata": {}, "outputs": [], "source": [ @@ -539,7 +539,7 @@ { "cell_type": "code", "execution_count": null, - "id": "5c4c4036", + "id": "1aa8ee99", "metadata": { "lines_to_next_cell": 0 }, @@ -552,7 +552,7 @@ { "cell_type": "code", "execution_count": null, - "id": "7598116a", + "id": "2a951a22", "metadata": {}, "outputs": [], "source": [ @@ -562,7 +562,7 @@ }, { "cell_type": "markdown", - "id": "49e42f0b", + "id": "5dfcbc8a", "metadata": {}, "source": [ "The clinicadl train command outputs a MAPS structure in which there are only\n", @@ -616,7 +616,7 @@ }, { "cell_type": "markdown", - "id": "2538a07a", + "id": "15433f12", "metadata": { "lines_to_next_cell": 0 }, @@ -629,7 +629,7 @@ { "cell_type": "code", "execution_count": null, - "id": "e224ffd1", + "id": "9921192f", "metadata": {}, "outputs": [], "source": [ @@ -639,7 +639,7 @@ }, { "cell_type": "markdown", - "id": "40d2ca17", + "id": "c21f15c6", "metadata": {}, "source": [ "The `predict` functionality performs individual prediction and metrics\n", @@ -651,7 +651,7 @@ }, { "cell_type": "markdown", - "id": "50cc3171", + "id": "ffd0fbeb", "metadata": {}, "source": [ "### Running the task \n", @@ -688,7 +688,7 @@ { "cell_type": "code", "execution_count": null, - "id": "32804029", + "id": "daf8ab94", "metadata": {}, "outputs": [], "source": [ @@ -699,7 +699,7 @@ { "cell_type": "code", "execution_count": null, - "id": "34d8953c", + "id": "61e0c2d5", "metadata": { "lines_to_next_cell": 0 }, @@ -710,7 +710,7 @@ }, { "cell_type": "markdown", - "id": "f60e93a8", + "id": "ca4b6c16", "metadata": { "lines_to_next_cell": 0 }, @@ -738,7 +738,7 @@ { "cell_type": "code", "execution_count": null, - "id": "949977ea", + "id": "e3297b57", "metadata": {}, "outputs": [], "source": [ diff --git a/notebooks/training_regression.ipynb b/notebooks/training_regression.ipynb index 21d3395..269ce77 100644 --- a/notebooks/training_regression.ipynb +++ b/notebooks/training_regression.ipynb @@ -3,19 +3,19 @@ { "cell_type": "code", "execution_count": null, - "id": "456b62dd", + "id": "29b0f025", "metadata": { "lines_to_next_cell": 2 }, "outputs": [], "source": [ "# Uncomment this cell if running in Google Colab\n", - "!pip install clinicadl==1.3.0" + "!pip install clinicadl==1.6.1" ] }, { "cell_type": "markdown", - "id": "529c71d1", + "id": "811f01d9", "metadata": {}, "source": [ "# Regression with 3D images\n", @@ -30,7 +30,7 @@ }, { "cell_type": "markdown", - "id": "5fd3fa64", + "id": "23c3bd8f", "metadata": { "lines_to_next_cell": 0 }, @@ -65,7 +65,7 @@ }, { "cell_type": "markdown", - "id": "1c619de7", + "id": "7f5449db", "metadata": {}, "source": [ "\n", @@ -95,7 +95,7 @@ }, { "cell_type": "markdown", - "id": "1f70a897", + "id": "5840f27e", "metadata": { "lines_to_next_cell": 0 }, @@ -107,7 +107,7 @@ { "cell_type": "code", "execution_count": null, - "id": "29a797aa", + "id": "defa27bf", "metadata": { "lines_to_next_cell": 0 }, @@ -117,7 +117,7 @@ { "cell_type": "code", "execution_count": null, - "id": "d13f85d0", + "id": "e42d61d4", "metadata": { "lines_to_next_cell": 0 }, @@ -129,7 +129,7 @@ }, { "cell_type": "markdown", - "id": "9466aa23", + "id": "86948364", "metadata": { "lines_to_next_cell": 0 }, @@ -140,7 +140,7 @@ { "cell_type": "code", "execution_count": null, - "id": "6f04004f", + "id": "5ea2e180", "metadata": { "lines_to_next_cell": 0 }, @@ -151,7 +151,7 @@ }, { "cell_type": "markdown", - "id": "92ceff2d", + "id": "a35181c9", "metadata": {}, "source": [ "At the end of this command, a new directory named `deeplearning_prepare_data` is\n", @@ -162,7 +162,7 @@ { "cell_type": "code", "execution_count": null, - "id": "107e31e2", + "id": "246587b9", "metadata": { "lines_to_next_cell": 0 }, @@ -175,7 +175,7 @@ { "cell_type": "code", "execution_count": null, - "id": "46c2e69a", + "id": "217e7ef0", "metadata": {}, "outputs": [], "source": [ @@ -184,7 +184,7 @@ }, { "cell_type": "markdown", - "id": "ca3c0eb7", + "id": "3879ace9", "metadata": {}, "source": [ "ClinicaDL uses the `Conv5_FC3` convolutional network for inputs of type 3D\n", @@ -199,7 +199,7 @@ }, { "cell_type": "markdown", - "id": "167a0a39", + "id": "a4faba51", "metadata": {}, "source": [ "## Before starting \n", @@ -215,7 +215,7 @@ { "cell_type": "code", "execution_count": null, - "id": "78444b39", + "id": "eb1e7deb", "metadata": { "lines_to_next_cell": 0 }, @@ -230,7 +230,7 @@ }, { "cell_type": "markdown", - "id": "691fcb5f", + "id": "08b03053", "metadata": {}, "source": [ "\n", @@ -257,7 +257,7 @@ }, { "cell_type": "markdown", - "id": "581d610f", + "id": "c6427c2a", "metadata": {}, "source": [ "### Prerequisites\n", @@ -269,7 +269,7 @@ }, { "cell_type": "markdown", - "id": "25d9998a", + "id": "31deb774", "metadata": {}, "source": [ "### Running the task\n", @@ -309,7 +309,7 @@ }, { "cell_type": "markdown", - "id": "cb7b0522", + "id": "10dce722", "metadata": { "lines_to_next_cell": 2 }, @@ -326,7 +326,7 @@ }, { "cell_type": "markdown", - "id": "667c477f", + "id": "86fd63c0", "metadata": { "lines_to_next_cell": 0 }, @@ -339,7 +339,7 @@ { "cell_type": "code", "execution_count": null, - "id": "afc3b850", + "id": "b222641d", "metadata": {}, "outputs": [], "source": [ @@ -350,7 +350,7 @@ }, { "cell_type": "markdown", - "id": "38568ee2", + "id": "f12ba2ef", "metadata": {}, "source": [ "The clinicadl train command outputs a MAPS structure in which there are only two data groups: train and validation. \n", @@ -401,7 +401,7 @@ }, { "cell_type": "markdown", - "id": "48386608", + "id": "96fd50d4", "metadata": { "lines_to_next_cell": 0 }, @@ -415,7 +415,7 @@ { "cell_type": "code", "execution_count": null, - "id": "45ac7b3d", + "id": "fe98a938", "metadata": {}, "outputs": [], "source": [ @@ -425,7 +425,7 @@ }, { "cell_type": "markdown", - "id": "bcf3b494", + "id": "6a2bf357", "metadata": {}, "source": [ "The `predict` functionality performs individual prediction and metrics\n", @@ -437,7 +437,7 @@ }, { "cell_type": "markdown", - "id": "d3d58f9a", + "id": "c04a6ffb", "metadata": {}, "source": [ "### Running the task \n", @@ -463,7 +463,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f18d9a83", + "id": "1451b47d", "metadata": {}, "outputs": [], "source": [ @@ -473,7 +473,7 @@ }, { "cell_type": "markdown", - "id": "f05009f0", + "id": "c44dc188", "metadata": { "lines_to_next_cell": 0 }, @@ -500,7 +500,7 @@ { "cell_type": "code", "execution_count": null, - "id": "b372ae7c", + "id": "05675096", "metadata": { "lines_to_next_cell": 0 }, @@ -514,7 +514,7 @@ { "cell_type": "code", "execution_count": null, - "id": "616e6e46", + "id": "dc566247", "metadata": {}, "outputs": [], "source": []