Update Populus_Stomatal_Images_Datasets.py
Browse files
Populus_Stomatal_Images_Datasets.py
CHANGED
|
@@ -179,7 +179,7 @@ class NewDataset(datasets.GeneratorBasedBuilder):
|
|
| 179 |
|
| 180 |
pics_array = None
|
| 181 |
with Image.open(image_path) as img:
|
| 182 |
-
pics_array = np.array(img)
|
| 183 |
|
| 184 |
annotations = self._parse_yolo_labels(label_path, width, height)
|
| 185 |
|
|
|
|
| 179 |
|
| 180 |
pics_array = None
|
| 181 |
with Image.open(image_path) as img:
|
| 182 |
+
pics_array = np.array(img) # Convert the PIL image to a numpy array and then to a list
|
| 183 |
|
| 184 |
annotations = self._parse_yolo_labels(label_path, width, height)
|
| 185 |
|