|
|
@ -684,7 +684,7 @@ def yaml_model_load(path):
|
|
|
|
if path.stem in (f'yolov{d}{x}6' for x in 'nsmlx' for d in (5, 8)):
|
|
|
|
if path.stem in (f'yolov{d}{x}6' for x in 'nsmlx' for d in (5, 8)):
|
|
|
|
new_stem = re.sub(r'(\d+)([nslmx])6(.+)?$', r'\1\2-p6\3', path.stem)
|
|
|
|
new_stem = re.sub(r'(\d+)([nslmx])6(.+)?$', r'\1\2-p6\3', path.stem)
|
|
|
|
LOGGER.warning(f'WARNING ⚠️ Ultralytics YOLO P6 models now use -p6 suffix. Renaming {path.stem} to {new_stem}.')
|
|
|
|
LOGGER.warning(f'WARNING ⚠️ Ultralytics YOLO P6 models now use -p6 suffix. Renaming {path.stem} to {new_stem}.')
|
|
|
|
path = path.with_stem(new_stem)
|
|
|
|
path = path.with_name(new_stem + path.suffix)
|
|
|
|
|
|
|
|
|
|
|
|
unified_path = re.sub(r'(\d+)([nslmx])(.+)?$', r'\1\3', str(path)) # i.e. yolov8x.yaml -> yolov8.yaml
|
|
|
|
unified_path = re.sub(r'(\d+)([nslmx])(.+)?$', r'\1\3', str(path)) # i.e. yolov8x.yaml -> yolov8.yaml
|
|
|
|
yaml_file = check_yaml(unified_path, hard=False) or check_yaml(path)
|
|
|
|
yaml_file = check_yaml(unified_path, hard=False) or check_yaml(path)
|
|
|
|