Ultralytics Code Refactor https://ultralytics.com/actions (#13153)
* Refactor code for speed and clarity * Update dataloaders.py Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com> --------- Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
1 parent
b9019671f4
commit
100a423b66
14 files changed
+30
No files matched your search
@@ -39,6 +39,7 @@ def create_dataloader(
|
||||
overlap_mask=False,
|
||||
seed=0,
|
||||
):
|
||||
"""Creates a dataloader for training, validating, or testing YOLO models with various dataset options."""
|
||||
if rect and shuffle:
|
||||
LOGGER.warning("WARNING ⚠️ --rect is incompatible with DataLoader shuffle, setting shuffle=False")
|
||||
shuffle = False
|
||||
@@ -102,6 +103,7 @@ class LoadImagesAndLabelsAndMasks(LoadImagesAndLabels): # for training/testing
|
||||
rank=-1,
|
||||
seed=0,
|
||||
):
|
||||
"""Initializes the dataset with image, label, and mask loading capabilities for training/testing."""
|
||||
super().__init__(
|
||||
path,
|
||||
img_size,
|
||||
|
||||
Reference in new issue
Block a user