MCPcopy Create free account
hub / github.com/NVIDIA/TensorRT / draw_text

Function draw_text

samples/python/efficientdet/visualize.py:194–198  ·  view source on GitHub ↗
(draw, font, text, width, bar_height, offset, color)

Source from the content-addressed store, hash-verified

192
193def concat_visualizations(images, names, colors, output_path):
194 def draw_text(draw, font, text, width, bar_height, offset, color):
195 left, top, right, bottom = font.getbbox(text)
196 text_width, text_height = right - left, bottom - top
197 draw.rectangle([(offset, 0), (offset + width, bar_height)], fill=color)
198 draw.text((offset + (width - text_width) / 2, text_height - text_height / 2), text, fill="black", font=font)
199
200 bar_height = 18
201 width = 0

Callers 1

concat_visualizationsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected