Skip to content

Commit

Permalink
Duplicate segment verification fix (ultralytics#9225)
Browse files Browse the repository at this point in the history
Solution by @Laughing-q  to resolve duplicate segment verification bug in ultralytics#9052 (comment)

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
  • Loading branch information
glenn-jocher authored and Clay Januhowski committed Sep 8, 2022
1 parent f08cba7 commit d745db9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/dataloaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -963,7 +963,7 @@ def verify_image_label(args):
if len(i) < nl: # duplicate row check
lb = lb[i] # remove duplicates
if segments:
segments = segments[i]
segments = [segments[x] for x in i]
msg = f'{prefix}WARNING: {im_file}: {nl - len(i)} duplicate labels removed'
else:
ne = 1 # label empty
Expand Down

0 comments on commit d745db9

Please sign in to comment.