Skip to content

Commit e9d6e66

Browse files
authored
Merge pull request #57 from BrainLesion/119_and_coverage
updated examples with 119 update from panoptica
2 parents 98e3fcf + e052e17 commit e9d6e66

5 files changed

Lines changed: 821 additions & 427 deletions

panoptica/example_config.ipynb

Lines changed: 23 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@
1616
},
1717
{
1818
"cell_type": "code",
19-
"execution_count": 1,
19+
"execution_count": 9,
2020
"metadata": {},
2121
"outputs": [
2222
{
2323
"name": "stdout",
2424
"output_type": "stream",
2525
"text": [
26-
"Requirement already satisfied: panoptica in /opt/anaconda3/envs/seg11panoptdev/lib/python3.11/site-packages (from -r requirements.txt (line 1)) (0.6.6.post13.dev0+a2f5dd3)\n",
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",
2727
"Requirement already satisfied: auxiliary in /opt/anaconda3/envs/seg11panoptdev/lib/python3.11/site-packages (from -r requirements.txt (line 2)) (0.0.42)\n",
2828
"Requirement already satisfied: rich in /opt/anaconda3/envs/seg11panoptdev/lib/python3.11/site-packages (from -r requirements.txt (line 3)) (13.6.0)\n",
2929
"Requirement already satisfied: numpy in /opt/anaconda3/envs/seg11panoptdev/lib/python3.11/site-packages (from -r requirements.txt (line 4)) (1.25.2)\n",
@@ -60,7 +60,7 @@
6060
},
6161
{
6262
"cell_type": "code",
63-
"execution_count": 2,
63+
"execution_count": 10,
6464
"metadata": {},
6565
"outputs": [],
6666
"source": [
@@ -90,7 +90,7 @@
9090
},
9191
{
9292
"cell_type": "code",
93-
"execution_count": 3,
93+
"execution_count": 11,
9494
"metadata": {},
9595
"outputs": [
9696
{
@@ -102,7 +102,7 @@
102102
" 106, 107, 108, 202, 203, 204, 205, 206, 207, 208], dtype=uint8))"
103103
]
104104
},
105-
"execution_count": 3,
105+
"execution_count": 11,
106106
"metadata": {},
107107
"output_type": "execute_result"
108108
}
@@ -124,74 +124,9 @@
124124
},
125125
{
126126
"cell_type": "code",
127-
"execution_count": 4,
127+
"execution_count": 12,
128128
"metadata": {},
129129
"outputs": [
130-
{
131-
"data": {
132-
"text/html": [
133-
"<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",
134-
"</pre>\n"
135-
],
136-
"text/plain": [
137-
"\u001b[92m────────────────────────────────────────── \u001b[0mThank you for using \u001b[1mpanoptica\u001b[0m\u001b[92m ──────────────────────────────────────────\u001b[0m\n"
138-
]
139-
},
140-
"metadata": {},
141-
"output_type": "display_data"
142-
},
143-
{
144-
"data": {
145-
"text/html": [
146-
"<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",
147-
"</pre>\n"
148-
],
149-
"text/plain": [
150-
" Please support our development by citing \n"
151-
]
152-
},
153-
"metadata": {},
154-
"output_type": "display_data"
155-
},
156-
{
157-
"data": {
158-
"text/html": [
159-
"<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",
160-
"</pre>\n"
161-
],
162-
"text/plain": [
163-
" \u001b[4;94mhttps://github.com/BrainLesion/panoptica#citation\u001b[0m -- Thank you! \n"
164-
]
165-
},
166-
"metadata": {},
167-
"output_type": "display_data"
168-
},
169-
{
170-
"data": {
171-
"text/html": [
172-
"<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",
173-
"</pre>\n"
174-
],
175-
"text/plain": [
176-
"\u001b[92m───────────────────────────────────────────────────────────────────────────────────────────────────────────────────\u001b[0m\n"
177-
]
178-
},
179-
"metadata": {},
180-
"output_type": "display_data"
181-
},
182-
{
183-
"data": {
184-
"text/html": [
185-
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">\n",
186-
"</pre>\n"
187-
],
188-
"text/plain": [
189-
"\n"
190-
]
191-
},
192-
"metadata": {},
193-
"output_type": "display_data"
194-
},
195130
{
196131
"name": "stdout",
197132
"output_type": "stream",
@@ -208,7 +143,7 @@
208143
" decision_threshold=0.5,\n",
209144
")\n",
210145
"\n",
211-
"result, debug_data = evaluator.evaluate(pred_masks, ref_masks)[\"ungrouped\"]"
146+
"result, intermediate_steps_data = evaluator.evaluate(pred_masks, ref_masks)[\"ungrouped\"]"
212147
]
213148
},
214149
{
@@ -221,7 +156,7 @@
221156
},
222157
{
223158
"cell_type": "code",
224-
"execution_count": 5,
159+
"execution_count": 13,
225160
"metadata": {},
226161
"outputs": [
227162
{
@@ -239,16 +174,13 @@
239174
"\n",
240175
"+++ GLOBAL +++\n",
241176
"Global Binary Dice (global_bin_dsc): 0.9744370224078394\n",
242-
"Global Binary Centerline Dice (global_bin_cldsc): 0.9637064011802574\n",
243-
"Global Binary Average Symmetric Surface Distance (global_bin_assd): 0.1499152780072207\n",
244-
"Global Binary Relative Volume Difference (global_bin_rvd): -0.0006011763989268869\n",
245177
"\n",
246178
"+++ INSTANCE +++\n",
247179
"Segmentation Quality IoU (sq): 0.8328184295330796 +- 0.15186064004517466\n",
248180
"Panoptic Quality IoU (pq): 0.8328184295330796\n",
249181
"Segmentation Quality Dsc (sq_dsc): 0.900292616009954 +- 0.10253566174957332\n",
250182
"Panoptic Quality Dsc (pq_dsc): 0.900292616009954\n",
251-
"Segmentation Quality Assd (sq_assd): 0.250331887879225 +- 0.07696680402317076\n",
183+
"Segmentation Quality ASSD (sq_assd): 0.250331887879225 +- 0.07696680402317076\n",
252184
"Segmentation Quality Relative Volume Difference (sq_rvd): 0.0028133049062930553 +- 0.034518928495505724\n",
253185
"\n"
254186
]
@@ -270,14 +202,14 @@
270202
},
271203
{
272204
"cell_type": "code",
273-
"execution_count": 6,
205+
"execution_count": 14,
274206
"metadata": {},
275207
"outputs": [
276208
{
277209
"name": "stdout",
278210
"output_type": "stream",
279211
"text": [
280-
"Saved config into /opt/anaconda3/envs/seg11panoptdev/lib/python3.11/site-packages/panoptica/test_config.yaml\n"
212+
"Saved config into /DATA/NAS/ongoing_projects/hendrik/panoptica/repo/panoptica/test_config.yaml\n"
281213
]
282214
}
283215
],
@@ -306,14 +238,14 @@
306238
},
307239
{
308240
"cell_type": "code",
309-
"execution_count": 7,
241+
"execution_count": 15,
310242
"metadata": {},
311243
"outputs": [
312244
{
313245
"name": "stdout",
314246
"output_type": "stream",
315247
"text": [
316-
"<panoptica.panoptica_evaluator.Panoptica_Evaluator object at 0x7fbe999a9c90>\n"
248+
"<panoptica.panoptica_evaluator.Panoptica_Evaluator object at 0x7f05ac7b80d0>\n"
317249
]
318250
}
319251
],
@@ -324,7 +256,7 @@
324256
},
325257
{
326258
"cell_type": "code",
327-
"execution_count": 8,
259+
"execution_count": 16,
328260
"metadata": {},
329261
"outputs": [
330262
{
@@ -335,26 +267,23 @@
335267
"-- Got MatchedInstancePair, will evaluate instances\n",
336268
"\n",
337269
"+++ MATCHING +++\n",
338-
"Number of instances in reference (num_ref_instances): 22\n",
339-
"Number of instances in prediction (num_pred_instances): 22\n",
340-
"True Positives (tp): 22\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",
341273
"False Positives (fp): 0\n",
342274
"False Negatives (fn): 0\n",
343275
"Recognition Quality / F1-Score (rq): 1.0\n",
344276
"\n",
345277
"+++ GLOBAL +++\n",
346278
"Global Binary Dice (global_bin_dsc): 0.9744370224078394\n",
347-
"Global Binary Centerline Dice (global_bin_cldsc): 0.9637064011802574\n",
348-
"Global Binary Average Symmetric Surface Distance (global_bin_assd): 0.1499152780072207\n",
349-
"Global Binary Relative Volume Difference (global_bin_rvd): -0.0006011763989268869\n",
350279
"\n",
351280
"+++ INSTANCE +++\n",
352-
"Segmentation Quality IoU (sq): 0.8328184295330796 +- 0.15186064004517466\n",
353-
"Panoptic Quality IoU (pq): 0.8328184295330796\n",
354-
"Segmentation Quality Dsc (sq_dsc): 0.900292616009954 +- 0.10253566174957332\n",
355-
"Panoptic Quality Dsc (pq_dsc): 0.900292616009954\n",
356-
"Segmentation Quality Assd (sq_assd): 0.250331887879225 +- 0.07696680402317076\n",
357-
"Segmentation Quality Relative Volume Difference (sq_rvd): 0.0028133049062930553 +- 0.034518928495505724\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",
358287
"\n"
359288
]
360289
}

0 commit comments

Comments
 (0)