Optical Character Recognition (OCR) on receipts and generate an Excel spreadsheet

In this demonstration, I’ll be showing you how to use the powerful combination of ChatGPT-4 and the code interpreter to perform Optical Character Recognition (OCR) on receipts and generate an Excel spreadsheet from the extracted data.

To achieve this, you’ll need a paid GPT subscription and the beta features activated in order to select the code interpreter. This feature allows you to upload one file at a time for processing.

In preparation for this demonstration, I’ve taken photos of four distinct receipts that I have on my computer, but you can easily perform this entire process using a smartphone. For optimal results, make sure to crop the images so that only the receipt is visible. If the background is busy, the OCR might encounter difficulties. In future, I will opt for a solid color background to avoid such issues.

This is my initial experiment with this process, having been intrigued by a short article on the subject. Though there is room for improvement and it’s important to verify the numbers, the potential I see here, both at personal and professional levels, is impressive. It can indeed be quite the time-saver.

I also attempted to upload all the files in a zip file, but the system attempted to process all of them as if they were the first file, leading to incorrect results. The process would be ideal for a batch of identical receipts with minimal adjustments and a single command prompt. Another possible approach could involve categorizing patterns, matching them with an identifier, and instructing GPT accordingly. I’m confident that with the right prompt, the system can deliver the expected results. There certainly must be a way to instruct GPT to process each file independently from the others via a command prompt – something to explore programmatically.

I’m sharing this experiment because I believe many can benefit from this tool. As I continue to explore these features, I’d love to hear from anyone who uncovers more capabilities of this system. 

related