Skip to content

Commit d745db9

Browse files
glenn-jocherClay Januhowski
authored andcommitted
Duplicate segment verification fix (ultralytics#9225)
Solution by @Laughing-q to resolve duplicate segment verification bug in ultralytics#9052 (comment) Signed-off-by: Glenn Jocher <[email protected]> Signed-off-by: Glenn Jocher <[email protected]>
1 parent f08cba7 commit d745db9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

utils/dataloaders.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -963,7 +963,7 @@ def verify_image_label(args):
963963
if len(i) < nl: # duplicate row check
964964
lb = lb[i] # remove duplicates
965965
if segments:
966-
segments = segments[i]
966+
segments = [segments[x] for x in i]
967967
msg = f'{prefix}WARNING: {im_file}: {nl - len(i)} duplicate labels removed'
968968
else:
969969
ne = 1 # label empty

0 commit comments

Comments
 (0)