Edit comment (#3759)
Browse files- utils/datasets.py +1 -1
utils/datasets.py
CHANGED
@@ -574,7 +574,7 @@ class LoadImagesAndLabels(Dataset): # for training/testing
|
|
574 |
labels_out[:, 1:] = torch.from_numpy(labels)
|
575 |
|
576 |
# Convert
|
577 |
-
img = img[:, :, ::-1].transpose(2, 0, 1) # BGR to RGB, to
|
578 |
img = np.ascontiguousarray(img)
|
579 |
|
580 |
return torch.from_numpy(img), labels_out, self.img_files[index], shapes
|
|
|
574 |
labels_out[:, 1:] = torch.from_numpy(labels)
|
575 |
|
576 |
# Convert
|
577 |
+
img = img[:, :, ::-1].transpose(2, 0, 1) # BGR to RGB, to 3 x img_height x img_width
|
578 |
img = np.ascontiguousarray(img)
|
579 |
|
580 |
return torch.from_numpy(img), labels_out, self.img_files[index], shapes
|