Skip to content

Commit

Permalink
Merge pull request #376 from WongGawa/cls_reshape
Browse files Browse the repository at this point in the history
fix difference bewtween high version albumentations
  • Loading branch information
CaitinZhao authored Oct 18, 2024
2 parents 5e86022 + af27b75 commit dfe6041
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mindyolo/data/albumentations.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ def __call__(self, sample, p=1.0, **kwargs):
new = self.transform(image=im, bboxes=bboxes, class_labels=cls) # transformed

sample['img'] = new['image']
sample['bboxes'] = np.array(new['bboxes']).reshape(-1, 1)
sample['cls'] = np.array(new['class_labels'])
sample['bboxes'] = np.array(new['bboxes'])
sample['cls'] = np.array(new['class_labels']).reshape(-1, 1)
sample['bbox_format'] = "xywhn"

return sample
Expand Down

0 comments on commit dfe6041

Please sign in to comment.