Skip to content

Commit

Permalink
sort optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
bigsk05 committed Jan 21, 2023
1 parent 8ffeeb1 commit 95aa24e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,8 @@ def recognize(self, image):
)
ocr_filter.append(e[1])

ocr_result = sorted(ocr_result, key=lambda x:len(x[1]), reverse=True)

# Read database
for i in ocr_result:
r = self.search(i[1])
Expand Down

0 comments on commit 95aa24e

Please sign in to comment.