Skip to content

Commit

Permalink
Merge pull request #23 from Dv04/Dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Dv04 authored Aug 26, 2023
2 parents 0dd5325 + c5bbe57 commit 697cd3d
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
Binary file modified .DS_Store
Binary file not shown.
Binary file added dataset/Trial.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions ocr.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
from paddleocr import PaddleOCR

# Initialize the PaddleOCR instance
ocr = PaddleOCR()

# Load and recognize text in the image
result = ocr.ocr('dataset/Trial.png')

# Process the recognition result
recognized_text = []
for line in result[0]:
line_text = ' '.join([word_info[-1] for word_info in line])
recognized_text.append(line_text)

# Join the lines to form the final recognized text
final_text = '\n'.join(recognized_text)

print(final_text)

0 comments on commit 697cd3d

Please sign in to comment.