Pārlūkot izejas kodu

Filter the None labels (#705)

* the value should be a list to unpacking

* filter the None labels
5.0
tkianai GitHub pirms 4 gadiem
vecāks
revīzija
542833c997
Šim parakstam datu bāzē netika atrasta zināma atslēga GPG atslēgas ID: 4AEE18F83AFDEB23
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. +1
    -1
      utils/datasets.py

+ 1
- 1
utils/datasets.py Parādīt failu

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

Notiek ielāde…
Atcelt
Saglabāt