Update rsna-2023-abdominal-trauma-detection.py
Browse files
rsna-2023-abdominal-trauma-detection.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
-
import pandas as pd
|
2 |
import urllib
|
3 |
-
|
|
|
4 |
import datasets
|
5 |
|
6 |
|
@@ -296,26 +296,36 @@ class RSNA2023AbdominalTraumaDetectionSegmentation(datasets.GeneratorBasedBuilde
|
|
296 |
yield key, {
|
297 |
"img_path": img_path,
|
298 |
"seg_path": seg_path,
|
299 |
-
"bowel":
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
319 |
"any_injury": label_data["any_injury"],
|
320 |
"metadata": {
|
321 |
"series_id": series_id,
|
|
|
|
|
1 |
import urllib
|
2 |
+
import numpy as np
|
3 |
+
import pandas as pd
|
4 |
import datasets
|
5 |
|
6 |
|
|
|
296 |
yield key, {
|
297 |
"img_path": img_path,
|
298 |
"seg_path": seg_path,
|
299 |
+
"bowel": np.argmax(
|
300 |
+
[label_data["bowel_healthy"], label_data["bowel_injury"]]
|
301 |
+
),
|
302 |
+
"extravasation": np.argmax(
|
303 |
+
[
|
304 |
+
label_data["extravasation_healthy"],
|
305 |
+
label_data["extravasation_injury"],
|
306 |
+
]
|
307 |
+
),
|
308 |
+
"kidney": np.argmax(
|
309 |
+
[
|
310 |
+
label_data["kidney_healthy"],
|
311 |
+
label_data["kidney_low"],
|
312 |
+
label_data["kidney_high"],
|
313 |
+
]
|
314 |
+
),
|
315 |
+
"liver": np.argmax(
|
316 |
+
[
|
317 |
+
label_data["liver_healthy"],
|
318 |
+
label_data["liver_low"],
|
319 |
+
label_data["liver_high"],
|
320 |
+
]
|
321 |
+
),
|
322 |
+
"spleen": np.argmax(
|
323 |
+
[
|
324 |
+
label_data["spleen_healthy"],
|
325 |
+
label_data["spleen_low"],
|
326 |
+
label_data["spleen_high"],
|
327 |
+
]
|
328 |
+
),
|
329 |
"any_injury": label_data["any_injury"],
|
330 |
"metadata": {
|
331 |
"series_id": series_id,
|