Try : Insurtech, Application Development

AgriTech(1)

Augmented Reality(21)

Clean Tech(9)

Customer Journey(17)

Design(45)

Solar Industry(8)

User Experience(68)

Edtech(10)

Events(34)

HR Tech(3)

Interviews(10)

Life@mantra(11)

Logistics(6)

Manufacturing(3)

Strategy(18)

Testing(9)

Android(48)

Backend(32)

Dev Ops(11)

Enterprise Solution(33)

Technology Modernization(9)

Frontend(29)

iOS(43)

Javascript(15)

AI in Insurance(38)

Insurtech(66)

Product Innovation(59)

Solutions(22)

E-health(12)

HealthTech(24)

mHealth(5)

Telehealth Care(4)

Telemedicine(5)

Artificial Intelligence(153)

Bitcoin(8)

Blockchain(19)

Cognitive Computing(8)

Computer Vision(8)

Data Science(23)

FinTech(51)

Banking(7)

Intelligent Automation(27)

Machine Learning(48)

Natural Language Processing(14)

expand Menu Filters

Tabular Data Extraction from Invoice Documents

5 minutes, 12 seconds read

The task of extracting information from tables is a long-running problem statement in the world of machine learning and image processing. Although the latest accomplishments in the field of deep learning have seen a lot of success, tabular data extraction still remains a challenge due to the vast amount of ways in which tables are represented both visually and structurally. Below are some of the examples: 

Fig. 1

Fig. 2

Fig. 3

Fig. 4

Fig. 5

Invoice Documents

Many companies process their bills in the form of invoices which contain tables that hold information about the items along with their prices and quantities. This information is generally required to be stored in databases while these invoices get processed.

Traditionally, this information is required to be hand filled into a database software however, this approach has some drawbacks:

1. The whole process is time consuming.

2. Certain errors might get induced during the data entry process.

3. Extra cost of manual data entry.

 An invoice automation system can be deployed to address these shortcomings. The idea is to upload the invoice document and the system will read and generate the tabular information in the digital format making the whole process faster and more cost-effective for companies.

Fig. 6

Fig. 6 shows a sample invoice that contains some regular invoice details such as Invoice No, Invoice Date, Company details, and two tables holding transaction information. Now, our goal is to extract the information present in the two tables.

Tabular Information

The problem of extracting tables from invoices can be condensed into 2 main subtasks.

1. Table Detection

2. Tabular Structure Extraction.

 What is Table Detection?

 Table Detection is the process of identifying and locating tables that are present in a document, usually an image. There are multiple ways to detect tables in an image. Some of the approaches make use of image processing toolkits like OpenCV while some of the other approaches use statistical models on features extracted from the documents such as Text Position and Text Characteristics. Recently more deep learning approaches have been used to detect tables using trained neural networks similar to the ones used in Object Detection.

What is Table Structure Extraction?

Table Structure Extraction is the process of extracting the tabular information once the boundaries of the table are detected through Table Detection. The information within the rows and columns is then extracted and transferred to the desired format, usually CSV or Excel file.

Table Detection using Faster RCNN

Faster RCNN is a neural network model that comes from the RCNN family. It is the successor of Fast RCNN created by Ross Girshick in 2015. The name Faster RCNN is to signify an improvement over the previous model both in terms of training speed and detection speed. 

To read more about the model framework, one can access the paper Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks.

 There are many other object detection model architectures that are available for use today. Each model comes with certain advantages and disadvantages in terms of prediction accuracy, model parameter size, inference speed, etc.

For the task of detecting tables in invoice documents, we will select the Faster RCNN model with FPN(Feature Pyramid Network) as a feature extraction network. The model is pre-trained on the ImageNet corpus using ResNET 101 architecture. The ImageNet corpus is a public dataset that consists of more than 20,000 image categories of everyday objects.  We will therefore make use of a Pytorch framework to train and test the model.

The above mentioned model gives us a fast inference time and a high Mean Average Precision. It is preferred for cases where a quick real time detection is desired.

First, the model is to be trained using public datasets for Table Detection such as Marmot and UNLV datasets. Next, we further fine-tune the model with our custom labeled dataset. For the purpose of labeling, we will follow the COCO annotation format.

Once trained, the model displayed an accuracy close to 86% on our custom dataset. There are certain scenarios where the model fails to locate the tables such as cases containing watermarks and/or overlapping texts. Tables without borders are also missed in a few instances. However, the model has shown its ability to learn from examples and detect tables in multiple different invoice documents. 

Fig. 7

After running inference on the sample invoice from Fig 6, we can see two table boundaries being detected by the model in Fig 7. The first table gets detected with 100% accuracy and the second table is detected with 99% accuracy.

Table Structure Extraction

Once the boundaries of the table are detected by the model, an OCR (Optical Character Reader) mechanism is used to extract the text within the boundaries. The text is then processed using the information that is part of a unique table.

We were able to extract the correct structure of the table, including its headers and line items using logics derived from the invoices. The difficulty of this process depends on the type of invoice format at hand.

There are multiple challenges that one may encounter while building an algorithm to extract structure. Some of them are:

  1. The span of some table columns may overlap making it difficult to determine the boundaries between columns.
  2. The fonts and sizes present within tables may vary from one table to another. The algorithm should be able to accomodate for this variation.
  3. The tables might get split into two pages and detecting the continuation of a table might be challenging.

Certain deep learning approaches have also been published recently to determine the structure of a table. However, training them on custom datasets still remains a challenge. 

Fig 8

The final result is then stored in a CSV file and can be edited or stored according to one’s convenience as shown in Fig 8 which displays the first table information.

Conclusion

The deep learning approach to extracting information from structured documents is a step in the right direction. With high accuracy and low running time, the systems can only learn to perform better with more data. The recent and upcoming advancements in computer vision approaches have made processes such as invoice automation significantly accessible and robust.

About the author:

Prateek Sethi is a Data Scientist working at Mantra Labs. His work involves leveraging Artificial Intelligence to create data-driven solutions. Apart from his work he takes a keen interest in football and exploring the outdoors.

Further Reading:

Cancel

Knowledge thats worth delivered in your inbox

Sales Applications Are Disrupting More Than Just Sales

Sales success today isn’t about luck or lofty goals—it’s about having the right tools in your team’s hands, wherever they go. Following our earlier in-depth exploration of sales technology, we will now examine how cutting-edge sales apps are becoming the backbone of modern industries, transforming complex workflows into seamless, growth-driving machines.

From retail to healthcare, logistics to real estate, businesses are deploying sales applications to enhance operational transparency, cut redundant tasks, and build intelligent sales ecosystems. These tools are not only digitizing workflows—they’re driving growth, improving engagement, and redefining how field teams operate.

Lead Ecosystems: Unified visibility across channels

One app. Five workflows. Zero friction.

A leading insurance brand relaunched their app—a sleek, powerful sales companion that’s turning everyday agents into top performers.

No more paperwork. More time to sell.

Here’s what changed:

  • Every visit is tagged, tracked, and followed through. Renewals? Never missed. Leads? Fully visible.
  • Attendance and reimbursements went on autopilot. No more manual logs. No more chasing approvals.
  • New business and renewals are tracked in real time, with accurate forecasting that sales leaders can finally trust.
  • Dashboards are clean, configurable, and useful—insights that move the business, not just report on it.
  • Seamless Integrations. API connectivity with Darwin Box, IMD Master Data, and SSO authentication for a unified experience.

The result? A field team that moves faster, sells better, and works smarter.

Retail: Taking Orders from the Frontline—Smartly

Field sales agents in retail, especially FMCG, used to rely on gut instinct. Now, with intelligent sales applications:

  • AI recommends what to upsell or cross-sell based on previous order patterns
  • Real-time stock availability and credit status are visible in the app
  • Geo-fencing ensures optimized route planning
  • Built-in payment collection modules streamline transaction closure

Healthcare: Structuring Sales with Compliance and Precision

Healthcare leaders don’t need more reports—they need better visibility from the field.  Whether it’s engaging hospital networks, onboarding clinics, or enabling diagnostics at the last mile, everything needs precision, compliance, and clarity. 

Mantra Labs helped a leading healthcare enterprise design a sales app that integrates knowledge, compliance, performance, and recognition, turning frontline agents into informed, aligned, and empowered brand advocates. 

Here’s what it delivers:

  • Role-based onboarding that keeps every level of the field force aligned and accountable
  • Escalation mechanisms are built into the system, driving transparency across commissions and performance reviews
  • A centralized Knowledge Hub featuring healthcare news, service updates, and training modules to keep reps well-informed
  • Recognition modules that celebrate milestones, boost morale, and reinforce a culture of excellence

Now, the field agents aren’t just connected—they’re aligned, upskilled, and accountable.

Real Estate: From Cold Calls to Smart Conversions

For real estate agents, timing and personalization are everything. Sales applications are evolving to include:

  • Virtual site tour integration for remote buyers
  • Mortgage and EMI calculators to increase buyer confidence
  • WhatsApp-based lead capture and nurture sequences
  • CRM integration for inventory updates and automatic scheduling

Logistics: From Chaos to Control in Field Coordination

Field agents in logistics are switching from clipboards to real-time command centers on mobile. Modern sales applications offer:

  • Live delivery status and route deviation alerts
  • Automated dispute reporting and issue resolution tracking
  • Fleet coordination through integrated GPS modules
  • Customer feedback capture and SLA dashboards

What’s new & what’s next in Sales Applications?

Here’s what’s pushing the next wave of innovation:

  • Voice-to-Text Logging: Agents dictate notes while on the move.
  • AI-Powered Nudges: Apps that suggest next-best actions based on behavior.
  • Omnichannel Communication: In-app chat, WhatsApp, email—unified.
  • Role-Based Dashboards: Different data views for admins, managers, and field reps.

What does this mean for Business Leaders?

Sales Applications are not just tactical tools. They’re platforms for transformation. With the right design, integrations, and analytics, they:

  • Replace guesswork with intelligence
  • Reduce the cost of delay and manual labor
  • Improve agent accountability and transparency
  • Speed up decision-making across hierarchies

The future of field sales lies in intuitive, AI-driven applications that adapt to every industry’s nuances. At Mantra Labs, we work closely with enterprises to custom-build sales applications that align with business objectives and ground-level realities.

Conclusion: 

If your agents still rely on Excel trackers and daily call reports, it’s time to reimagine your sales operations. Let us help you bring your field operations into the future—with tools that are fast, field-tested, and built for scale.

Cancel

Knowledge thats worth delivered in your inbox

Loading More Posts ...
Go Top
ml floating chatbot