Closed dengmingD closed 5 months ago
i have same problem, how to fix it?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.
Global: debug: false use_gpu: true epoch_num: 200 log_smooth_window: 100 print_batch_step: 100 save_model_dir: ./output/recv4_icbc/ save_epoch_step: 1 eval_batch_step:
报错如下: [2023/08/17 16:56:36] ppocr INFO: Initialize indexs of datasets:['/media/huilang01/新加卷/ocr/icbc_code/icbc_bank_train_data/labels_50w.txt'] list index out of range [2023/08/17 16:56:37] ppocr INFO: Initialize indexs of datasets:['/media/huilang01/新加卷/ocr/icbc_code/icbc_bank_test_data/labels.txt'] Traceback (most recent call last): File "/home/huilang01/work/projects/ocr27/PaddleOCR27/tools/train.py", line 227, in
main(config, device, logger, vdl_writer)
File "/home/huilang01/work/projects/ocr27/PaddleOCR27/tools/train.py", line 135, in main
model = build_model(config['Architecture'])
File "/home/huilang01/work/projects/ocr27/PaddleOCR27/ppocr/modeling/architectures/init.py", line 34, in build_model
arch = getattr(mod, name)(config)
File "/home/huilang01/work/projects/ocr27/PaddleOCR27/ppocr/modeling/architectures/distillation_model.py", line 47, in init
model = BaseModel(model_config)
File "/home/huilang01/work/projects/ocr27/PaddleOCR27/ppocr/modeling/architectures/base_model.py", line 76, in init
self.head = build_head(config["Head"])
File "/home/huilang01/work/projects/ocr27/PaddleOCR27/ppocr/modeling/heads/init.py", line 71, in build_head
module_class = eval(module_name)(**config)
File "/home/huilang01/work/projects/ocr27/PaddleOCR27/ppocr/modeling/heads/rec_multi_head.py", line 74, in init
out_channels=out_channels_list['NRTRLabelDecode'])
KeyError: 'NRTRLabelDecode'
I0817 16:56:37.444166 3359 tcp_store.cc:257] receive shutdown event and so quit from MasterDaemon run loop
LAUNCH INFO 2023-08-17 16:56:38,217 Pod failed
问题出在这行代码: out_channels=out_channels_list['NRTRLabelDecode']) 因为字典里没有这个key所以报错,字典里只有key为‘CTCLabelDecode’的值。