mirror of
https://github.com/modelscope/modelscope.git
synced 2026-02-24 20:19:51 +01:00
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:
committed by
wenmeng.zwm
parent
e2c19e89e6
commit
cd3f5d659e
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user