ultralytics 8.0.92 updates and fixes (#2361)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Yonghye Kwon <developer.0hye@gmail.com> Co-authored-by: introvin <vinod.4166@gmail.com> Co-authored-by: marinmarcillat <58145636+marinmarcillat@users.noreply.github.com> Co-authored-by: BIGBOSS-FOX <47949596+BIGBOSS-FOX@users.noreply.github.com>
This commit is contained in:
parent
3fd317edfd
commit
0ebd3f2959
15 changed files with 82 additions and 35 deletions
|
|
@ -259,13 +259,14 @@ def yaml_save(file='data.yaml', data=None):
|
|||
# Create parent directories if they don't exist
|
||||
file.parent.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
# Convert Path objects to strings
|
||||
for k, v in data.items():
|
||||
if isinstance(v, Path):
|
||||
dict[k] = str(v)
|
||||
|
||||
# Dump data to file in YAML format
|
||||
with open(file, 'w') as f:
|
||||
# Dump data to file in YAML format, converting Path objects to strings
|
||||
yaml.safe_dump({k: str(v) if isinstance(v, Path) else v
|
||||
for k, v in data.items()},
|
||||
f,
|
||||
sort_keys=False,
|
||||
allow_unicode=True)
|
||||
yaml.safe_dump(data, f, sort_keys=False, allow_unicode=True)
|
||||
|
||||
|
||||
def yaml_load(file='data.yaml', append_filename=False):
|
||||
|
|
@ -759,7 +760,7 @@ ENVIRONMENT = 'Colab' if is_colab() else 'Kaggle' if is_kaggle() else 'Jupyter'
|
|||
TESTS_RUNNING = is_pytest_running() or is_github_actions_ci()
|
||||
set_sentry()
|
||||
|
||||
# OpenCV Multilanguage-friendly functions ------------------------------------------------------------------------------------
|
||||
# OpenCV Multilanguage-friendly functions ------------------------------------------------------------------------------
|
||||
imshow_ = cv2.imshow # copy to avoid recursion errors
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue