Astronaut loading animation Circular loading bar

Try : Insurtech, Application Development

AgriTech(1)

Augmented Reality(20)

Clean Tech(5)

Customer Journey(12)

Design(35)

Solar Industry(6)

User Experience(55)

Edtech(10)

Events(34)

HR Tech(2)

Interviews(10)

Life@mantra(11)

Logistics(5)

Strategy(17)

Testing(9)

Android(47)

Backend(30)

Dev Ops(7)

Enterprise Solution(27)

Technology Modernization(2)

Frontend(28)

iOS(43)

Javascript(15)

AI in Insurance(35)

Insurtech(63)

Product Innovation(49)

Solutions(19)

E-health(10)

HealthTech(22)

mHealth(5)

Telehealth Care(4)

Telemedicine(5)

Artificial Intelligence(132)

Bitcoin(8)

Blockchain(19)

Cognitive Computing(7)

Computer Vision(8)

Data Science(17)

FinTech(50)

Banking(7)

Intelligent Automation(26)

Machine Learning(47)

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

Embracing the Digital Frontier: Transforming the Patient Journey in Pharma

In the realm of pharmaceuticals, the digital revolution is not just a buzzword; it’s a seismic shift reshaping the landscape of patient care. From discovery to delivery, digital technologies are revolutionizing every facet of the pharmaceutical industry. One of the most profound impacts is evident in the patient journey. Today’s Patients are more informed, engaged, and empowered than ever, thanks to the proliferation of digital tools and platforms. In this comprehensive exploration, we will delve into the multifaceted ways digital is redefining the patient journey in pharmaceuticals.

According to a report by Accenture on the rise of digital health, these are the key challenges to overcome:

  • 99% of respondents indicated that the development and commercialization of Digital Health solutions has accelerated in the past two years. As part of this, companies require various new and strengthened capabilities to execute their visions. 
  • Patients and health professionals need to trust that the data collected is accurate, safe, and secure for them to feel comfortable using it. 
  • Fragmented data or lack of access to data has been a barrier to development. An overarching guideline on data privacy is needed.

Leveraging Digital Solutions for Accessible Drug Delivery

In the pharmaceutical industry, the journey of medication from production facilities to patients’ hands is evolving with the integration of digital solutions. These technologies not only streamline logistics but also ensure that medications reach even the most remote and underserved areas. Let’s delve into how digital innovations are transforming drug delivery and backend channels in the pharmaceutical industry.

Digital Backend Channels and Supply Chain Management:

Pharmaceutical firms leverage digital tech for efficient backend operations. Software like SAP Integrated Business Planning and Oracle SCM Cloud enable real-time tracking, inventory management, and demand forecasting. With AI and analytics, companies adapt to market changes swiftly, ensuring timely medication delivery and optimized supply chain logistics.

Innovative Digital Drug Delivery Technologies:

  1. Controlled Monitoring Systems: Digital temperature monitoring systems provide digital temperature monitoring solutions using IoT sensors and cloud platforms, safeguarding temperature-sensitive medications during transit, ensuring compliance with regulatory standards, and minimizing product spoilage risk.
  1. Last-Mile Delivery Platforms: Zipline and Nimblr.ai, along with LogiNext, employ digital last-mile delivery solutions, using drones and AI-powered logistics to transport vital medical supplies efficiently to remote regions, improving accessibility for underserved communities.
  1. Telemedicine Integration with Prescription: Integrated telemedicine and prescription platforms, like Connect2Clinic, are rapidly growing in response to COVID-19. With telehealth claims at 38 times pre-pandemic levels, the industry is projected to hit $82 billion by 2028, with a 16.5% annual growth rate. Mantra Labs partnered with Connect2Clinic, enabling seamless coordination between healthcare providers, pharmacies, and patients. This facilitates virtual consultations and electronic prescribing, benefiting remote patients with medical advice and prescriptions without in-person visits. These platforms enhance healthcare access, medication adherence, and patient engagement through personalized care plans and reminders.
  1. Community Health Worker Apps: CommCare and mHealth empower community health workers with digital tools for medication distribution, education, and patient monitoring. Customizable modules enable tracking inventories, health assessments, and targeted interventions, extending pharmaceutical reach to remote communities, and ensuring essential medications reach those in need.

Through the strategic deployment of digital solutions in drug delivery and backend channels, pharmaceutical companies are overcoming barriers to access and revolutionizing healthcare delivery worldwide. By embracing innovation and collaboration, they are not only improving patient outcomes but also advancing toward a more equitable and inclusive healthcare system.

Personalized Medicine:

Wearable devices and mobile apps enable personalized medicine by collecting real-time health data and tailoring treatment plans to individual needs. For example, fitness trackers monitor activity and vital signs, customizing exercise and medication. Personalized medicine optimizes efficacy, minimizes adverse effects, and enhances patient satisfaction by leveraging patient-specific data.

Enhanced Patient Engagement:

Pharmaceutical firms utilize digital platforms for patient engagement, fostering support and education during treatment. Through social media, mobile apps, and online communities, patients connect, access resources, and receive professional support. Two-way communication enhances collaboration and decision-making, boosting treatment adherence, health outcomes, and consumer loyalty. Click here to know more.

Data-Driven Insights:

The abundance of healthcare data offers pharma companies unique opportunities to understand patient behavior and treatment patterns. By leveraging big data analytics and artificial intelligence, they extract actionable insights from various sources like electronic health records and clinical trials. These insights inform targeted marketing, product development, and patient support programs. However, ensuring data privacy and security is crucial, requiring robust regulatory frameworks and transparent practices in the digital era.

Challenges and Considerations:

Maximizing the benefits of digital technologies requires addressing challenges like patient data privacy and equitable access to healthcare tech. Stringent safeguards are needed to protect confidentiality and trust, alongside efforts to bridge the digital divide. Regulatory frameworks must evolve to balance innovation with patient safety and security amidst rapid advancements in digital health.

Key Considerations for Pharma Companies in Embracing Digital Innovation:

  • Prioritize patient-centricity in digital initiatives, focusing on improving patient outcomes and experiences.
  • Invest in robust data privacy and security measures to build and maintain patient trust.
  • Foster collaboration and partnerships with technology companies and healthcare providers to drive innovation and scalability.
  • Leverage analytics and AI to derive actionable insights from healthcare data and inform decision-making processes.
  • Continuously monitor and adapt to regulatory requirements and industry standards to ensure compliance and mitigate risks.

Conclusion:

The digital revolution is not just a paradigm shift but a catalyst for transformation across the pharmaceutical industry. By embracing digital technologies, pharma companies can unlock new opportunities to enhance the patient journey, improve treatment outcomes, and drive sustainable growth. However, realizing the full potential of digital health requires collaboration, innovation, and a steadfast commitment to addressing the challenges and considerations inherent in this transformative journey. As we navigate the digital frontier, the future of patient care promises to be more connected, personalized, and empowering than ever before.

Cancel

Knowledge thats worth delivered in your inbox

Loading More Posts ...
Go Top
ml floating chatbot