PaddlePaddle / PaddleOCR

Awesome multilingual OCR toolkits based on PaddlePaddle (practical ultra lightweight OCR system, support 80+ languages recognition, provide data annotation and synthesis tools, support training and deployment among server, mobile, embedded and IoT devices)
https://paddlepaddle.github.io/PaddleOCR/
Apache License 2.0
44.21k stars 7.82k forks source link

使用、copy_paste.py 增强 出现root ERROR: When parsing line ....., error happened with msg: list index out of range #4128

Closed aiyodiulehuner closed 2 years ago

aiyodiulehuner commented 3 years ago

使用、copy_paste.py 增强 出现root ERROR: When parsing line ....., error happened with msg: list index out of range

aiyodiulehuner commented 3 years ago

没有人遇到吗

Evezerest commented 3 years ago

方便提供一下运行代码和完整报错么

aiyodiulehuner commented 3 years ago

方便提供一下运行代码和完整报错么 训练时异常信息: .... , error happened with msg: list index out of range [2021/09/28 06:20:00] root INFO: epoch: [1/1200], iter: 30, lr: 0.001000, loss: 5.873862, loss_shrink_maps: 3.919129, loss_threshold_maps: 1.182623, loss_binary_maps: 0.708169, reader_cost: 0.00016 s, batch_cost: 0.37958 s, samples: 40, ips: 10.53792 [2021/09/28 06:20:04] root INFO: epoch: [1/1200], iter: 40, lr: 0.001000, loss: 5.515756, loss_shrink_maps: 3.585735, loss_threshold_maps: 1.168579, loss_binary_maps: 0.660137, reader_cost: 0.00023 s, batch_cost: 0.40696 s, samples: 40, ips: 9.82890 [2021/09/28 06:20:08] root INFO: epoch: [1/1200], iter: 50, lr: 0.001000, loss: 5.161962, loss_shrink_maps: 3.485033, loss_threshold_maps: 1.076536, loss_binary_maps: 0.634769, reader_cost: 0.00016 s, batch_cost: 0.37975 s, samples: 40, ips: 10.53333 [2021/09/28 06:20:12] root INFO: epoch: [1/1200], iter: 60, lr: 0.001000, loss: 4.941066, loss_shrink_maps: 3.279912, loss_threshold_maps: 1.047168, loss_binary_maps: 0.604899, reader_cost: 0.00017 s, batch_cost: 0.39515 s, samples: 40, ips: 10.12271 [2021/09/28 06:20:16] root INFO: epoch: [1/1200], iter: 70, lr: 0.001000, loss: 4.459356, loss_shrink_maps: 2.903329, loss_threshold_maps: 1.018214, loss_binary_maps: 0.541272, reader_cost: 0.00017 s, batch_cost: 0.38742 s, samples: 40, ips: 10.32459 [2021/09/28 06:20:18] root ERROR: When parsing line img_cropall_160/crop_800_31.jpg [{"transcription": "XXX", "points": [[656, 0], [728, 0], [728, 29], [656, 29]]}, {"transcription": "5233", "points": [[470, 33], [525, 33], [525, 61], [470, 61]]}, {"transcription": "XXX", "points": [[656, 64], [729, 64], [729, 93], [656, 93]]}, {"transcription": "5234", "points": [[473, 106], [529, 106], [529, 131], [473, 131]]}, {"transcription": "XXX", "points": [[662, 133], [736, 133], [736, 161], [662, 161]]}, {"transcription": "5300", "points": [[466, 175], [522, 175], [522, 198], [466, 198]]}, {"transcription": "XXX", "points": [[657, 196], [783, 196], [783, 223], [657, 223]]}, {"transcription": "5831", "points": [[472, 238], [522, 238], [522, 261], [472, 261]]}, {"transcription": "XXXX", "points": [[656, 256], [729, 256], [729, 285], [656, 285]]}, {"transcription": "XXX", "points": [[656, 329], [727, 329], [727, 358], [656, 358]]}, {"transcription": "53-7", "points": [[475, 407], [521, 407], [521, 429], [475, 429]]}, {"transcription": "53", "points": [[633, 431], [685, 431], [685, 452], [633, 452]]}, {"transcription": "5833", "points": [[475, 530], [527, 530], [527, 554], [475, 554]]}, {"transcription": "XXX", "points": [[654, 547], [725, 547], [725, 576], [654, 576]]}, {"transcription": "5834", "points": [[472, 604], [527, 604], [527, 627], [472, 627]]}, {"transcription": "24", "points": [[654, 622], [725, 622], [725, 652], [654, 652]]}, {"transcription": "5835", "points": [[476, 691], [530, 691], [530, 714], [476, 714]]}, {"transcription": "25", "points": [[656, 712], [727, 712], [727, 739], [656, 739]]}, {"transcription": "5836", "points": [[471, 768], [526, 768], [526, 790], [471, 790]]}, {"transcription": "26", "points": [[656, 785], [727, 785], [727, 814], [656, 814]]}, {"transcription": "5832", "points": [[475, 306], [532, 306], [532, 330], [475, 330]]}, {"transcription": "XXX", "points": [[348, 643], [377, 643], [377, 795], [348, 795]]}] , error happened with msg: list index out of range [2021/09/28 06:20:19] root INFO: epoch: [1/1200], iter: 80, lr: 0.001000, loss: 4.411546, loss_shrink_maps: 2.874187, loss_threshold_maps: 0.942842, loss_binary_maps: 0.548481, reader_cost: 0.00016 s, batch_cost: 0.39462 s, samples: 40, ips: 10.13624 [2021/09/28 06:20:24] root INFO: epoch: [1/1200], iter: 90, lr: 0.001000, loss: 4.231913, loss_shrink_maps: 2.787494, loss_threshold_maps: 0.941270, loss_binary_maps: 0.530800, reader_cost: 0.00017 s, batch_cost: 0.40882 s, samples: 40, ips: 9.78436 [2021/09/28 06:20:28] root INFO: epoch: [1/1200], iter: 100, lr: 0.001000, loss: 3.957764, loss_shrink_maps: 2.540418, loss_threshold_maps: 0.928666, loss_binary_maps: 0.483782, reader_cost: 0.00016 s, batch_cost: 0.40704 s, samples: 40, ips: 9.82707 代码使用release 2.3 配置文件: Train: dataset: name: SimpleDataSet data_dir: ./train_data/jxtbsdata/text_localization/ label_file_list:

  • ./train_data/jxtbsdata/text_localization/label.txt ratio_list: [1.0] transforms:
  • DecodeImage: # load image img_mode: BGR channel_first: False
  • DetLabelEncode: # Class handling label
  • IaaAugment: augmenter_args:
  • { 'type': Fliplr, 'args': { 'p': 0.5 } }
  • { 'type': Affine, 'args': { 'rotate': [-10, 10] } }
  • { 'type': Resize, 'args': { 'size': [0.5, 3] } }
  • EastRandomCropData: size: [640, 640] max_tries: 50 keep_ratio: true
  • CopyPaste:
  • MakeBorderMap: shrink_ratio: 0.4 thresh_min: 0.3 thresh_max: 0.7
  • MakeShrinkMap: shrink_ratio: 0.4 min_text_size: 8
  • NormalizeImage: scale: 1./255. mean: [0.485, 0.456, 0.406] std: [0.229, 0.224, 0.225] order: 'hwc'
  • ToCHWImage:
  • KeepKeys: keep_keys: ['image', 'threshold_map', 'threshold_mask', 'shrink_map', 'shrink_mask'] # the order of the dataloader list loader: shuffle: True drop_last: False batch_size_per_card: 4 num_workers: 8
aiyodiulehuner commented 3 years ago

方便提供一下运行代码和完整报错么

不使用CopyPaste增强训练正常

Enchanted0911 commented 2 years ago

遇到同样问题

paddle-bot-old[bot] commented 2 years ago

Since you haven\'t replied for more than 3 months, we have closed this issue/pr. If the problem is not solved or there is a follow-up one, please reopen it at any time and we will continue to follow up. It is recommended to pull and try the latest code first. 由于您超过三个月未回复,我们将关闭这个issue/pr。 若问题未解决或有后续问题,请随时重新打开(建议先拉取最新代码进行尝试),我们会继续跟进。