OCR (Optical Character Recognition) is a technology that recognizes text within images to obtain structured text information. We will use DataInterpreter
for OCR information extraction from various types of receipts.
Use DataInterpreter
to perform OCR recognition on the following receipt, extract and save the total amount.
Note: You need to install Paddle-related dependencies to run this example, execute
pip install metagpt[ocr]
python examples/di/ocr_receipt.py
DataInterpreter
will save a csv file containing the total amount under current working directory.
Use DataInterpreter
to first generate a plan, then generate tool code based on paddle OCR, execute OCR processing to recognize text information in the image of the catering invoice, extract relevant data, and organize these data into a table file.