From b2abd46437931abe56b6844f1bb9ebc27ccf7d52 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Tue, 21 May 2019 12:58:18 +0200 Subject: [PATCH] updates --- train.py | 2 +- utils/datasets.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/train.py b/train.py index d31ffd26..0f939769 100644 --- a/train.py +++ b/train.py @@ -174,7 +174,7 @@ def train( t, t0 = time.time(), time.time() for epoch in range(start_epoch, epochs): model.train() - print(('\n%8s%12s' + '%10s' * 7) % ('Epoch', 'Batch', 'xy', 'wh', 'conf', 'cls', 'total', 'nTargets', 'time')) + print(('\n%8s%12s' + '%10s' * 7) % ('Epoch', 'Batch', 'xy', 'wh', 'conf', 'cls', 'total', 'targets', 'time')) # Update scheduler scheduler.step() diff --git a/utils/datasets.py b/utils/datasets.py index 912c91a7..054eb9e0 100755 --- a/utils/datasets.py +++ b/utils/datasets.py @@ -199,6 +199,7 @@ class LoadImagesAndLabels(Dataset): # for training/testing except: print('Warning: missing labels for %s' % self.img_files[i]) pass # missing label file + assert len(np.concatenate(self.labels, 0)) > 0, 'No labels found. Check label paths.' def __len__(self): return len(self.img_files)