|
16 | 16 | }, |
17 | 17 | { |
18 | 18 | "cell_type": "code", |
19 | | - "execution_count": 9, |
| 19 | + "execution_count": 1, |
20 | 20 | "metadata": {}, |
21 | | - "outputs": [ |
22 | | - { |
23 | | - "name": "stdout", |
24 | | - "output_type": "stream", |
25 | | - "text": [ |
26 | | - "Requirement already satisfied: panoptica in /opt/anaconda3/envs/seg11panoptdev/lib/python3.11/site-packages (from -r requirements.txt (line 1)) (1.0.0.post2.dev0+2f7d01f)\n", |
27 | | - "Requirement already satisfied: auxiliary in /opt/anaconda3/envs/seg11panoptdev/lib/python3.11/site-packages (from -r requirements.txt (line 2)) (0.0.42)\n", |
28 | | - "Requirement already satisfied: rich in /opt/anaconda3/envs/seg11panoptdev/lib/python3.11/site-packages (from -r requirements.txt (line 3)) (13.6.0)\n", |
29 | | - "Requirement already satisfied: numpy in /opt/anaconda3/envs/seg11panoptdev/lib/python3.11/site-packages (from -r requirements.txt (line 4)) (1.25.2)\n", |
30 | | - "Requirement already satisfied: connected-components-3d<4.0.0,>=3.12.3 in /opt/anaconda3/envs/seg11panoptdev/lib/python3.11/site-packages (from panoptica->-r requirements.txt (line 1)) (3.12.3)\n", |
31 | | - "Requirement already satisfied: ruamel.yaml<0.19.0,>=0.18.6 in /opt/anaconda3/envs/seg11panoptdev/lib/python3.11/site-packages (from panoptica->-r requirements.txt (line 1)) (0.18.6)\n", |
32 | | - "Requirement already satisfied: scikit-image<0.23.0,>=0.22.0 in /opt/anaconda3/envs/seg11panoptdev/lib/python3.11/site-packages (from panoptica->-r requirements.txt (line 1)) (0.22.0)\n", |
33 | | - "Requirement already satisfied: scipy<2.0.0,>=1.7.0 in /opt/anaconda3/envs/seg11panoptdev/lib/python3.11/site-packages (from panoptica->-r requirements.txt (line 1)) (1.11.2)\n", |
34 | | - "Requirement already satisfied: nibabel>=3.0 in /opt/anaconda3/envs/seg11panoptdev/lib/python3.11/site-packages (from auxiliary->-r requirements.txt (line 2)) (5.1.0)\n", |
35 | | - "Requirement already satisfied: path>=16.10.0 in /opt/anaconda3/envs/seg11panoptdev/lib/python3.11/site-packages (from auxiliary->-r requirements.txt (line 2)) (17.0.0)\n", |
36 | | - "Requirement already satisfied: pathlib>=1.0 in /opt/anaconda3/envs/seg11panoptdev/lib/python3.11/site-packages (from auxiliary->-r requirements.txt (line 2)) (1.0.1)\n", |
37 | | - "Requirement already satisfied: pillow>=10.0.0 in /opt/anaconda3/envs/seg11panoptdev/lib/python3.11/site-packages (from auxiliary->-r requirements.txt (line 2)) (10.0.0)\n", |
38 | | - "Requirement already satisfied: tifffile>=2023.8.25 in /opt/anaconda3/envs/seg11panoptdev/lib/python3.11/site-packages (from auxiliary->-r requirements.txt (line 2)) (2023.8.30)\n", |
39 | | - "Requirement already satisfied: markdown-it-py>=2.2.0 in /opt/anaconda3/envs/seg11panoptdev/lib/python3.11/site-packages (from rich->-r requirements.txt (line 3)) (3.0.0)\n", |
40 | | - "Requirement already satisfied: pygments<3.0.0,>=2.13.0 in /opt/anaconda3/envs/seg11panoptdev/lib/python3.11/site-packages (from rich->-r requirements.txt (line 3)) (2.17.2)\n", |
41 | | - "Requirement already satisfied: mdurl~=0.1 in /opt/anaconda3/envs/seg11panoptdev/lib/python3.11/site-packages (from markdown-it-py>=2.2.0->rich->-r requirements.txt (line 3)) (0.1.2)\n", |
42 | | - "Requirement already satisfied: packaging>=17 in /opt/anaconda3/envs/seg11panoptdev/lib/python3.11/site-packages (from nibabel>=3.0->auxiliary->-r requirements.txt (line 2)) (23.1)\n", |
43 | | - "Requirement already satisfied: ruamel.yaml.clib>=0.2.7 in /opt/anaconda3/envs/seg11panoptdev/lib/python3.11/site-packages (from ruamel.yaml<0.19.0,>=0.18.6->panoptica->-r requirements.txt (line 1)) (0.2.8)\n", |
44 | | - "Requirement already satisfied: networkx>=2.8 in /opt/anaconda3/envs/seg11panoptdev/lib/python3.11/site-packages (from scikit-image<0.23.0,>=0.22.0->panoptica->-r requirements.txt (line 1)) (3.1)\n", |
45 | | - "Requirement already satisfied: imageio>=2.27 in /opt/anaconda3/envs/seg11panoptdev/lib/python3.11/site-packages (from scikit-image<0.23.0,>=0.22.0->panoptica->-r requirements.txt (line 1)) (2.31.3)\n", |
46 | | - "Requirement already satisfied: lazy_loader>=0.3 in /opt/anaconda3/envs/seg11panoptdev/lib/python3.11/site-packages (from scikit-image<0.23.0,>=0.22.0->panoptica->-r requirements.txt (line 1)) (0.3)\n" |
47 | | - ] |
48 | | - } |
49 | | - ], |
| 21 | + "outputs": [], |
50 | 22 | "source": [ |
51 | | - "!pip install -r requirements.txt" |
| 23 | + "!pip install -r requirements.txt > /dev/null" |
52 | 24 | ] |
53 | 25 | }, |
54 | 26 | { |
|
60 | 32 | }, |
61 | 33 | { |
62 | 34 | "cell_type": "code", |
63 | | - "execution_count": 10, |
| 35 | + "execution_count": 2, |
64 | 36 | "metadata": {}, |
65 | | - "outputs": [], |
| 37 | + "outputs": [ |
| 38 | + { |
| 39 | + "name": "stdout", |
| 40 | + "output_type": "stream", |
| 41 | + "text": [ |
| 42 | + "No module named 'pandas'\n", |
| 43 | + "OPTIONAL PACKAGE MISSING\n" |
| 44 | + ] |
| 45 | + } |
| 46 | + ], |
66 | 47 | "source": [ |
67 | 48 | "import numpy as np\n", |
68 | 49 | "from auxiliary.nifti.io import read_nifti\n", |
|
90 | 71 | }, |
91 | 72 | { |
92 | 73 | "cell_type": "code", |
93 | | - "execution_count": 11, |
| 74 | + "execution_count": 3, |
94 | 75 | "metadata": {}, |
95 | 76 | "outputs": [ |
96 | 77 | { |
|
102 | 83 | " 106, 107, 108, 202, 203, 204, 205, 206, 207, 208], dtype=uint8))" |
103 | 84 | ] |
104 | 85 | }, |
105 | | - "execution_count": 11, |
| 86 | + "execution_count": 3, |
106 | 87 | "metadata": {}, |
107 | 88 | "output_type": "execute_result" |
108 | 89 | } |
|
124 | 105 | }, |
125 | 106 | { |
126 | 107 | "cell_type": "code", |
127 | | - "execution_count": 12, |
| 108 | + "execution_count": 4, |
128 | 109 | "metadata": {}, |
129 | 110 | "outputs": [ |
| 111 | + { |
| 112 | + "data": { |
| 113 | + "text/html": [ |
| 114 | + "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #00ff00; text-decoration-color: #00ff00\">────────────────────────────────────────── </span>Thank you for using <span style=\"font-weight: bold\">panoptica</span><span style=\"color: #00ff00; text-decoration-color: #00ff00\"> ──────────────────────────────────────────</span>\n", |
| 115 | + "</pre>\n" |
| 116 | + ], |
| 117 | + "text/plain": [ |
| 118 | + "\u001b[92m────────────────────────────────────────── \u001b[0mThank you for using \u001b[1mpanoptica\u001b[0m\u001b[92m ──────────────────────────────────────────\u001b[0m\n" |
| 119 | + ] |
| 120 | + }, |
| 121 | + "metadata": {}, |
| 122 | + "output_type": "display_data" |
| 123 | + }, |
| 124 | + { |
| 125 | + "data": { |
| 126 | + "text/html": [ |
| 127 | + "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"> Please support our development by citing \n", |
| 128 | + "</pre>\n" |
| 129 | + ], |
| 130 | + "text/plain": [ |
| 131 | + " Please support our development by citing \n" |
| 132 | + ] |
| 133 | + }, |
| 134 | + "metadata": {}, |
| 135 | + "output_type": "display_data" |
| 136 | + }, |
| 137 | + { |
| 138 | + "data": { |
| 139 | + "text/html": [ |
| 140 | + "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"> <span style=\"color: #0000ff; text-decoration-color: #0000ff; text-decoration: underline\">https://github.com/BrainLesion/panoptica#citation</span> -- Thank you! \n", |
| 141 | + "</pre>\n" |
| 142 | + ], |
| 143 | + "text/plain": [ |
| 144 | + " \u001b[4;94mhttps://github.com/BrainLesion/panoptica#citation\u001b[0m -- Thank you! \n" |
| 145 | + ] |
| 146 | + }, |
| 147 | + "metadata": {}, |
| 148 | + "output_type": "display_data" |
| 149 | + }, |
| 150 | + { |
| 151 | + "data": { |
| 152 | + "text/html": [ |
| 153 | + "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #00ff00; text-decoration-color: #00ff00\">───────────────────────────────────────────────────────────────────────────────────────────────────────────────────</span>\n", |
| 154 | + "</pre>\n" |
| 155 | + ], |
| 156 | + "text/plain": [ |
| 157 | + "\u001b[92m───────────────────────────────────────────────────────────────────────────────────────────────────────────────────\u001b[0m\n" |
| 158 | + ] |
| 159 | + }, |
| 160 | + "metadata": {}, |
| 161 | + "output_type": "display_data" |
| 162 | + }, |
| 163 | + { |
| 164 | + "data": { |
| 165 | + "text/html": [ |
| 166 | + "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">\n", |
| 167 | + "</pre>\n" |
| 168 | + ], |
| 169 | + "text/plain": [ |
| 170 | + "\n" |
| 171 | + ] |
| 172 | + }, |
| 173 | + "metadata": {}, |
| 174 | + "output_type": "display_data" |
| 175 | + }, |
130 | 176 | { |
131 | 177 | "name": "stdout", |
132 | 178 | "output_type": "stream", |
|
156 | 202 | }, |
157 | 203 | { |
158 | 204 | "cell_type": "code", |
159 | | - "execution_count": 13, |
| 205 | + "execution_count": 5, |
160 | 206 | "metadata": {}, |
161 | 207 | "outputs": [ |
162 | 208 | { |
|
202 | 248 | }, |
203 | 249 | { |
204 | 250 | "cell_type": "code", |
205 | | - "execution_count": 14, |
| 251 | + "execution_count": 6, |
206 | 252 | "metadata": {}, |
207 | 253 | "outputs": [ |
208 | 254 | { |
209 | 255 | "name": "stdout", |
210 | 256 | "output_type": "stream", |
211 | 257 | "text": [ |
212 | | - "Saved config into /DATA/NAS/ongoing_projects/hendrik/panoptica/repo/panoptica/test_config.yaml\n" |
| 258 | + "Saved config into /home/marcelrosier/miniconda3/envs/tutorials/lib/python3.10/site-packages/panoptica/test_config.yaml\n" |
213 | 259 | ] |
214 | 260 | } |
215 | 261 | ], |
|
238 | 284 | }, |
239 | 285 | { |
240 | 286 | "cell_type": "code", |
241 | | - "execution_count": 15, |
| 287 | + "execution_count": 7, |
242 | 288 | "metadata": {}, |
243 | 289 | "outputs": [ |
244 | 290 | { |
245 | 291 | "name": "stdout", |
246 | 292 | "output_type": "stream", |
247 | 293 | "text": [ |
248 | | - "<panoptica.panoptica_evaluator.Panoptica_Evaluator object at 0x7f05ac7b80d0>\n" |
| 294 | + "<panoptica.panoptica_evaluator.Panoptica_Evaluator object at 0x757bd6c23550>\n" |
249 | 295 | ] |
250 | 296 | } |
251 | 297 | ], |
|
256 | 302 | }, |
257 | 303 | { |
258 | 304 | "cell_type": "code", |
259 | | - "execution_count": 16, |
| 305 | + "execution_count": 8, |
260 | 306 | "metadata": {}, |
261 | 307 | "outputs": [ |
262 | 308 | { |
|
267 | 313 | "-- Got MatchedInstancePair, will evaluate instances\n", |
268 | 314 | "\n", |
269 | 315 | "+++ MATCHING +++\n", |
270 | | - "Number of instances in reference (num_ref_instances): 1\n", |
271 | | - "Number of instances in prediction (num_pred_instances): 1\n", |
272 | | - "True Positives (tp): 1\n", |
| 316 | + "Number of instances in reference (num_ref_instances): 22\n", |
| 317 | + "Number of instances in prediction (num_pred_instances): 22\n", |
| 318 | + "True Positives (tp): 22\n", |
273 | 319 | "False Positives (fp): 0\n", |
274 | 320 | "False Negatives (fn): 0\n", |
275 | 321 | "Recognition Quality / F1-Score (rq): 1.0\n", |
|
278 | 324 | "Global Binary Dice (global_bin_dsc): 0.9744370224078394\n", |
279 | 325 | "\n", |
280 | 326 | "+++ INSTANCE +++\n", |
281 | | - "Segmentation Quality IoU (sq): 0.9501484001456879 +- 0.0\n", |
282 | | - "Panoptic Quality IoU (pq): 0.9501484001456879\n", |
283 | | - "Segmentation Quality Dsc (sq_dsc): 0.9744370224078394 +- 0.0\n", |
284 | | - "Panoptic Quality Dsc (pq_dsc): 0.9744370224078394\n", |
285 | | - "Segmentation Quality ASSD (sq_assd): 0.1499152780072207 +- 0.0\n", |
286 | | - "Segmentation Quality Relative Volume Difference (sq_rvd): -0.0006011763989268869 +- 0.0\n", |
| 327 | + "Segmentation Quality IoU (sq): 0.8328184295330796 +- 0.15186064004517466\n", |
| 328 | + "Panoptic Quality IoU (pq): 0.8328184295330796\n", |
| 329 | + "Segmentation Quality Dsc (sq_dsc): 0.900292616009954 +- 0.10253566174957332\n", |
| 330 | + "Panoptic Quality Dsc (pq_dsc): 0.900292616009954\n", |
| 331 | + "Segmentation Quality ASSD (sq_assd): 0.250331887879225 +- 0.07696680402317076\n", |
| 332 | + "Segmentation Quality Relative Volume Difference (sq_rvd): 0.0028133049062930553 +- 0.034518928495505724\n", |
287 | 333 | "\n" |
288 | 334 | ] |
289 | 335 | } |
|
293 | 339 | "result, debug_data = evaluator.evaluate(pred_masks, ref_masks)[\"ungrouped\"]\n", |
294 | 340 | "print(result) # yields same results as the evaluator object manually constructed" |
295 | 341 | ] |
296 | | - }, |
297 | | - { |
298 | | - "cell_type": "code", |
299 | | - "execution_count": null, |
300 | | - "metadata": {}, |
301 | | - "outputs": [], |
302 | | - "source": [] |
303 | 342 | } |
304 | 343 | ], |
305 | 344 | "metadata": { |
|
318 | 357 | "name": "python", |
319 | 358 | "nbconvert_exporter": "python", |
320 | 359 | "pygments_lexer": "ipython3", |
321 | | - "version": "3.11.6" |
| 360 | + "version": "3.10.14" |
322 | 361 | } |
323 | 362 | }, |
324 | 363 | "nbformat": 4, |
|
0 commit comments