Skip to content

Commit

Permalink
fix: fixed the error of visulizing single word
Browse files Browse the repository at this point in the history
  • Loading branch information
SWHL committed Dec 8, 2024
1 parent 2d755b3 commit 5052fe1
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions docs/install_usage/api/VisRes.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,9 @@ def __call__(
image_path = "tests/test_files/ch_en_num.jpg"
img = cv2.imread(image_path)

result, elapse_list = engine(img)
boxes, txts, scores = list(zip(*result))
vis_img = vis(img, boxes, txts, scores, font_path)
cv2.imwrite("vis.png", vis_img)
result, elapse_list = engine(img, return_word_box=True)

(boxes, txts, scores, words_boxes, words) = list(zip(*result))

words_boxes = sum(words_boxes, [])
words_all = sum(words, [])
Expand Down

0 comments on commit 5052fe1

Please sign in to comment.