Revert "Fix BGR->RGB Bug in albumentations #8641" (#8727)
Browse filesRevert "Fix BGR->RGB Bug in albumentations #8641 (#8695)"
This reverts commit 2e1291fdce26b3cff213e9e7ee8c196fa263b688.
- utils/augmentations.py +2 -3
utils/augmentations.py
CHANGED
@@ -39,9 +39,8 @@ class Albumentations:
|
|
39 |
|
40 |
def __call__(self, im, labels, p=1.0):
|
41 |
if self.transform and random.random() < p:
|
42 |
-
new = self.transform(image=im
|
43 |
-
im = new['image'][
|
44 |
-
labels = np.array([[c, *b] for c, b in zip(new['class_labels'], new['bboxes'])])
|
45 |
return im, labels
|
46 |
|
47 |
|
|
|
39 |
|
40 |
def __call__(self, im, labels, p=1.0):
|
41 |
if self.transform and random.random() < p:
|
42 |
+
new = self.transform(image=im, bboxes=labels[:, 1:], class_labels=labels[:, 0]) # transformed
|
43 |
+
im, labels = new['image'], np.array([[c, *b] for c, b in zip(new['class_labels'], new['bboxes'])])
|
|
|
44 |
return im, labels
|
45 |
|
46 |
|