Announcements
This site is in read only until July 22 as we migrate to a new platform; refer to this community post for more details.
Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Low F1 Score with Document AI on Diverse Invoice and Expense Layouts: Seeking Improvement Tips

Issue in Detail:

I'm experiencing difficulties in achieving high accuracy when using Google Document AI for parsing invoices and expenses. I am currently working with custom datasets that include approximately 1,500 images/documents per parser (Invoice Parser and Expense Parser). My goal is to reliably extract key data from these documents, but due to the diverse layouts and formats in my dataset, the F1 scores remain low, ranging between 0.75 and 0.85. This performance issue becomes even more apparent when testing with new images or documents; in these cases, predictions are frequently inaccurate or sometimes miss important fields.

What I've Already Tried:

  • I have invested significant time in annotating around 1,500 images/documents for each parser, following recommended steps to ensure consistent labeling.
  • I also followed the official annotation guidelines as recommended here to improve data quality and maintain annotation standards.
  • The dataset I’m using contains a mix of scanned documents, soft copies, regular images, and photo images, aiming to improve model robustness. However, despite these efforts, the F1 scores are not improving beyond 0.75-0.85, and model predictions on new document layouts remain inconsistent.

I would appreciate any insights or recommendations for improving model accuracy, particularly with datasets that contain various layouts. Thank you!

Solved Solved
1 3 1,949
1 ACCEPTED SOLUTION

Hi @steven_tan10,

Yes, performing data preprocessing or data cleaning before importing documents into Document AI is a key step in improving accuracy, especially when working with diverse layouts. By normalizing the layout, correcting distortions, and ensuring that the input data is clean, you give Document AI a better chance of making accurate predictions.

Once you have preprocessed your documents, you can then input them into Document AI for further analysis and extraction. This will likely lead to better results in terms of accuracy and consistency.

I hope the above information is helpful.

View solution in original post