diff --git a/ultralytics/data/dataset.py b/ultralytics/data/dataset.py index 575243f..1d13261 100644 --- a/ultralytics/data/dataset.py +++ b/ultralytics/data/dataset.py @@ -126,6 +126,7 @@ class YOLODataset(BaseDataset): # Read cache [cache.pop(k) for k in ('hash', 'version', 'msgs')] # remove items labels = cache['labels'] + assert len(labels), f'No valid labels found, please check your dataset. {HELP_URL}' self.im_files = [lb['im_file'] for lb in labels] # update im_files # Check if the dataset is all boxes or all segments diff --git a/ultralytics/data/utils.py b/ultralytics/data/utils.py index 561b994..807ddad 100644 --- a/ultralytics/data/utils.py +++ b/ultralytics/data/utils.py @@ -24,7 +24,7 @@ from ultralytics.utils.checks import check_file, check_font, is_ascii from ultralytics.utils.downloads import download, safe_download, unzip_file from ultralytics.utils.ops import segments2boxes -HELP_URL = 'See https://docs.ultralytics.com/yolov5/tutorials/train_custom_data' +HELP_URL = 'See https://docs.ultralytics.com/datasets/detect for YOLO dataset format help.' IMG_FORMATS = 'bmp', 'dng', 'jpeg', 'jpg', 'mpo', 'png', 'tif', 'tiff', 'webp', 'pfm' # image suffixes VID_FORMATS = 'asf', 'avi', 'gif', 'm4v', 'mkv', 'mov', 'mp4', 'mpeg', 'mpg', 'ts', 'wmv', 'webm' # video suffixes PIN_MEMORY = str(os.getenv('PIN_MEMORY', True)).lower() == 'true' # global pin_memory for dataloaders