I am trying to build an OCR feature in my Flutter app that can read hotel bills in multiple formats. The challenge is that these bills do not follow a fixed layout. From each bill, I need to extract structured fields such as:
Hotel name
Bill number
Guest name
Address
Check-in date/time
Check-out date/time
Total amount
I have tried several Flutter OCR packages such as:
google_mlkit_text_recognitionflutter_native_ocrOthers…
The issue is that these packages return raw/unformatted text, and because the bill formats vary a lot, it's difficult to extract fields reliably.
Currently, my workaround is:
Extract text using
flutter_native_ocrSend the raw text to ChatGPT Text API
Ask ChatGPT to parse and extract the required fields
This works around 90% correctly, but the API cost is high and the response time increases.
My Questions:
What is the best way to build an OCR system that can handle multiple bill formats and still extract structured data reliably?
Is there any open-source approach, ML model, or architecture commonly used for this (e.g., text classification + regex + ML models)?
Are there any articles, examples, or libraries for invoice/bill parsing in Flutter or using a backend service?
How can I reduce dependency on expensive LLM APIs while still getting clean structured data?