Einstellung
commited on
Commit
·
cbe2bf8
1
Parent(s):
73eaf1d
Cast image_feature['report'] to str
Browse files- CXR_Reports.py +6 -2
CXR_Reports.py
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
import tensorflow as tf
|
|
|
2 |
import datasets
|
3 |
|
4 |
|
@@ -50,6 +51,9 @@ class ReportsCXR(datasets.GeneratorBasedBuilder):
|
|
50 |
print(f"image type {type(image_features['image'])}")
|
51 |
print(f"report type {type(image_features['report'])}")
|
52 |
image_raw = image_features['image'].numpy()
|
53 |
-
print("image_raw
|
54 |
-
|
|
|
|
|
|
|
55 |
|
|
|
1 |
import tensorflow as tf
|
2 |
+
import numpy as np
|
3 |
import datasets
|
4 |
|
5 |
|
|
|
51 |
print(f"image type {type(image_features['image'])}")
|
52 |
print(f"report type {type(image_features['report'])}")
|
53 |
image_raw = image_features['image'].numpy()
|
54 |
+
print(f"image_raw type {type(image_raw)}")
|
55 |
+
str_report = np.array2string(image_features['report'].numpy())
|
56 |
+
print(f"str_report type {type(str_report)}")
|
57 |
+
yield {'image': {"path":"", "bytes": image_raw}, 'report': str_report}
|
58 |
+
|
59 |
|