Commit
β’
9d8ed37
1
Parent(s):
5a1ef32
Rename `utils/datasets.py` > `utils/dataloaders.py` (#7799)
Browse files- detect.py +1 -1
- export.py +1 -1
- models/common.py +1 -1
- train.py +1 -1
- utils/autoanchor.py +1 -1
- utils/{datasets.py β dataloaders.py} +0 -0
- utils/loggers/wandb/wandb_utils.py +1 -1
- val.py +1 -1
detect.py
CHANGED
@@ -39,7 +39,7 @@ if str(ROOT) not in sys.path:
|
|
39 |
ROOT = Path(os.path.relpath(ROOT, Path.cwd())) # relative
|
40 |
|
41 |
from models.common import DetectMultiBackend
|
42 |
-
from utils.
|
43 |
from utils.general import (LOGGER, check_file, check_img_size, check_imshow, check_requirements, colorstr, cv2,
|
44 |
increment_path, non_max_suppression, print_args, scale_coords, strip_optimizer, xyxy2xywh)
|
45 |
from utils.plots import Annotator, colors, save_one_box
|
|
|
39 |
ROOT = Path(os.path.relpath(ROOT, Path.cwd())) # relative
|
40 |
|
41 |
from models.common import DetectMultiBackend
|
42 |
+
from utils.dataloaders import IMG_FORMATS, VID_FORMATS, LoadImages, LoadStreams
|
43 |
from utils.general import (LOGGER, check_file, check_img_size, check_imshow, check_requirements, colorstr, cv2,
|
44 |
increment_path, non_max_suppression, print_args, scale_coords, strip_optimizer, xyxy2xywh)
|
45 |
from utils.plots import Annotator, colors, save_one_box
|
export.py
CHANGED
@@ -65,7 +65,7 @@ if platform.system() != 'Windows':
|
|
65 |
|
66 |
from models.experimental import attempt_load
|
67 |
from models.yolo import Detect
|
68 |
-
from utils.
|
69 |
from utils.general import (LOGGER, check_dataset, check_img_size, check_requirements, check_version, colorstr,
|
70 |
file_size, print_args, url2file)
|
71 |
from utils.torch_utils import select_device
|
|
|
65 |
|
66 |
from models.experimental import attempt_load
|
67 |
from models.yolo import Detect
|
68 |
+
from utils.dataloaders import LoadImages
|
69 |
from utils.general import (LOGGER, check_dataset, check_img_size, check_requirements, check_version, colorstr,
|
70 |
file_size, print_args, url2file)
|
71 |
from utils.torch_utils import select_device
|
models/common.py
CHANGED
@@ -21,7 +21,7 @@ import yaml
|
|
21 |
from PIL import Image
|
22 |
from torch.cuda import amp
|
23 |
|
24 |
-
from utils.
|
25 |
from utils.general import (LOGGER, check_requirements, check_suffix, check_version, colorstr, increment_path,
|
26 |
make_divisible, non_max_suppression, scale_coords, xywh2xyxy, xyxy2xywh)
|
27 |
from utils.plots import Annotator, colors, save_one_box
|
|
|
21 |
from PIL import Image
|
22 |
from torch.cuda import amp
|
23 |
|
24 |
+
from utils.dataloaders import exif_transpose, letterbox
|
25 |
from utils.general import (LOGGER, check_requirements, check_suffix, check_version, colorstr, increment_path,
|
26 |
make_divisible, non_max_suppression, scale_coords, xywh2xyxy, xyxy2xywh)
|
27 |
from utils.plots import Annotator, colors, save_one_box
|
train.py
CHANGED
@@ -44,7 +44,7 @@ from models.yolo import Model
|
|
44 |
from utils.autoanchor import check_anchors
|
45 |
from utils.autobatch import check_train_batch_size
|
46 |
from utils.callbacks import Callbacks
|
47 |
-
from utils.
|
48 |
from utils.downloads import attempt_download
|
49 |
from utils.general import (LOGGER, check_dataset, check_file, check_git_status, check_img_size, check_requirements,
|
50 |
check_suffix, check_version, check_yaml, colorstr, get_latest_run, increment_path,
|
|
|
44 |
from utils.autoanchor import check_anchors
|
45 |
from utils.autobatch import check_train_batch_size
|
46 |
from utils.callbacks import Callbacks
|
47 |
+
from utils.dataloaders import create_dataloader
|
48 |
from utils.downloads import attempt_download
|
49 |
from utils.general import (LOGGER, check_dataset, check_file, check_git_status, check_img_size, check_requirements,
|
50 |
check_suffix, check_version, check_yaml, colorstr, get_latest_run, increment_path,
|
utils/autoanchor.py
CHANGED
@@ -113,7 +113,7 @@ def kmean_anchors(dataset='./data/coco128.yaml', n=9, img_size=640, thr=4.0, gen
|
|
113 |
if isinstance(dataset, str): # *.yaml file
|
114 |
with open(dataset, errors='ignore') as f:
|
115 |
data_dict = yaml.safe_load(f) # model dict
|
116 |
-
from utils.
|
117 |
dataset = LoadImagesAndLabels(data_dict['train'], augment=True, rect=True)
|
118 |
|
119 |
# Get label wh
|
|
|
113 |
if isinstance(dataset, str): # *.yaml file
|
114 |
with open(dataset, errors='ignore') as f:
|
115 |
data_dict = yaml.safe_load(f) # model dict
|
116 |
+
from utils.dataloaders import LoadImagesAndLabels
|
117 |
dataset = LoadImagesAndLabels(data_dict['train'], augment=True, rect=True)
|
118 |
|
119 |
# Get label wh
|
utils/{datasets.py β dataloaders.py}
RENAMED
File without changes
|
utils/loggers/wandb/wandb_utils.py
CHANGED
@@ -15,7 +15,7 @@ ROOT = FILE.parents[3] # YOLOv5 root directory
|
|
15 |
if str(ROOT) not in sys.path:
|
16 |
sys.path.append(str(ROOT)) # add ROOT to PATH
|
17 |
|
18 |
-
from utils.
|
19 |
from utils.general import LOGGER, check_dataset, check_file
|
20 |
|
21 |
try:
|
|
|
15 |
if str(ROOT) not in sys.path:
|
16 |
sys.path.append(str(ROOT)) # add ROOT to PATH
|
17 |
|
18 |
+
from utils.dataloaders import LoadImagesAndLabels, img2label_paths
|
19 |
from utils.general import LOGGER, check_dataset, check_file
|
20 |
|
21 |
try:
|
val.py
CHANGED
@@ -37,7 +37,7 @@ ROOT = Path(os.path.relpath(ROOT, Path.cwd())) # relative
|
|
37 |
|
38 |
from models.common import DetectMultiBackend
|
39 |
from utils.callbacks import Callbacks
|
40 |
-
from utils.
|
41 |
from utils.general import (LOGGER, check_dataset, check_img_size, check_requirements, check_yaml,
|
42 |
coco80_to_coco91_class, colorstr, increment_path, non_max_suppression, print_args,
|
43 |
scale_coords, xywh2xyxy, xyxy2xywh)
|
|
|
37 |
|
38 |
from models.common import DetectMultiBackend
|
39 |
from utils.callbacks import Callbacks
|
40 |
+
from utils.dataloaders import create_dataloader
|
41 |
from utils.general import (LOGGER, check_dataset, check_img_size, check_requirements, check_yaml,
|
42 |
coco80_to_coco91_class, colorstr, increment_path, non_max_suppression, print_args,
|
43 |
scale_coords, xywh2xyxy, xyxy2xywh)
|