In draw_alignment, a call to font.getsize() may result in an error because Pillow no longer supports the getsize method (for Pillow > 9.5.0). The solution is to restrict the Pillow library to 9.5.0 or less, or to replace getsize with getlength or getbox:
DeprecationWarning: getsize is deprecated and will be removed in Pillow 10 (2023-07-01). Use getbbox or getlength instead.
In
draw_alignment
, a call tofont.getsize()
may result in an error because Pillow no longer supports thegetsize
method (for Pillow > 9.5.0). The solution is to restrict the Pillow library to 9.5.0 or less, or to replacegetsize
withgetlength
orgetbox
:https://github.com/tensorflow/models/issues/11040#issuecomment-1631442757