-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Multilanguage for imread and imwrite #2103
Support Multilanguage for imread and imwrite #2103
Conversation
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
@developer0hye great idea, thanks for the PR! I've updated the implementation to match YOLOv5. |
@glenn-jocher Jocher, I couldn't load an image file whose path contains Korean with the modified code. my command: yolo train task=detect model=yolov8n.yaml pretrained=yolov8n.pt epochs=300 workers=0
|
Hello @developer0hye, sorry to hear that you are experiencing issues with file paths containing Korean characters. It looks like you provided some screenshots, which is a great way to help identify the issue. It seems that the |
@glenn-jocher Thanks for reviewing it! I confirmed that the file existed in the provided path. I think that I am using the correct path syntax. |
@developer0hye, thanks for confirming that the file exists in the provided path, and it sounds like the path syntax is correct. It's possible that the issue might be related to how Python is interpreting the Korean characters in the file path. I would recommend trying to use the unicode escape sequence for the Korean characters in the file path, which should help Python recognize the path correctly. You can refer to our documentation at https://docs.ultralytics.com for more information on how to handle unicode characters in file paths. |
π€ Generated by Copilot at 0bacaa3
Summary
π·ππ
Added
imread
andimwrite
functions to handle filenames with emojis or non-ASCII characters inultralytics/yolo/utils/__init__.py
. Redefined cv2 functions to use the new wrappers for better compatibility and robustness.Walkthrough
imread
andimwrite
to handle filenames with emojis or non-ASCII characters (link)cv2.imread
andcv2.imwrite
to use the new wrappers (link)π οΈ PR Summary
Made with β€οΈ by Ultralytics Actions
π Summary
Enhancement of OpenCV functions to support multilingual file paths.
π Key Changes
imread
function to handle reading images using file paths with non-ASCII characters.imwrite
function that ensures images are saved to paths containing multilingual characters.imshow
function to correctly display window titles with non-ASCII characters.π― Purpose & Impact