Update AeroPath.py
Browse files- AeroPath.py +4 -0
AeroPath.py
CHANGED
@@ -149,7 +149,11 @@ class AeroPath(datasets.GeneratorBasedBuilder):
|
|
149 |
def _generate_examples(self, split):
|
150 |
# TODO: This method handles input defined in _split_generators to yield (key, example) tuples from the dataset.
|
151 |
# The `key` is for legacy reasons (tfds) and is not important in itself, but must be unique for each example.
|
|
|
|
|
152 |
for patient_id in os.listdir(self.DATA_DIR):
|
|
|
|
|
153 |
curr_path = os.path.join(self.DATA_DIR, patient_id)
|
154 |
yield patient_id, {
|
155 |
"ct": os.path.join(curr_path, patient_id, "_CT_HR.nii.gz"),
|
|
|
149 |
def _generate_examples(self, split):
|
150 |
# TODO: This method handles input defined in _split_generators to yield (key, example) tuples from the dataset.
|
151 |
# The `key` is for legacy reasons (tfds) and is not important in itself, but must be unique for each example.
|
152 |
+
self.DATA_DIR = os.path.join(self.DATA_DIR, "../")
|
153 |
+
print("new data dir:", self.DATA_DIR)
|
154 |
for patient_id in os.listdir(self.DATA_DIR):
|
155 |
+
print("self.DATA_DIR:", self.DATA_DIR)
|
156 |
+
print("patient_id:", patient_id)
|
157 |
curr_path = os.path.join(self.DATA_DIR, patient_id)
|
158 |
yield patient_id, {
|
159 |
"ct": os.path.join(curr_path, patient_id, "_CT_HR.nii.gz"),
|