MCPcopy Create free account
hub / github.com/PaddlePaddle/EasyData / draw_text_on_bg

Method draw_text_on_bg

deploy/python/dataaug/utils/renderer.py:315–431  ·  view source on GitHub ↗

Draw word in the center of background :param word: word to draw :param font: font to draw word :param bg: background numpy image :return: np_img: word image text_box_pnts: left-top, right-top, right-bottom, left-bottom

(self, word, font, bg)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

gen_img_listMethod · 0.95

Calls 9

get_word_sizeMethod · 0.95
is_bgrMethod · 0.95
get_word_colorMethod · 0.95
get_gray_word_colorMethod · 0.95
draw_text_seamlessMethod · 0.95
draw_text_wrapperMethod · 0.95
draw_border_textMethod · 0.95
applyFunction · 0.85

Tested by

no test coverage detected