Skip to content

Commit

Permalink
docs: update vis script of return_word_box
Browse files Browse the repository at this point in the history
  • Loading branch information
SWHL committed Jan 19, 2025
1 parent 13c60ab commit be6fc41
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docs/install_usage/api/VisRes.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,12 @@ def __call__(

result, elapse_list = engine(img, return_word_box=True)

(boxes, txts, scores, words_boxes, words) = list(zip(*result))
(boxes, txts, scores, words_boxes, words, words_scores) = list(zip(*result))
font_path = "resources/fonts/FZYTK.TTF"

words_boxes = sum(words_boxes, [])
words_all = sum(words, [])
words_scores = [1.0] * len(words_boxes)
words_scores = sum(words_scores, [])
vis_img = vis(img, words_boxes, words_all, words_scores, font_path)
cv2.imwrite("vis_single.png", vis_img)
```
Expand Down

0 comments on commit be6fc41

Please sign in to comment.