Fix HUBDatasetStats for no-label edge cases (#4583)
This commit is contained in:
parent
2db35afad5
commit
f755ba88c3
10 changed files with 62 additions and 41 deletions
|
|
@ -115,7 +115,7 @@ class BaseDataset(Dataset):
|
|||
raise FileNotFoundError(f'{self.prefix}{p} does not exist')
|
||||
im_files = sorted(x.replace('/', os.sep) for x in f if x.split('.')[-1].lower() in IMG_FORMATS)
|
||||
# self.img_files = sorted([x for x in f if x.suffix[1:].lower() in IMG_FORMATS]) # pathlib
|
||||
assert im_files, f'{self.prefix}No images found'
|
||||
assert im_files, f'{self.prefix}No images found in {img_path}'
|
||||
except Exception as e:
|
||||
raise FileNotFoundError(f'{self.prefix}Error loading data from {img_path}\n{HELP_URL}') from e
|
||||
if self.fraction < 1:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue