-
-
Notifications
You must be signed in to change notification settings - Fork 16.4k
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
got missing from current font warning when train Chinese names images #6522
Comments
👋 Hello @gaoyanzeng, thank you for your interest in YOLOv5 🚀! Please visit our ⭐️ Tutorials to get started, where you can find quickstart guides for simple tasks like Custom Data Training all the way to advanced concepts like Hyperparameter Evolution. If this is a 🐛 Bug Report, please provide screenshots and minimum viable code to reproduce your issue, otherwise we can not help you. If this is a custom training ❓ Question, please provide as much information as possible, including dataset images, training logs, screenshots, and a public link to online W&B logging if available. For business inquiries or professional support requests please visit https://ultralytics.com or email [email protected]. RequirementsPython>=3.7.0 with all requirements.txt installed including PyTorch>=1.7. To get started: git clone https://github.com/ultralytics/yolov5 # clone
cd yolov5
pip install -r requirements.txt # install EnvironmentsYOLOv5 may be run in any of the following up-to-date verified environments (with all dependencies including CUDA/CUDNN, Python and PyTorch preinstalled):
StatusIf this badge is green, all YOLOv5 GitHub Actions Continuous Integration (CI) tests are currently passing. CI tests verify correct operation of YOLOv5 training (train.py), validation (val.py), inference (detect.py) and export (export.py) on MacOS, Windows, and Ubuntu every 24 hours and on every commit. |
@gaoyanzeng warnings are not errors and can be safely ignored if they do not impact performance. Does this cause any problems in your workflow? |
@gaoyanzeng I investigated a bit, seems like Unicode Arial.ttf is not downloading as it should for Chinese fonts usage. I'll add a TODO to investigate further. |
thank you very much |
@gaoyanzeng yeah I see that. It looks like PIL image plotting with Chinese fonts is working correctly now after some updates in #6526 but matplotlib plotting is separate and needs to specify Arial.Unicode.tty as well. I should have a fix for this soon. |
TODO: Fix matplotlib plots for Chinese characters |
Thank you very much, looking forward to your work fix this problem. |
@gaoyanzeng can you paste the code for your reproducible matplotlib Chinese plotting example? Maybe the YOLOv5 matplotlib settings here are affecting the Chinese characters: Lines 24 to 28 in 079b36d
|
@gaoyanzeng about the indentation issues maybe if we place this data into a pandas dataframe and then print() it pandas might resolve the indentation issues. Right now the printing is done manually here: Lines 261 to 269 in e1a6a0b
|
@glenn-jocher Maybe, It load the *.yaml file imcorrectly when there are chinese characters in the *.yaml file? |
When I set chinese classes names in the coco128.yaml, then load the file should set the encoding tobe UTF-8, |
👋 Hello, this issue has been automatically marked as stale because it has not had recent activity. Please note it will be closed if no further activity occurs. Access additional YOLOv5 🚀 resources:
Access additional Ultralytics ⚡ resources:
Feel free to inform us of any other issues you discover or feature requests that come to mind in the future. Pull Requests (PRs) are also always welcomed! Thank you for your contributions to YOLOv5 🚀 and Vision AI ⭐! |
You're welcome, @gaoyanzeng! It's great to hear that setting the encoding to UTF-8 worked for you. Let me know if there's anything else I can assist you with. Have a great day! |
Search before asking
YOLOv5 Component
Training
Bug
Got warning as below:
metrics.py:199: UserWarning: Glyph 31888 (\N{CJK UNIFIED IDEOGRAPH-7C90}) missing from current font.
fig.savefig(Path(save_dir) / 'confusion_matrix.png', dpi=250)
All I changed is in the ./data/coco128.yaml as below:
Classes
nc: 4 # number of classes
names: ['翘头剪', '直剪', '止血钳', '组织钳'] # class names
Environment
OS: Windows 11
Python: 3.9.5
Minimal Reproducible Example
No response
Additional
No response
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: