fix bug for SLANet infer bbox error #14854
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
什么 bug
issue #14007 提到了 SLANet 推理过程中的 bbox 位置错误,同时由于 SLANet 是 PP-Structure 的表格解析模型,导致 PP-Structure 的表格及文档解析出现错误 #14850 #14337
怎么出现的
pr #13861 当中,修改了ppocr/postprocess/table_postprocess.py 当中 TableLabelDecode 的 _bbox_decode 函数,适配了 SLANet-plus 的 bbox 解码,但同时也导致了 SLANet 的 bbox 解码错误
怎么修复
回调 TableLabelDecode 的 _bbox_decode 函数 ,模仿 TableMaster 模型的处理,创建 SLANetPlusLabelDecode 类,将其 _bbox_decode 覆写为当前 TableLabelDecode 的版本,如需使用 SLANet-plus,可以使用该类进行 bbox 解码