|
|
@ -160,7 +160,8 @@ def train(hyp):
|
|
|
|
hyp=hyp, # augmentation hyperparameters
|
|
|
|
hyp=hyp, # augmentation hyperparameters
|
|
|
|
rect=opt.rect, # rectangular training
|
|
|
|
rect=opt.rect, # rectangular training
|
|
|
|
cache_images=opt.cache_images,
|
|
|
|
cache_images=opt.cache_images,
|
|
|
|
single_cls=opt.single_cls)
|
|
|
|
single_cls=opt.single_cls,
|
|
|
|
|
|
|
|
stride=gs)
|
|
|
|
mlc = np.concatenate(dataset.labels, 0)[:, 0].max() # max label class
|
|
|
|
mlc = np.concatenate(dataset.labels, 0)[:, 0].max() # max label class
|
|
|
|
assert mlc < nc, 'Label class %g exceeds nc=%g in %s. Correct your labels or your model.' % (mlc, nc, opt.cfg)
|
|
|
|
assert mlc < nc, 'Label class %g exceeds nc=%g in %s. Correct your labels or your model.' % (mlc, nc, opt.cfg)
|
|
|
|
|
|
|
|
|
|
|
@ -179,7 +180,8 @@ def train(hyp):
|
|
|
|
hyp=hyp,
|
|
|
|
hyp=hyp,
|
|
|
|
rect=True,
|
|
|
|
rect=True,
|
|
|
|
cache_images=opt.cache_images,
|
|
|
|
cache_images=opt.cache_images,
|
|
|
|
single_cls=opt.single_cls),
|
|
|
|
single_cls=opt.single_cls,
|
|
|
|
|
|
|
|
stride=gs),
|
|
|
|
batch_size=batch_size,
|
|
|
|
batch_size=batch_size,
|
|
|
|
num_workers=nw,
|
|
|
|
num_workers=nw,
|
|
|
|
pin_memory=True,
|
|
|
|
pin_memory=True,
|
|
|
|