Duplicate segment verification fix (#9225)
Solution by @Laughing-q to resolve duplicate segment verification bug in https://github.com/ultralytics/yolov5/pull/9052#issuecomment-1231426638 Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com> Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
1 parent
f37ac8d611
commit
5fb267f3e5
1 file changed
+1
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user