fix(BEE): recover unmatched tokens in table last row when model under-predicts row count#3728
fix(BEE): recover unmatched tokens in table last row when model under-predicts row count#3728AnkitAhlawat7742 wants to merge 4 commits into
Conversation
…-predicts row count
|
✅ DCO Check Passed Thanks @AnkitAhlawat7742, all your commits are properly signed off. 🎉 |
Merge Protections🔴 1 of 2 protections blocking · waiting on 👀 reviews
🔴 Require two reviewer for test updatesWaiting for
This rule is failing.When test data is updated, we require two reviewers
Show 1 satisfied protection🟢 Enforce conventional commitMake sure that we follow https://www.conventionalcommits.org/en/v1.0.0/
|
I, Ankit.Ahlawat@ibm.com <Ankit.Ahlawat@ibm.com>, hereby add my Signed-off-by to this commit: 8d471bc Signed-off-by: Ankit.Ahlawat@ibm.com <Ankit.Ahlawat@ibm.com>
|
@AnkitAhlawat7742 Thanks for the proposal. Before we resort to recovery-style post-processing, could you please check instead if enlarging the table detection a bit towards the bottom would cover this as well? Then we can see if that has undesired side effects on previously working tables and decide. |
4f41ef4 to
b201a88
Compare
b201a88 to
178c245
Compare
@cau-git , Thanks for the review and suggestions. I've updated the code accordingly. Please start the CI pipeline However, while testing the changes, I noticed that a large number of GT files were modified. I believe these changes are required for this fix to work, but could you please suggest if there's an alternative testing approach that would allow us to avoid modifying the GT files? |
Fix #3402
issue description
When the last row of a table sits at the very bottom edge of the table image crop , the TableFormer model fails to
predict it as a separate row. The tokens are present in the input token list and well within the page bounds, but the model simply doesn't output a row for them.
Resolves
This solution adds a post-processing recovery step in
TableStructureModel.predict_tablesthat detects word-level tokens not assigned to any predicted cell and appends them as an extra trailing row.