Skip to content

Commit

Permalink
Fix issue with labels
Browse files Browse the repository at this point in the history
  • Loading branch information
Smfun12 committed May 26, 2022
1 parent 223f073 commit 0c0bd3d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion utils/dataloaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,8 @@ def load_mosaic(self, index):
# Labels
labels, segments = self.labels[index].copy(), self.segments[index].copy()
if i == 3:
labels += labels10
for label in labels10:
labels = np.concatenate((labels, label), 0)
if labels.size:
labels[:, 1:] = xywhn2xyxy(labels[:, 1:], w, h, padw, padh) # normalized xywh to pixel xyxy format
segments = [xyn2xy(x, w, h, padw, padh) for x in segments]
Expand Down

0 comments on commit 0c0bd3d

Please sign in to comment.