Unverified 提交 542833c9 authored 作者: tkianai's avatar tkianai 提交者: GitHub

Filter the None labels (#705)

* the value should be a list to unpacking * filter the None labels
上级 e71fd0ec
......@@ -375,7 +375,7 @@ class LoadImagesAndLabels(Dataset): # for training/testing
pbar = tqdm(self.label_files)
for i, file in enumerate(pbar):
l = self.labels[i] # label
if l.shape[0]:
if l is not None and l.shape[0]:
assert l.shape[1] == 5, '> 5 label columns: %s' % file
assert (l >= 0).all(), 'negative labels: %s' % file
assert (l[:, 1:] <= 1).all(), 'non-normalized or out of bounds coordinate labels: %s' % file
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论