Coder Social home page Coder Social logo

psarpei / multi-type-td-tsr Goto Github PK

View Code? Open in Web Editor NEW
250.0 9.0 51.0 17.18 MB

Extracting Tables from Document Images using a Multi-stage Pipeline for Table Detection and Table Structure Recognition:

License: MIT License

Python 1.20% Jupyter Notebook 98.80%
image-processing deep-learning table-structure-recognition table-detection table-detection-using-deep-learning ocr ocr-recognition ocr-python natural-language-processing nlp

multi-type-td-tsr's People

Contributors

alen-smajic avatar jojoka-234 avatar lishnih avatar psarpei avatar python3-dev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

multi-type-td-tsr's Issues

Error while running colab notebook

Hello,

When I try to compile the model using your colab notebook, I get the following error:

The checkpoint state_dict contains keys that are not used by the model:
  pixel_mean
  pixel_std
  proposal_generator.anchor_generator.cell_anchors.{0, 1, 2, 3, 4}

Any idea what could be going wrong? Cheers!

Training code

Hey This work looks really good, may I have the training code to further fine tune it on my data-set?

IndexError: list index out of range

When I executed Multi-Type-TD-TSR-main/scripts/tsr.py with sample image(Multi-Type-TD-TSR-main/images/bordered_example.png),
I have an error
Multi-Type-TD-TSR-main/scripts/TSR/table_structure_recognition_lines_wol.py", line 211, in recognize_structure center = [int(row[index][j][0] + row[index][j][2] / 2) for j in range(len(row[index]))]

Script for CSV conversion possible with OCR?

Hello there, @Psarpei,

Thanks a lot for the work. I have a simple request. I checked on google collab that you have TSR.table_xml and TSR.table_csv, however, those are missing here. Especially the CSV one.

Is it feasible for you to provide that? That is my major requirement for extraction. other than that everything is working superbly good.

Hope to get some update on this

Training Data

Thank you for making your source code public. Can u guys give access to your train dataset ?

Onnx conversion of the model

First of all, thanks a lot for sharing your work. I wanted to ask you if you have tried the onnx conversion of the model or if you could provide some guidance in that direction?

Thanks

provided model config: absolute path for base

When I run with the weights and config linked in the Readme, Detectron2 cannot correctly resolve the base config file:

  File "/lib/python3.7/site-packages/detectron2/config/config.py", line 46, in merge_from_file
    loaded_cfg = self.load_yaml_with_base(cfg_filename, allow_unsafe=allow_unsafe)
  File "/lib/python3.7/site-packages/fvcore/common/config.py", line 103, in load_yaml_with_base
    base_cfg = _load_with_base(base_cfg_file)
  File "/lib/python3.7/site-packages/fvcore/common/config.py", line 93, in _load_with_base
    return cls.load_yaml_with_base(base_cfg_file, allow_unsafe=allow_unsafe)
  File "/lib/python3.7/site-packages/fvcore/common/config.py", line 59, in load_yaml_with_base
    with cls._open_cfg(filename) as f:
  File "/lib/python3.7/site-packages/detectron2/config/config.py", line 34, in _open_cfg
    return PathManager.open(filename, "r")
  File "/lib/python3.7/site-packages/iopath/common/file_io.py", line 1012, in open
    bret = handler._open(path, mode, buffering=buffering, **kwargs)  # type: ignore
  File "/lib/python3.7/site-packages/iopath/common/file_io.py", line 612, in _open
    opener=opener,
FileNotFoundError: [Errno 2] No such file or directory: '/content/Base-RCNN-FPN.yaml'

That's because your config contains

_BASE_: "/content/Base-RCNN-FPN.yaml"

Which should correctly read

_BASE_: "../configs/Base-RCNN-FPN.yaml"

or simply

_BASE_: "Base-RCNN-FPN.yaml"

list index out of range error

Hi, I was trying to run the model on the below image:
2
in Colab with following command:
!python /content/Multi_Type_TD_TSR/scripts/tsr.py --folder=/content/images --type="partially_color_inv" --img_output=/content/img_output --xml_output=/content/xml_output
But I was getting the below error:
Traceback (most recent call last): File "/content/Multi_Type_TD_TSR/scripts/tsr.py", line 30, in <module> boxes, img_processed = type_dict[args.type].recognize_structure(img) File "/content/Multi_Type_TD_TSR/scripts/TSR/table_structure_recognition_all.py", line 208, in recognize_structure center = [int(row[index][j][0] + row[index][j][2] / 2) for j in range(len(row[index]))] IndexError: list index out of range

Not sure though I have provided the correct value of 'type' flag over here.

Possibility of using Multi-Type-TD-TSR locally

Hi, great repo! I am trying out this repo as part of my project and I wish to ask is it possible to use this git repo in local jupyter environment? I faced this error as shown in the screenshot below when trying to run locally, and was unsure how to solve it. Thank you!
Screenshot 2021-10-03 at 11 15 39 PM

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.