fix bug: referring_video-object-segmentation兼容Pillow10

Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/13479152
* fix bug: referring_video-object-segmentation兼容Pillow10
This commit is contained in:
hejunjie.hjj
2023-08-02 16:08:26 +08:00
committed by wenmeng.zwm
parent e2c19e89e6
commit cd3f5d659e

View File

@@ -179,7 +179,7 @@ class ReferringVideoObjectSegmentationPipeline(Pipeline):
for i, (text_query, color) in enumerate(
zip(self.text_queries, colors), start=1):
w, h = draw.textsize(text_query, font=font)
_, _, w, h = draw.textbbox([0, 0], text_query, font=font)
draw.text(((W - w) / 2,
(text_border_height_per_query * i) - h - 3),
text_query,