Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SLANet表格识别infer bbox坐标解码异常 #14007

Open
3 tasks done
heason8 opened this issue Oct 15, 2024 · 1 comment
Open
3 tasks done

SLANet表格识别infer bbox坐标解码异常 #14007

heason8 opened this issue Oct 15, 2024 · 1 comment
Labels
bug Something isn't working Code PR is needed This issue could inspire a code PR

Comments

@heason8
Copy link

heason8 commented Oct 15, 2024

🔎 Search before asking

  • I have searched the PaddleOCR Docs and found no similar bug report.
  • I have searched the PaddleOCR Issues and found no similar bug report.
  • I have searched the PaddleOCR Discussions and found no similar bug report.

🐛 Bug (问题描述)

使用今天最新的main代码测试表格识别,使用官方的配置文件:SLANet_ch.yml,预训练模型ch_ppstructure_mobile_v2.0_SLANet_train.tar,进行推理测试时,发现推理的bbox坐标不对
推理命令:
python tools/infer_table.py -c configs/table/SLANet_ch.yml -o Global.pretrained_model=./ppmodel/ch_ppstructure_mobile_v2.0_SLANet_train/best_accuracy.pdparams Global.infer_img=./data/table_rec_dataset/images/border_71_DQM5BMO3XYTFPBEX63FO.jpg
推理的结果如图,原图是856143,resize和padding后是488488,但是推理解码后的bbox y居然到了800多:
image
画出来的图:
border_71_DQM5BMO3XYTFPBEX63FO

而当我修改了bbox解码,直接乘 原图的w和h,居然是对的,但是原来的代码没发现什么错误...
111

border_71_DQM5BMO3XYTFPBEX63FO

还请各位大佬们帮忙解答一下

🏃‍♂️ Environment (运行环境)

10.15 github最新PaddleOCR代码

🌰 Minimal Reproducible Example (最小可复现问题的Demo)

python tools/infer_table.py -c configs/table/SLANet_ch.yml -o Global.pretrained_model=./ppmodel/ch_ppstructure_mobile_v2.0_SLANet_train/best_accuracy.pdparams Global.infer_img=./data/table_rec_dataset/images/border_71_DQM5BMO3XYTFPBEX63FO.jpg

@liu-jiaxuan
Copy link
Contributor

Hi,ch_ppstructure_mobile_v2.0_SLANet_train.tar权重是SLANet的,但main分支的后处理是SLANet_plus的,所以会出现解码错误的情况。您的修改是对的,修改之后就能够适配SLANet的权重了,我们后续会修复下这个问题~

@GreatV GreatV added bug Something isn't working Code PR is needed This issue could inspire a code PR labels Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Code PR is needed This issue could inspire a code PR
Projects
None yet
Development

No branches or pull requests

3 participants