ultralytics 8.0.160 Classify dataset scanning and caching (#4502)

This commit is contained in:
Glenn Jocher 2023-08-23 02:28:58 +02:00 committed by GitHub
parent b890e1c937
commit c7ceb84fb6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 102 additions and 23 deletions

View file

@ -77,7 +77,7 @@ class ClassificationValidator(BaseValidator):
return self.metrics.results_dict
def build_dataset(self, img_path):
return ClassificationDataset(root=img_path, args=self.args, augment=False)
return ClassificationDataset(root=img_path, args=self.args, augment=False, prefix=self.args.split)
def get_dataloader(self, dataset_path, batch_size):
"""Builds and returns a data loader for classification tasks with given parameters."""