ultralytics 8.0.160 Classify dataset scanning and caching (#4502)
This commit is contained in:
parent
b890e1c937
commit
c7ceb84fb6
5 changed files with 102 additions and 23 deletions
|
|
@ -79,7 +79,7 @@ class ClassificationTrainer(BaseTrainer):
|
|||
return ckpt
|
||||
|
||||
def build_dataset(self, img_path, mode='train', batch=None):
|
||||
return ClassificationDataset(root=img_path, args=self.args, augment=mode == 'train')
|
||||
return ClassificationDataset(root=img_path, args=self.args, augment=mode == 'train', prefix=mode)
|
||||
|
||||
def get_dataloader(self, dataset_path, batch_size=16, rank=0, mode='train'):
|
||||
"""Returns PyTorch DataLoader with transforms to preprocess images for inference."""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue