1 parent
ae4261c774
commit
417a2f425c
1 file changed
+1
-1
+1
-1
@@ -574,7 +574,7 @@ class LoadImagesAndLabels(Dataset): # for training/testing
|
|||||||
labels_out[:, 1:] = torch.from_numpy(labels)
|
labels_out[:, 1:] = torch.from_numpy(labels)
|
||||||
|
|
||||||
# Convert
|
# Convert
|
||||||
img = img[:, :, ::-1].transpose(2, 0, 1) # BGR to RGB, to 3x416x416
|
img = img[:, :, ::-1].transpose(2, 0, 1) # BGR to RGB, to 3 x img_height x img_width
|
||||||
img = np.ascontiguousarray(img)
|
img = np.ascontiguousarray(img)
|
||||||
|
|
||||||
return torch.from_numpy(img), labels_out, self.img_files[index], shapes
|
return torch.from_numpy(img), labels_out, self.img_files[index], shapes
|
||||||
|
|||||||
Reference in new issue
Block a user