Git Product home page Git Product logo

pdf-table-structure-recognition-using-deep-learning's Introduction

Table structure recognition for scholarly papers

This project contains a pipeline that takes a folder of PDF files (academic papers) and outputs CSV files of tables.

Getting Started

Install the requirements found in requirements.txt using pip install -r requirements.txt

A dataset of generated tables will be published soon. This will include the ground truth .csv files, original .tex files, .png images of the tables, .png images of the table structure.

You can generate a dataset using /tablegenerator/tablegen.py. See the README file in the tablegenerator folder for more information on this process.

Running the pipeline requires a pretrained model. At least two pretrained models will be made available: pix2pixHD and SegNet. The pix2pixHD model is based on NVIDIA's https://github.com/NVIDIA/pix2pixHD/. The SegNet model is based on https://github.com/GeorgeSeif/Semantic-Segmentation-Suite. (Encoder-Decoder with skipconnections, InceptionV4)

Running the pipeline

You can run the pipeline using python ./pipeline/batch.py. Following options are available:

  • --dataroot, folder of PDF files
  • --model, options: 'pix2pixHD' and 'encoder-decoder-skip'
  • --checkpoint_dir, required for pix2pixHD only
  • --skip_generate_images, skips the extraction of tables using pdffigures2
  • --skip_predict, skips the prediction phase
  • --skip_find_cells, skips finding the cells based on the outlines
  • --skip_extract_text, skips extracting the text from the cells using Fitz
  • --skip_create_csv, skips the creation of a csv based on the found text and cells

Installing

pip install -r requirements.txt

Pretrained models

Pretrained models and a small annotated test set can be found in the following google drive: https://drive.google.com/drive/u/0/folders/1dgKISbhBNfR8XXnIxUD_sIhwYNurKHbb

Acknowledgments

  • NVIDIA's pix2pixHD
  • George Seif's Semantic-Segmentation-Suite
  • Allen AI's Pdffigures2
  • PyMuPDF's Fitz

pdf-table-structure-recognition-using-deep-learning's People

Contributors

rinkstiekema avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.