From 9d8ed37df77e4e06a1b63cbf51785ec91557bf3d Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Fri, 13 May 2022 14:34:16 +0200 Subject: [PATCH] Rename `utils/datasets.py` > `utils/dataloaders.py` (#7799) --- detect.py | 2 +- export.py | 2 +- models/common.py | 2 +- train.py | 2 +- utils/autoanchor.py | 2 +- utils/{datasets.py => dataloaders.py} | 0 utils/loggers/wandb/wandb_utils.py | 2 +- val.py | 2 +- 8 files changed, 7 insertions(+), 7 deletions(-) rename utils/{datasets.py => dataloaders.py} (100%) diff --git a/detect.py b/detect.py index bc93631caa4e..2745804da701 100644 --- a/detect.py +++ b/detect.py @@ -39,7 +39,7 @@ ROOT = Path(os.path.relpath(ROOT, Path.cwd())) # relative from models.common import DetectMultiBackend -from utils.datasets import IMG_FORMATS, VID_FORMATS, LoadImages, LoadStreams +from utils.dataloaders import IMG_FORMATS, VID_FORMATS, LoadImages, LoadStreams from utils.general import (LOGGER, check_file, check_img_size, check_imshow, check_requirements, colorstr, cv2, increment_path, non_max_suppression, print_args, scale_coords, strip_optimizer, xyxy2xywh) from utils.plots import Annotator, colors, save_one_box diff --git a/export.py b/export.py index f0ab22a21670..0e124f817af4 100644 --- a/export.py +++ b/export.py @@ -65,7 +65,7 @@ from models.experimental import attempt_load from models.yolo import Detect -from utils.datasets import LoadImages +from utils.dataloaders import LoadImages from utils.general import (LOGGER, check_dataset, check_img_size, check_requirements, check_version, colorstr, file_size, print_args, url2file) from utils.torch_utils import select_device diff --git a/models/common.py b/models/common.py index 5119881e683f..9d181ed7a40a 100644 --- a/models/common.py +++ b/models/common.py @@ -21,7 +21,7 @@ from PIL import Image from torch.cuda import amp -from utils.datasets import exif_transpose, letterbox +from utils.dataloaders import exif_transpose, letterbox from utils.general import (LOGGER, check_requirements, check_suffix, check_version, colorstr, increment_path, make_divisible, non_max_suppression, scale_coords, xywh2xyxy, xyxy2xywh) from utils.plots import Annotator, colors, save_one_box diff --git a/train.py b/train.py index d884c82e0bd7..e18864fef02f 100644 --- a/train.py +++ b/train.py @@ -44,7 +44,7 @@ from utils.autoanchor import check_anchors from utils.autobatch import check_train_batch_size from utils.callbacks import Callbacks -from utils.datasets import create_dataloader +from utils.dataloaders import create_dataloader from utils.downloads import attempt_download from utils.general import (LOGGER, check_dataset, check_file, check_git_status, check_img_size, check_requirements, check_suffix, check_version, check_yaml, colorstr, get_latest_run, increment_path, diff --git a/utils/autoanchor.py b/utils/autoanchor.py index 77518abe9889..547ca216a92a 100644 --- a/utils/autoanchor.py +++ b/utils/autoanchor.py @@ -113,7 +113,7 @@ def print_results(k, verbose=True): if isinstance(dataset, str): # *.yaml file with open(dataset, errors='ignore') as f: data_dict = yaml.safe_load(f) # model dict - from utils.datasets import LoadImagesAndLabels + from utils.dataloaders import LoadImagesAndLabels dataset = LoadImagesAndLabels(data_dict['train'], augment=True, rect=True) # Get label wh diff --git a/utils/datasets.py b/utils/dataloaders.py similarity index 100% rename from utils/datasets.py rename to utils/dataloaders.py diff --git a/utils/loggers/wandb/wandb_utils.py b/utils/loggers/wandb/wandb_utils.py index 1ac8ce7527a9..04521bf3681d 100644 --- a/utils/loggers/wandb/wandb_utils.py +++ b/utils/loggers/wandb/wandb_utils.py @@ -15,7 +15,7 @@ if str(ROOT) not in sys.path: sys.path.append(str(ROOT)) # add ROOT to PATH -from utils.datasets import LoadImagesAndLabels, img2label_paths +from utils.dataloaders import LoadImagesAndLabels, img2label_paths from utils.general import LOGGER, check_dataset, check_file try: diff --git a/val.py b/val.py index e7ef547709dc..0473f1d75140 100644 --- a/val.py +++ b/val.py @@ -37,7 +37,7 @@ from models.common import DetectMultiBackend from utils.callbacks import Callbacks -from utils.datasets import create_dataloader +from utils.dataloaders import create_dataloader from utils.general import (LOGGER, check_dataset, check_img_size, check_requirements, check_yaml, coco80_to_coco91_class, colorstr, increment_path, non_max_suppression, print_args, scale_coords, xywh2xyxy, xyxy2xywh)