yolov9报错:AttributeError: ‘FreeTypeFont‘ object has no attribute ‘getsize‘
·
报错问题:
w, h = self.font.getsize(label) # text width, height AttributeError: 'FreeTypeFont' object has no attribute 'getsize'
解决方法一:
修改代码
w, h = self.font.getsize(label) # text width, height
改为:
unused1,unused2,w, h = self.font.getbbox(label) # text width, height
解决方法二:
降级pillow版本
pip install Pillow==9.5.0
更多推荐
所有评论(0)