Revert "Fix BGR->RGB Bug in albumentations #8641 (#8695)"
This reverts commit 2e1291fdce.
This commit is contained in:
1 parent
d5116bbe9c
commit
c775a296a7
1 file changed
+2
-3
@@ -39,9 +39,8 @@ class Albumentations:
|
|||||||
|
|
||||||
def __call__(self, im, labels, p=1.0):
|
def __call__(self, im, labels, p=1.0):
|
||||||
if self.transform and random.random() < p:
|
if self.transform and random.random() < p:
|
||||||
new = self.transform(image=im[..., ::-1], bboxes=labels[:, 1:], class_labels=labels[:, 0]) # transformed
|
new = self.transform(image=im, bboxes=labels[:, 1:], class_labels=labels[:, 0]) # transformed
|
||||||
im = new['image'][..., ::-1] # RGB to BGR
|
im, labels = new['image'], np.array([[c, *b] for c, b in zip(new['class_labels'], new['bboxes'])])
|
||||||
labels = np.array([[c, *b] for c, b in zip(new['class_labels'], new['bboxes'])])
|
|
||||||
return im, labels
|
return im, labels
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user