To enhance the ability of table detection and recognition, we adopt a new table structure model——Tablemaster along with paddleocr to deal with tables. TableMaster is way faster than StructEqTable.
Modification
We add an option for table convertion. Unlike the StructEqTable, the new table model will ouput result in html codes.
Use cases (Optional)
Change the value of "model" in magic-pdf.json to switch to TableMaster.
{
// other config
"models-dir": "D:/models",
"table-config": {
"model": "TableMaster", // Another option of this value is 'struct_eqtable'
"is_table_recog_enable": false, // Table recognition is disabled by default, modify this value to enable it
"max_time": 400
}
}
Checklist
Before PR:
[ ] Pre-commit or other linting tools are used to fix the potential lint issues.
[ ] Bug fixes are fully covered by unit tests, the case that causes the bug should be added in the unit tests.
[ ] The modification is covered by complete unit tests. If not, please add more unit test to ensure the correctness.
[ ] The documentation has been modified accordingly, like docstring or example tutorials.
After PR:
[ ] If the modification has potential influence on downstream or other related projects, this PR should be tested with those projects.
[ ] CLA has been signed and all committers have signed the CLA in this PR.
Motivation
To enhance the ability of table detection and recognition, we adopt a new table structure model——Tablemaster along with paddleocr to deal with tables. TableMaster is way faster than StructEqTable.
Modification
We add an option for table convertion. Unlike the StructEqTable, the new table model will ouput result in html codes.
Use cases (Optional)
Change the value of "model" in magic-pdf.json to switch to TableMaster.
Checklist
Before PR:
After PR: