-
Notifications
You must be signed in to change notification settings - Fork 7.9k
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
Parsing line Error: list index out of range #5101
Comments
Hi, facing this issue currently, was able run table structure recognition without any errors few days back but now getting this error:
Command ran: Thanks in advance. |
Since you haven't replied for more than 3 months, we have closed this issue/pr. |
Ubuntu18.04
Paddle 2.2.1
release2.4
pyclipper
!python tools/train.py -c configs/det/det_mv3_db.yml
问题描述
之前我有提过一个相关issue#5029,里面提到了两个问题:
通过定位我发现对于有些特别小的目标区域(或者说标注有问题的数据),通过pyclipper收缩后得到的result是一个空列表。下面是一个简易的测试脚本:
在PaddleOCR官方源码中,是没有对
padding.Execute
的结果做判断的,当结果为空列表时,就会引发Error
:PaddleOCR/ppocr/data/imaug/make_border_map.py
Lines 78 to 81 in fb3d36a
简单修复方案
将:
改成:
如果官方觉得可行,我可以再提个PR,如果有更好的解决办法,就等官方人员进行修复。
复现错误过程
test.txt
标签文件,文件里就一行信息(就是把解析报错的那行信息拿了过来)首先将
augmenter_args
关闭,发现问题依旧存在。但当我把EastRandomCropData
给关闭后,问题就无法复现了。可以确定是EastRandomCropData
的随机性导致的。查看EastRandomCropData
的__call__
方法里所采用的np.random
方法并没有固定随机数种子,接着我在random_crop_data.py
文件中把随机数种子固定成1
,这样就能保证问题每次都能复现了。顺便建议下,希望在代码里提供固定随机数种子的方法,方便大家复现错误。The text was updated successfully, but these errors were encountered: