How to increase the font size of the bounding box in Tensorflow object detection module?


I have increased the font size to 30 from the default size 24 inside the draw_bounding_box_on_image() in

font = ImageFont.truetype(‘arial.ttf’, 30)

But still the font size is not getting changed.

enter image description here


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

Also, we can put the .ttf file in the current folder and use

 ImageFont.truetype('./Arial.ttf', 30)

Answered By – Biranchi

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published