Skip to content

Latest commit

 

History

History
46 lines (34 loc) · 1.59 KB

README.md

File metadata and controls

46 lines (34 loc) · 1.59 KB

invoice-data-extraction

Using ML and DL to extract information from documents mostly invoices on Windows platform.

Prerequisites

Python 3.4+ installed globally.

  1. Git LFS - for installation of model weights
  2. Anaconda - for setting up environment

Add conda to path or open the project using the Anaconda prompt. But Anaconda is a heavy utility, you can choose miniconda.

Install miniconda, then add conda to path or open the project using the miniconda prompt

Installing Tessaract OCR:

Install the latest version of tessaract OCR into the C directory and add the path (C:\Program Files \Tesseract-OCR) to both System and User environment variables in Windows. Download the additional eng_layer.traineddata file and add it to C:\Program Files\Tesseract-OCR\tessdata

Install poppler

Running the Code.

  1. Clone the repository or downlaod the zip file from GitHub
 git clone https://github.com/abhayhk2001/document-data-extraction
  1. Open a Terminal window in the same folder as the downloaded code. Create a conda environment from the yml file and activate it as follows
conda env create -f env.yml
conda activate data-extraction
  1. Add the invoice to examples subfolder.

  2. To run the application.

 python main.py --file [filename relative path]
  1. Example
 python main.py --file examples\airtel_june_2012.pdf
  1. Results are stored in results.txt and table.csv within runs/detect/exp* directories.