-
-
Notifications
You must be signed in to change notification settings - Fork 16.6k
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
freetype font and pillow #13498
Comments
👋 Hello @vahidajalluian, thank you for bringing up this issue and for your interest in YOLOv5 🚀! It seems you’ve encountered a compatibility issue related to the Next Steps:If this is a 🐛 Bug Report, could you please provide a minimum reproducible example (MRE) that demonstrates this issue? This will help us reproduce and debug the problem more effectively. The MRE should include:
Temporary Workaround:Until this issue is resolved, you may try using a specific version of Pillow (<= 9.5.0) as a workaround: pip install Pillow==9.5.0 RequirementsEnsure your Python and dependencies match our requirements.txt: git clone https://github.com/ultralytics/yolov5 # clone
cd yolov5
pip install -r requirements.txt # install EnvironmentsYOLOv5 supports running in various environments — you can try switching environments as an alternative:
Source Code CheckTo troubleshoot further, you may also review the affected file and line of code where the error is reported: File "/home/vahidajalluian/yolov5-7.0/utils/plots.py", line 91 You can compare this to the latest version of YOLOv5's utils/plots.py to see if updates or fixes are already available. This is an automated response to help you get started 😊! An Ultralytics engineer will review your issue and provide further assistance as soon as possible. Thank you for your patience as we work together to ensure a smooth experience with YOLOv5! 🚀 |
@vahidajalluian thank you for bringing this to our attention! The issue arises because Pillow versions above 9.5 have removed the
w, h = self.font.getbbox(label)[2:] # text width, height Please ensure you are using the latest YOLOv5 version as well to avoid other compatibility issues. Let us know if you need further assistance! |
It seems in Pillow library version over 9.5 getsize method has been removed. So either change the method or limit the library to be installed to 9.5.
Here is the log I get for now.
The text was updated successfully, but these errors were encountered: