psarpei / multi-type-td-tsr Goto Github PK
View Code? Open in Web Editor NEWExtracting Tables from Document Images using a Multi-stage Pipeline for Table Detection and Table Structure Recognition:
License: MIT License
Extracting Tables from Document Images using a Multi-stage Pipeline for Table Detection and Table Structure Recognition:
License: MIT License
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"
About the model :Multi-Type-TD-TSR, whether you can share the implemtent code
Thank you for making your source code public. Can u guys give access to your train dataset ?
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
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]))]
Can it recognize merged cells?
I couldn't find the torchvision==0.8.1 version on windows.
can it be replaced with the higher version? and could it work on CPU?
Hi, I was trying to run the model on the below image:
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.
Hey This work looks really good, may I have the training code to further fine tune it on my data-set?
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
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!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.