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

padded_polygon = np.array(padding.Execute(distance)[0]) IndexError: list index out of range #11005

Open
xuxiansheng2018 opened this issue Sep 26, 2023 · 8 comments
Assignees

Comments

@xuxiansheng2018
Copy link

当我训练ppocrv4_student.yml文件的时候 出现以下问题?请问该如何解决?
[2023/09/26 21:17:23] ppocr ERROR: When parsing line crop_img/DL54532.jpg [{"transcription": "kV311东欣线", "points": [[1407, 782], [1521, 752], [1525, 772], [1413, 806]], "difficult": true}, {"transcription": "20号", "points": [[1410, 815], [1508, 793], [1519, 837], [1421, 860]], "difficult": false}, {"transcription": "20号", "points": [[1178, 885], [1252, 858], [1264, 891], [1189, 917]], "difficult": false}, {"transcription": "35kV324耀华线", "points": [[1169, 858], [1280, 821], [1283, 839], [1167, 875]], "difficult": true}]
, error happened with msg: Traceback (most recent call last):
File "/home/xuguozhu/project/PaddleOCR-dygraph/ppocr/data/simple_dataset.py", line 153, in getitem
outs = transform(data, self.ops)
File "/home/xuguozhu/project/PaddleOCR-dygraph/ppocr/data/imaug/init.py", line 56, in transform
data = op(data)
File "/home/xuguozhu/project/PaddleOCR-dygraph/ppocr/data/imaug/make_border_map.py", line 64, in call
self.draw_border_map(text_polys[i], canvas, mask=mask)
File "/home/xuguozhu/project/PaddleOCR-dygraph/ppocr/data/imaug/make_border_map.py", line 85, in draw_border_map
padded_polygon = np.array(padding.Execute(distance)[0])
IndexError: list index out of range

@xuxiansheng2018
Copy link
Author

训练在继续执行 ,但是中途会有这样的error ,请问该如何解决

@wzg722
Copy link

wzg722 commented Oct 25, 2023

请问这个问题解决了吗?我也遇到这个问题

@wangchenhong
Copy link

请问问题解决了吗?我也遇到了一样的问题

@uuleaf
Copy link

uuleaf commented Jan 7, 2024

这个问题遇到的最多了

@ariefwijaya
Copy link

I have this problem

@muthu-28
Copy link

muthu-28 commented Oct 17, 2024

i have this problem

padded_polygon = np.array(padding.Execute(distance)[0])
IndexError: list index out of range

@dosomethingbyme
Copy link

dosomethingbyme commented Oct 18, 2024 via email

@June-Hall
Copy link

我的解决方案,不知道有没有帮助

# in PaddleOCR/ppocr/data/imaug/make_border_map.py
padded_polygon = np.array(padding.Execute(distance)[0])
# updated in PaddleOCR/ppocr/data/imaug/make_border_map.py
offset_polygons = padding.Execute(distance)
if not offset_polygons:
    return
padded_polygon = np.array(offset_polygons[0])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants