PaddleOCR
PaddleOCR copied to clipboard
vqa-re 训练报错 IndexError: tuple index out of range
数据集
image/0001.jpg {"height": 308, "width": 470, "ocr_info": [{"text": "姓名", "label": "question", "bbox": [49, 58, 87, 74], "id": 0, "linking": ["0", "1"], "words": [{"box": [49.0, 58, 68.0, 74], "text": "姓"}, {"box": [68.0, 58, 87.0, 74], "text": "名"}]}, {"text": "何汊", "label": "answer", "bbox": [96, 57, 136, 79], "id": 1, "linking": ["0", "1"], "words": [{"box": [96.0, 57, 116.0, 79], "text": "何"}, {"box": [116.0, 57, 136.0, 79], "text": "汊"}]}, {"text": "性别", "label": "question", "bbox": [49, 89, 88, 107], "id": 2, "linking": ["2", "3"], "words": [{"box": [49.0, 89, 68.5, 107], "text": "性"}, {"box": [68.5, 89, 88.0, 107], "text": "别"}]}, {"text": "女", "label": "answer", "bbox": [96, 89, 117, 108], "id": 3, "linking": ["2", "3"], "words": [{"box": [96.0, 89, 117.0, 108], "text": "女"}]}, {"text": "民族", "label": "question", "bbox": [145, 90, 184, 106], "id": 4, "linking": ["4", "5"], "words": [{"box": [145.0, 90, 164.5, 106], "text": "民"}, {"box": [164.5, 90, 184.0, 106], "text": "族"}]}, {"text": "汉", "label": "answer", "bbox": [189, 88, 209, 107], "id": 5, "linking": ["4", "5"], "words": [{"box": [189.0, 88, 209.0, 107], "text": "汉"}]}, {"text": "出生", "label": "question", "bbox": [48, 121, 85, 139], "id": 6, "linking": ["6", "7"], "words": [{"box": [48.0, 121, 66.5, 139], "text": "出"}, {"box": [66.5, 121, 85.0, 139], "text": "生"}]}, {"text": "1998年5月6日", "label": "answer", "bbox": [91, 119, 238, 139], "id": 7, "linking": ["6", "7"], "words": [{"box": [91.0, 119, 107.33333333333333, 139], "text": "1"}, {"box": [107.33333333333333, 119, 123.66666666666666, 139], "text": "9"}, {"box": [123.66666666666666, 119, 140.0, 139], "text": "9"}, {"box": [140.0, 119, 156.33333333333331, 139], "text": "8"}, {"box": [156.33333333333331, 119, 172.66666666666666, 139], "text": "年"}, {"box": [172.66666666666666, 119, 189.0, 139], "text": "5"}, {"box": [189.0, 119, 205.33333333333331, 139], "text": "月"}, {"box": [205.33333333333331, 119, 221.66666666666666, 139], "text": "6"}, {"box": [221.66666666666666, 119, 238.0, 139], "text": "日"}]}, {"text": "住址", "label": "question", "bbox": [48, 156, 89, 173], "id": 8, "linking": ["8", "9"], "words": [{"box": [48.0, 156, 68.5, 173], "text": "住"}, {"box": [68.5, 156, 89.0, 173], "text": "址"}]}, {"text": "湖南省长沙某某 666号--自制数据集", "label": "answer", "bbox": [93, 155, 278, 196], "id": 9, "linking": ["8", "9"], "words": [{"box": [93.0, 155, 102.25, 196], "text": "湖"}, {"box": [102.25, 155, 111.5, 196], "text": "南"}, {"box": [111.5, 155, 120.75, 196], "text": "省"}, {"box": [120.75, 155, 130.0, 196], "text": "长"}, {"box": [130.0, 155, 139.25, 196], "text": "沙"}, {"box": [139.25, 155, 148.5, 196], "text": "某"}, {"box": [148.5, 155, 157.75, 196], "text": "某"}, {"box": [157.75, 155, 167.0, 196], "text": " "}, {"box": [167.0, 155, 176.25, 196], "text": " "}, {"box": [176.25, 155, 185.5, 196], "text": "6"}, {"box": [185.5, 155, 194.75, 196], "text": "6"}, {"box": [194.75, 155, 204.0, 196], "text": "6"}, {"box": [204.0, 155, 213.25, 196], "text": "号"}, {"box": [213.25, 155, 222.5, 196], "text": "-"}, {"box": [222.5, 155, 231.75, 196], "text": "-"}, {"box": [231.75, 155, 241.0, 196], "text": "自"}, {"box": [241.0, 155, 250.25, 196], "text": "制"}, {"box": [250.25, 155, 259.5, 196], "text": "数"}, {"box": [259.5, 155, 268.75, 196], "text": "据"}, {"box": [268.75, 155, 278.0, 196], "text": "集"}]}, {"text": "公民身份号码", "label": "question", "bbox": [45, 243, 143, 261], "id": 10, "linking": ["10", "11"], "words": [{"box": [45.0, 243, 61.33333333333333, 261], "text": "公"}, {"box": [61.33333333333333, 243, 77.66666666666666, 261], "text": "民"}, {"box": [77.66666666666666, 243, 94.0, 261], "text": "身"}, {"box": [94.0, 243, 110.33333333333333, 261], "text": "份"}, {"box": [110.33333333333333, 243, 126.66666666666666, 261], "text": "号"}, {"box": [126.66666666666666, 243, 143.0, 261], "text": "码"}]}, {"text": "081494794611860592", "label": "answer", "bbox": [145, 240, 312, 261], "id": 11, "linking": ["10", "11"], "words": [{"box": [145.0, 240, 154.27777777777777, 261], "text": "0"}, {"box": [154.27777777777777, 240, 163.55555555555554, 261], "text": "8"}, {"box": [163.55555555555554, 240, 172.83333333333334, 261], "text": "1"}, {"box": [172.83333333333334, 240, 182.11111111111111, 261], "text": "4"}, {"box": [182.11111111111111, 240, 191.38888888888889, 261], "text": "9"}, {"box": [191.38888888888889, 240, 200.66666666666669, 261], "text": "4"}, {"box": [200.66666666666669, 240, 209.94444444444446, 261], "text": "7"}, {"box": [209.94444444444446, 240, 219.22222222222223, 261], "text": "9"}, {"box": [219.22222222222223, 240, 228.5, 261], "text": "4"}, {"box": [228.5, 240, 237.77777777777777, 261], "text": "6"}, {"box": [237.77777777777777, 240, 247.05555555555557, 261], "text": "1"}, {"box": [247.05555555555557, 240, 256.33333333333337, 261], "text": "1"}, {"box": [256.33333333333337, 240, 265.6111111111111, 261], "text": "8"}, {"box": [265.6111111111111, 240, 274.8888888888889, 261], "text": "6"}, {"box": [274.8888888888889, 240, 284.1666666666667, 261], "text": "0"}, {"box": [284.1666666666667, 240, 293.44444444444446, 261], "text": "5"}, {"box": [293.44444444444446, 240, 302.72222222222223, 261], "text": "9"}, {"box": [302.72222222222223, 240, 312.0, 261], "text": "2"}]}]}
报错日志
['10', '11']
~!!!!!!!!!!!!!!!!!!
[('9',), ('1', '1'), ('3',), ('5',), ('0', '1'), ('8',), ('1',), ('6',), ('0',), ('4',), ('2',), ('7',)]
set()
~!!!!!!!!!!!!!!!!!!
[2022/08/30 18:27:53] ppocr ERROR: When parsing line image/0077.jpg {"height": 308, "width": 470, "ocr_info": [{"text": "姓名", "label": "question", "bbox": [, 59, 85, 74], "id": 0, "linking": ["0", "1"], "words": [{"box": [48.0, 59, 66.5, 74], "text": "姓"}, {"box": [66.5, 59, 85.0, 74], "text": "名"}]}, {"text": "沈奖 "label": "answer", "bbox": [98, 58, 153, 79], "id": 1, "linking": ["0", "1"], "words": [{"box": [98.0, 58, 116.33333333333333, 79], "text": "沈"}, {"box": [116.3333333333333, 58, 134.66666666666666, 79], "text": "奖"}, {"box": [134.66666666666666, 58, 153.0, 79], "text": "刭"}]}, {"text": "性别", "label": "question", "bbo[49, 90, 87, 105], "id": 2, "linking": ["2", "3"], "words": [{"box": [49.0, 90, 68.0, 105], "text": "性"}, {"box": [68.0, 90, 87.0, 105], "text": "别"}]}, {"text""男", "label": "answer", "bbox": [97, 90, 113, 107], "id": 3, "linking": ["2", "3"], "words": [{"box": [97, 90.0, 113, 107.0], "text": "男"}]}, {"text": "民族", "l": "question", "bbox": [144, 89, 183, 107], "id": 4, "linking": ["4", "5"], "words": [{"box": [144.0, 89, 163.5, 107], "text": "民"}, {"box": [163.5, 89, 183.0, 07], "text": "族"}]}, {"text": "汉", "label": "answer", "bbox": [189, 89, 209, 107], "id": 5, "linking": ["4", "5"], "words": [{"box": [189.0, 89, 209.0, 107], "text": "汉"}]}, {"text": "出生", "label": "question", "bbox": [48, 123, 85, 140], "id": 6, "linking": ["6", "7"], "words": [{"box": [48.0, 123, 66.5, 140], "text":"}, {"box": [66.5, 123, 85.0, 140], "text": "生"}]}, {"text": "1994年12月28日", "label": "answer", "bbox": [93, 118, 239, 140], "id": 7, "linking": ["6", "7"], "w": [{"box": [93.0, 118, 106.27272727272728, 140], "text": "1"}, {"box": [106.27272727272728, 118, 119.54545454545455, 140], "text": "9"}, {"box": [119.54545454545455, 118, 132.8181818181818, 140], "text": "9"}, {"box": [132.8181818181818, 118, 146.0909090909091, 140], "text": "4"}, {"box": [146.0909090909091, 118, 159.36363636363637, 140], "text": "年"}, {"box": [159.36363636363637, 118, 172.63636363636363, 140], "text": "1"}, {"box": [172.63636363636363, 118, 185.9090909090909, 14], "text": "2"}, {"box": [185.9090909090909, 118, 199.1818181818182, 140], "text": "月"}, {"box": [199.1818181818182, 118, 212.45454545454547, 140], "text": "2"}, {"box": [212.45454545454547, 118, 225.72727272727275, 140], "text": "8"}, {"box": [225.72727272727275, 118, 239.0, 140], "text": "日"}]}, {"text": "住址", "label"question", "bbox": [47, 158, 89, 174], "id": 8, "linking": ["8", "9"], "words": [{"box": [47.0, 158, 68.0, 174], "text": "住"}, {"box": [68.0, 158, 89.0, 174], "ext": "址"}]}, {"text": "浙江省杭州某某 666号--自制数据集", "label": "answer", "bbox": [93, 154, 278, 193], "id": 9, "linking": ["8", "9"], "words": [{"box": [935, 193], "text": "浙"}, {"box": [102.25, 154, 111.5, 193], "text": "江"}, {"box": [111.5, 154, 120.75, 193], "text": "省"}, {"box": [120.75, 154, 130.0, 193], "te: "杭"}, {"box": [130.0, 154, 139.25, 193], "text": "州"}, {"box": [139.25, 154, 148.5, 193], "text": "某"}, {"box": [148.5, 154, 157.75, 193], "text": "某"}, {"b [157.75, 154, 167.0, 193], "text": " "}, {"box": [167.0, 154, 176.25, 193], "text": " "}, {"box": [176.25, 154, 185.5, 193], "text": "6"}, {"box": [185.5, 154, 194.75, 193], "text": "6"}, {"box": [194.75, 154, 204.0, 193], "text": "6"}, {"box": [204.0, 154, 213.25, 193], "text": "号"}, {"box": [213.25, 154, 222.5, 193], "ext": "-"}, {"box": [222.5, 154, 231.75, 193], "text": "-"}, {"box": [231.75, 154, 241.0, 193], "text": "自"}, {"box": [241.0, 154, 250.25, 193], "text": "制"}, {ox": [250.25, 154, 259.5, 193], "text": "数"}, {"box": [259.5, 154, 268.75, 193], "text": "据"}, {"box": [268.75, 154, 278.0, 193], "text": "集"}]}, {"text": "公民", "label": "question", "bbox": [46, 243, 143, 263], "id": 10, "linking": ["10", "11"], "words": [{"box": [46.0, 243, 62.16666666666667, 263], "text": "公"}, {"bo": [62.16666666666667, 243, 78.33333333333334, 263], "text": "民"}, {"box": [78.33333333333334, 243, 94.5, 263], "text": "身"}, {"box": [94.5, 243, 110.666666666667, 263], "text": "份"}, {"box": [110.66666666666667, 243, 126.83333333333334, 263], "text": "号"}, {"box": [126.83333333333334, 243, 143.0, 263], "text": "码"}]}"text": "184760439979139742", "label": "answer", "bbox": [147, 239, 310, 259], "id": 11, "linking": ["10", "11"], "words": [{"box": [147.0, 239, 156.05555555555554, 259], "text": "1"}, {"box": [156.05555555555554, 239, 165.11111111111111, 259], "text": "8"}, {"box": [165.11111111111111, 239, 174.16666666666666, 259], "text": "4"}, {"box": [174.16666666666666, 239, 183.22222222222223, 259], "text": "7"}, {"box": [183.22222222222223, 239, 192.27777777777777, 259], "text": "6"}, {"box": [192.27777777777777, 239, 201.33333333333331, 259], "text": "0"}, {"box": [201.33333333333331, 239, 210.38888888888889, 259], "text": "4"}, {"box": [210.38888888888889, 239, 219.44444444444446, 259], "text": "3"}, {"box": [219.44444444444446, 239, 228.5, 259], "text": "9"}, {"box": [228.5, 239, 237.55555555555554, 259], "text": "9"}, {"box": [237.55555555555554, 239, 246.61111111111111, 259], "text": "7"}, {"box": [246.61111111111111, 239, 255.66666666666666, 259], "text": "9"}, {"box": [255.66666666666666, 239, 264.72222222222223, 259], "text": "1"}, {"box": [264.72222222222223, 239, 273.77777777777777, 259], "text": "3"}, {"box": [273.77777777777777, 239, 282.83333333333337, 259], "text": "9"}, {"box": [282.83333333333337, 239, 291.8888888888889, 259], "text": "7"}, {"box": [291.8888888888889, 239, 300.94444444444446, 259], "text": "4"}, {"box": [300.94444444444446, 239, 310.0, 259], "text": "2"}]}]}
, error happened with msg: Traceback (most recent call last):
File "/home/geekplusa/ai/projects/github/paddle/PaddleOCR/ppocr/data/simple_dataset.py", line 137, in __getitem__
outs = transform(data, self.ops)
File "/home/geekplusa/ai/projects/github/paddle/PaddleOCR/ppocr/data/imaug/__init__.py", line 51, in transform
data = op(data)
File "/home/geekplusa/ai/projects/github/paddle/PaddleOCR/ppocr/data/imaug/vqa/token/vqa_token_relation.py", line 36, in __call__
rel for rel in relations
File "/home/geekplusa/ai/projects/github/paddle/PaddleOCR/ppocr/data/imaug/vqa/token/vqa_token_relation.py", line 37, in <listcomp>
if rel[0] not in empty_entity and rel[1] not in empty_entity
IndexError: tuple index out of range
我训练ser时也报错
您好,麻烦问下paddlepaddle版本用的哪个,我训练re任务直接报错'paddle.fluid.core_avx.ops' has no attribute 'c broadcast'