瀏覽代碼

Filter the None labels (#705)

* the value should be a list to unpacking

* filter the None labels
5.0
tkianai GitHub 4 年之前
父節點
當前提交
542833c997
沒有發現已知的金鑰在資料庫的簽署中 GPG 金鑰 ID: 4AEE18F83AFDEB23
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. +1
    -1
      utils/datasets.py

+ 1
- 1
utils/datasets.py 查看文件

@@ -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

Loading…
取消
儲存