如何在Tensorflow对象检测模块中增加边界框的字体大小?

Bir*_*chi 1 object-detection tensorflow

我已将其字体大小从visual_utils.py中draw_bounding_box_on_image()内的默认大小24增加到30

font = ImageFont.truetype('arial.ttf',30)

但是字体大小仍然没有改变.

在此输入图像描述

Bir*_*chi 5

i found the issue.
On Mac we need to give the full path.
ImageFont.truetype('/Library/Fonts/Arial.ttf', 30)
Run Code Online (Sandbox Code Playgroud)

另外,我们可以将.ttf文件放在当前文件夹中并使用

 ImageFont.truetype('./Arial.ttf', 30)
Run Code Online (Sandbox Code Playgroud)