allow_empty=True for Classify dataset class directories (#14301)
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
parent
8ef1d81e66
commit
7a6bb2b1c9
1 changed files with 1 additions and 1 deletions
|
|
@ -416,7 +416,7 @@ class ClassificationDataset:
|
|||
import torchvision # scope for faster 'import ultralytics'
|
||||
|
||||
# Base class assigned as attribute rather than used as base class to allow for scoping slow torchvision import
|
||||
self.base = torchvision.datasets.ImageFolder(root=root)
|
||||
self.base = torchvision.datasets.ImageFolder(root=root, allow_empty=True)
|
||||
self.samples = self.base.samples
|
||||
self.root = self.base.root
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue