|
77 | 77 | "!pip3 install --upgrade idc-index wsidicom openslide-python openslide-bin" |
78 | 78 | ] |
79 | 79 | }, |
80 | | - { |
81 | | - "cell_type": "markdown", |
82 | | - "metadata": { |
83 | | - "id": "Yd2ni-8D16TQ" |
84 | | - }, |
85 | | - "source": [ |
86 | | - "**Clone utility code:** We provide some utility code for more complex operations, which is also available open source along with this notebook. In the cell below, the code is cloned to the current Colaboratory instance." |
87 | | - ] |
88 | | - }, |
89 | | - { |
90 | | - "cell_type": "code", |
91 | | - "execution_count": null, |
92 | | - "metadata": { |
93 | | - "colab": { |
94 | | - "base_uri": "https://localhost:8080/" |
95 | | - }, |
96 | | - "id": "vd-PJ23N2GRT", |
97 | | - "outputId": "c3ca9bb8-474e-46a3-b1a7-1753d96ff3c4" |
98 | | - }, |
99 | | - "outputs": [], |
100 | | - "source": [ |
101 | | - "!git clone https://github.com/ImagingDataCommons/IDC-Tutorials.git" |
102 | | - ] |
103 | | - }, |
104 | 80 | { |
105 | 81 | "cell_type": "markdown", |
106 | 82 | "metadata": { |
|
135 | 111 | "sns.set_theme()\n", |
136 | 112 | "from PIL import Image\n", |
137 | 113 | "from tqdm.auto import tqdm\n", |
138 | | - "from IPython.display import IFrame\n", |
139 | | - "\n", |
140 | | - "# Load utility code\n", |
141 | | - "import sys\n", |
142 | | - "sys.path.append('/content/IDC-Tutorials/notebooks/labs/')\n", |
143 | | - "from idc_isbi2024_utils.utils import create_slides_metadata\n", |
144 | | - "from idc_isbi2024_utils.batch_iterator import BatchIterator\n", |
145 | | - "from idc_isbi2024_utils.predictions import Predictions\n", |
146 | | - "from idc_isbi2024_utils.heatmap import plot_colormap_legend, generate_heatmap\n", |
147 | | - "from idc_isbi2024_utils.global_variables import CLASS_LABEL_TO_INDEX_MAP" |
| 114 | + "from IPython.display import IFrame" |
148 | 115 | ] |
149 | 116 | }, |
150 | 117 | { |
|
1779 | 1746 | "The TCGA-trained model that we use here was made available open source as part of the publication [The NCI Imaging Data Commons as a platform for reproducible research in computational pathology](https://doi.org/10.1016/j.cmpb.2023.107839). The specific model used here is a demo version, meaning that it was trained using slides at reduced magnification (pixel spacing of 0.002 mm/px instead of 0.001 mm/px) and will thus also be applied to slides at this resolution. The model is available as Github release asset and can be retrieved via curl." |
1780 | 1747 | ] |
1781 | 1748 | }, |
| 1749 | + { |
| 1750 | + "cell_type": "markdown", |
| 1751 | + "metadata": {}, |
| 1752 | + "source": [ |
| 1753 | + "**Clone utility code:** We provide some utility code for more complex operations, that we need here. It is also available open source along with this notebook. In the cell below, the code is cloned to the current Colaboratory instance." |
| 1754 | + ] |
| 1755 | + }, |
| 1756 | + { |
| 1757 | + "cell_type": "code", |
| 1758 | + "execution_count": null, |
| 1759 | + "metadata": {}, |
| 1760 | + "outputs": [], |
| 1761 | + "source": [ |
| 1762 | + "!git clone https://github.com/ImagingDataCommons/IDC-Tutorials.git" |
| 1763 | + ] |
| 1764 | + }, |
| 1765 | + { |
| 1766 | + "cell_type": "code", |
| 1767 | + "execution_count": null, |
| 1768 | + "metadata": {}, |
| 1769 | + "outputs": [], |
| 1770 | + "source": [ |
| 1771 | + "# Load utility code\n", |
| 1772 | + "import tensorflow as tf \n", |
| 1773 | + "import sys\n", |
| 1774 | + "sys.path.append('/content/IDC-Tutorials/notebooks/labs/')\n", |
| 1775 | + "from idc_isbi2024_utils.utils import create_slides_metadata\n", |
| 1776 | + "from idc_isbi2024_utils.batch_iterator import BatchIterator\n", |
| 1777 | + "from idc_isbi2024_utils.predictions import Predictions\n", |
| 1778 | + "from idc_isbi2024_utils.heatmap import plot_colormap_legend, generate_heatmap\n", |
| 1779 | + "from idc_isbi2024_utils.global_variables import CLASS_LABEL_TO_INDEX_MAP" |
| 1780 | + ] |
| 1781 | + }, |
1782 | 1782 | { |
1783 | 1783 | "cell_type": "markdown", |
1784 | 1784 | "metadata": { |
|
0 commit comments