Skip to content

Commit

Permalink
Duplicate segment verification fix (#9225)
Browse files Browse the repository at this point in the history
Solution by @Laughing-q  to resolve duplicate segment verification bug in #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 committed Aug 30, 2022
1 parent f37ac8d commit 5fb267f
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 5fb267f

Please sign in to comment.