updates
This commit is contained in:
parent
2774c1b398
commit
dce753ead4
3
test.py
3
test.py
|
@ -55,8 +55,7 @@ def test(cfg,
|
|||
|
||||
# Dataloader
|
||||
if dataloader is None:
|
||||
dataset = LoadImagesAndLabels(path, img_size, batch_size, rect=True, single_cls=opt.single_cls,
|
||||
cache_labels=True)
|
||||
dataset = LoadImagesAndLabels(path, img_size, batch_size, rect=True, single_cls=opt.single_cls)
|
||||
batch_size = min(batch_size, len(dataset))
|
||||
dataloader = DataLoader(dataset,
|
||||
batch_size=batch_size,
|
||||
|
|
2
train.py
2
train.py
|
@ -171,7 +171,6 @@ def train():
|
|||
augment=True,
|
||||
hyp=hyp, # augmentation hyperparameters
|
||||
rect=opt.rect, # rectangular training
|
||||
cache_labels=True,
|
||||
cache_images=opt.cache_images,
|
||||
single_cls=opt.single_cls)
|
||||
|
||||
|
@ -189,7 +188,6 @@ def train():
|
|||
testloader = torch.utils.data.DataLoader(LoadImagesAndLabels(test_path, img_size_test, batch_size * 2,
|
||||
hyp=hyp,
|
||||
rect=True,
|
||||
cache_labels=True,
|
||||
cache_images=opt.cache_images,
|
||||
single_cls=opt.single_cls),
|
||||
batch_size=batch_size * 2,
|
||||
|
|
|
@ -257,7 +257,7 @@ class LoadStreams: # multiple IP or RTSP cameras
|
|||
|
||||
class LoadImagesAndLabels(Dataset): # for training/testing
|
||||
def __init__(self, path, img_size=416, batch_size=16, augment=False, hyp=None, rect=False, image_weights=False,
|
||||
cache_labels=False, cache_images=False, single_cls=False):
|
||||
cache_labels=True, cache_images=False, single_cls=False):
|
||||
path = str(Path(path)) # os-agnostic
|
||||
assert os.path.isfile(path), 'File not found %s. See %s' % (path, help_url)
|
||||
with open(path, 'r') as f:
|
||||
|
|
Loading…
Reference in New Issue