-
Notifications
You must be signed in to change notification settings - Fork 2.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
Update Pillow version to 10.0.0 #8446
Conversation
Thanks for your contribution! |
@@ -109,7 +109,8 @@ def draw_box(im, np_boxes, labels, threshold=0.5): | |||
|
|||
# draw label | |||
text = "{} {:.4f}".format(labels[clsid], score) | |||
tw, th = draw.textsize(text) | |||
left, top, right, bottom = draw.getbbox(text) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Image draw的替换应该是textbbox,而不是getbbox:https://pillow.readthedocs.io/en/stable/reference/ImageDraw.html#PIL.ImageDraw.ImageDraw.textbbox
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
修改了
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
本PR的背景为完成开源中的套件一致性任务:PaddlePaddle/PaddleOCR#10380 |
This reverts commit 1632c27.
修改requirements.txt,pillow版本10.0.0以上
修改相关联的文件,修改长宽获取api
ex:
previous