You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
文字识别训练在初始化dataset的索引时时报错list index out of range,然后会卡在During the training process, after the 0th iteration, an evaluation is run every 2000 iterations
#12096
Closed
xiaoli0822 opened this issue
May 11, 2024
· 2 comments
请提供下述完整信息以便快速定位问题/Please provide the following information to quickly locate the problem
(PaddleOcr) ~\Desktop\PaddleOCR git:[main]
python tools/train.py -c configs/rec/PP-OCRv3/ch_PP-OCRv3_rec_distillation.yml
[2024/05/11 09:03:45] ppocr INFO: Architecture :
[2024/05/11 09:03:45] ppocr INFO: Models :
[2024/05/11 09:03:45] ppocr INFO: Student :
[2024/05/11 09:03:45] ppocr INFO: Backbone :
[2024/05/11 09:03:45] ppocr INFO: last_conv_stride : [1, 2]
[2024/05/11 09:03:45] ppocr INFO: last_pool_kernel_size : [2, 2]
[2024/05/11 09:03:45] ppocr INFO: last_pool_type : avg
[2024/05/11 09:03:45] ppocr INFO: name : MobileNetV1Enhance
[2024/05/11 09:03:45] ppocr INFO: scale : 0.5
[2024/05/11 09:03:45] ppocr INFO: Head :
[2024/05/11 09:03:45] ppocr INFO: head_list :
[2024/05/11 09:03:45] ppocr INFO: CTCHead :
[2024/05/11 09:03:45] ppocr INFO: Head :
[2024/05/11 09:03:45] ppocr INFO: fc_decay : 1e-05
[2024/05/11 09:03:45] ppocr INFO: Neck :
[2024/05/11 09:03:45] ppocr INFO: depth : 2
[2024/05/11 09:03:45] ppocr INFO: dims : 64
[2024/05/11 09:03:45] ppocr INFO: hidden_dims : 120
[2024/05/11 09:03:45] ppocr INFO: name : svtr
[2024/05/11 09:03:45] ppocr INFO: use_guide : True
[2024/05/11 09:03:45] ppocr INFO: SARHead :
[2024/05/11 09:03:45] ppocr INFO: enc_dim : 512
[2024/05/11 09:03:45] ppocr INFO: max_text_length : 25
[2024/05/11 09:03:45] ppocr INFO: name : MultiHead
[2024/05/11 09:03:45] ppocr INFO: Transform : None
[2024/05/11 09:03:45] ppocr INFO: algorithm : SVTR_LCNet
[2024/05/11 09:03:45] ppocr INFO: freeze_params : False
[2024/05/11 09:03:45] ppocr INFO: model_type : rec
[2024/05/11 09:03:45] ppocr INFO: pretrained : None
[2024/05/11 09:03:45] ppocr INFO: return_all_feats : True
[2024/05/11 09:03:45] ppocr INFO: Teacher :
[2024/05/11 09:03:45] ppocr INFO: Backbone :
[2024/05/11 09:03:45] ppocr INFO: last_conv_stride : [1, 2]
[2024/05/11 09:03:45] ppocr INFO: last_pool_kernel_size : [2, 2]
[2024/05/11 09:03:45] ppocr INFO: last_pool_type : avg
[2024/05/11 09:03:45] ppocr INFO: name : MobileNetV1Enhance
[2024/05/11 09:03:45] ppocr INFO: scale : 0.5
[2024/05/11 09:03:45] ppocr INFO: Head :
[2024/05/11 09:03:45] ppocr INFO: head_list :
[2024/05/11 09:03:45] ppocr INFO: CTCHead :
[2024/05/11 09:03:45] ppocr INFO: Head :
[2024/05/11 09:03:45] ppocr INFO: fc_decay : 1e-05
[2024/05/11 09:03:45] ppocr INFO: Neck :
[2024/05/11 09:03:45] ppocr INFO: depth : 2
[2024/05/11 09:03:45] ppocr INFO: dims : 64
[2024/05/11 09:03:45] ppocr INFO: hidden_dims : 120
[2024/05/11 09:03:45] ppocr INFO: name : svtr
[2024/05/11 09:03:45] ppocr INFO: use_guide : True
[2024/05/11 09:03:45] ppocr INFO: SARHead :
[2024/05/11 09:03:45] ppocr INFO: enc_dim : 512
[2024/05/11 09:03:45] ppocr INFO: max_text_length : 25
[2024/05/11 09:03:45] ppocr INFO: name : MultiHead
[2024/05/11 09:03:45] ppocr INFO: Transform : None
[2024/05/11 09:03:45] ppocr INFO: algorithm : SVTR_LCNet
[2024/05/11 09:03:45] ppocr INFO: freeze_params : False
[2024/05/11 09:03:45] ppocr INFO: model_type : rec
[2024/05/11 09:03:45] ppocr INFO: pretrained : None
[2024/05/11 09:03:45] ppocr INFO: return_all_feats : True
[2024/05/11 09:03:45] ppocr INFO: algorithm : Distillation
[2024/05/11 09:03:45] ppocr INFO: model_type : rec
[2024/05/11 09:03:45] ppocr INFO: name : DistillationModel
[2024/05/11 09:03:45] ppocr INFO: Eval :
[2024/05/11 09:03:45] ppocr INFO: dataset :
[2024/05/11 09:03:45] ppocr INFO: data_dir : ./train_data/rec/
[2024/05/11 09:03:45] ppocr INFO: label_file_list : ['./train_data/rec/label.txt']
[2024/05/11 09:03:45] ppocr INFO: name : SimpleDataSet
[2024/05/11 09:03:45] ppocr INFO: transforms :
[2024/05/11 09:03:45] ppocr INFO: DecodeImage :
[2024/05/11 09:03:45] ppocr INFO: channel_first : False
[2024/05/11 09:03:45] ppocr INFO: img_mode : BGR
[2024/05/11 09:03:45] ppocr INFO: MultiLabelEncode : None
[2024/05/11 09:03:45] ppocr INFO: RecResizeImg :
[2024/05/11 09:03:45] ppocr INFO: image_shape : [3, 48, 320]
[2024/05/11 09:03:45] ppocr INFO: KeepKeys :
[2024/05/11 09:03:45] ppocr INFO: keep_keys : ['image', 'label_ctc', 'label_sar', 'length', 'valid_ratio']
[2024/05/11 09:03:45] ppocr INFO: loader :
[2024/05/11 09:03:45] ppocr INFO: batch_size_per_card : 128
[2024/05/11 09:03:45] ppocr INFO: drop_last : False
[2024/05/11 09:03:45] ppocr INFO: num_workers : 4
[2024/05/11 09:03:45] ppocr INFO: shuffle : False
[2024/05/11 09:03:45] ppocr INFO: Global :
[2024/05/11 09:03:45] ppocr INFO: cal_metric_during_train : True
[2024/05/11 09:03:45] ppocr INFO: character_dict_path : ppocr/utils/ppocr_keys_v1.txt
[2024/05/11 09:03:45] ppocr INFO: checkpoints : None
[2024/05/11 09:03:45] ppocr INFO: d2s_train_image_shape : [3, 48, -1]
[2024/05/11 09:03:45] ppocr INFO: debug : False
[2024/05/11 09:03:45] ppocr INFO: distributed : False
[2024/05/11 09:03:45] ppocr INFO: epoch_num : 800
[2024/05/11 09:03:45] ppocr INFO: eval_batch_step : [0, 2000]
[2024/05/11 09:03:45] ppocr INFO: infer_img : doc/imgs_words/ch/word_1.jpg
[2024/05/11 09:03:45] ppocr INFO: infer_mode : False
[2024/05/11 09:03:45] ppocr INFO: log_smooth_window : 20
[2024/05/11 09:03:45] ppocr INFO: max_text_length : 25
[2024/05/11 09:03:45] ppocr INFO: pretrained_model : ./pretrain_models/ch_PP-OCRv3_rec_train/best_accuracy
[2024/05/11 09:03:45] ppocr INFO: print_batch_step : 10
[2024/05/11 09:03:45] ppocr INFO: save_epoch_step : 3
[2024/05/11 09:03:45] ppocr INFO: save_inference_dir : None
[2024/05/11 09:03:45] ppocr INFO: save_model_dir : ./output/rec_ppocr_v3_distillation
[2024/05/11 09:03:45] ppocr INFO: save_res_path : ./output/rec/predicts_ppocrv3_distillation.txt
[2024/05/11 09:03:45] ppocr INFO: use_gpu : False
[2024/05/11 09:03:45] ppocr INFO: use_space_char : True
[2024/05/11 09:03:45] ppocr INFO: use_visualdl : False
[2024/05/11 09:03:45] ppocr INFO: Loss :
[2024/05/11 09:03:45] ppocr INFO: loss_config_list :
[2024/05/11 09:03:45] ppocr INFO: DistillationDMLLoss :
[2024/05/11 09:03:45] ppocr INFO: act : softmax
[2024/05/11 09:03:45] ppocr INFO: dis_head : ctc
[2024/05/11 09:03:45] ppocr INFO: key : head_out
[2024/05/11 09:03:45] ppocr INFO: model_name_pairs : [['Student', 'Teacher']]
[2024/05/11 09:03:45] ppocr INFO: multi_head : True
[2024/05/11 09:03:45] ppocr INFO: name : dml_ctc
[2024/05/11 09:03:45] ppocr INFO: use_log : True
[2024/05/11 09:03:45] ppocr INFO: weight : 1.0
[2024/05/11 09:03:45] ppocr INFO: DistillationDMLLoss :
[2024/05/11 09:03:45] ppocr INFO: act : softmax
[2024/05/11 09:03:45] ppocr INFO: dis_head : sar
[2024/05/11 09:03:45] ppocr INFO: key : head_out
[2024/05/11 09:03:45] ppocr INFO: model_name_pairs : [['Student', 'Teacher']]
[2024/05/11 09:03:45] ppocr INFO: multi_head : True
[2024/05/11 09:03:45] ppocr INFO: name : dml_sar
[2024/05/11 09:03:45] ppocr INFO: use_log : True
[2024/05/11 09:03:45] ppocr INFO: weight : 0.5
[2024/05/11 09:03:45] ppocr INFO: DistillationDistanceLoss :
[2024/05/11 09:03:45] ppocr INFO: key : backbone_out
[2024/05/11 09:03:45] ppocr INFO: mode : l2
[2024/05/11 09:03:45] ppocr INFO: model_name_pairs : [['Student', 'Teacher']]
[2024/05/11 09:03:45] ppocr INFO: weight : 1.0
[2024/05/11 09:03:45] ppocr INFO: DistillationCTCLoss :
[2024/05/11 09:03:45] ppocr INFO: key : head_out
[2024/05/11 09:03:45] ppocr INFO: model_name_list : ['Student', 'Teacher']
[2024/05/11 09:03:45] ppocr INFO: multi_head : True
[2024/05/11 09:03:45] ppocr INFO: weight : 1.0
[2024/05/11 09:03:45] ppocr INFO: DistillationSARLoss :
[2024/05/11 09:03:45] ppocr INFO: key : head_out
[2024/05/11 09:03:45] ppocr INFO: model_name_list : ['Student', 'Teacher']
[2024/05/11 09:03:45] ppocr INFO: multi_head : True
[2024/05/11 09:03:45] ppocr INFO: weight : 1.0
[2024/05/11 09:03:45] ppocr INFO: name : CombinedLoss
[2024/05/11 09:03:45] ppocr INFO: Metric :
[2024/05/11 09:03:45] ppocr INFO: base_metric_name : RecMetric
[2024/05/11 09:03:45] ppocr INFO: ignore_space : False
[2024/05/11 09:03:45] ppocr INFO: key : Student
[2024/05/11 09:03:45] ppocr INFO: main_indicator : acc
[2024/05/11 09:03:45] ppocr INFO: name : DistillationMetric
[2024/05/11 09:03:45] ppocr INFO: Optimizer :
[2024/05/11 09:03:45] ppocr INFO: beta1 : 0.9
[2024/05/11 09:03:45] ppocr INFO: beta2 : 0.999
[2024/05/11 09:03:45] ppocr INFO: lr :
[2024/05/11 09:03:45] ppocr INFO: decay_epochs : [700]
[2024/05/11 09:03:45] ppocr INFO: name : Piecewise
[2024/05/11 09:03:45] ppocr INFO: values : [0.0005, 5e-05]
[2024/05/11 09:03:45] ppocr INFO: warmup_epoch : 5
[2024/05/11 09:03:45] ppocr INFO: name : Adam
[2024/05/11 09:03:45] ppocr INFO: regularizer :
[2024/05/11 09:03:45] ppocr INFO: factor : 3e-05
[2024/05/11 09:03:45] ppocr INFO: name : L2
[2024/05/11 09:03:45] ppocr INFO: PostProcess :
[2024/05/11 09:03:45] ppocr INFO: key : head_out
[2024/05/11 09:03:45] ppocr INFO: model_name : ['Student', 'Teacher']
[2024/05/11 09:03:45] ppocr INFO: multi_head : True
[2024/05/11 09:03:45] ppocr INFO: name : DistillationCTCLabelDecode
[2024/05/11 09:03:45] ppocr INFO: Train :
[2024/05/11 09:03:45] ppocr INFO: dataset :
[2024/05/11 09:03:45] ppocr INFO: data_dir : ./train_data/rec/
[2024/05/11 09:03:45] ppocr INFO: ext_op_transform_idx : 1
[2024/05/11 09:03:45] ppocr INFO: label_file_list : ['./train_data/rec/label.txt']
[2024/05/11 09:03:45] ppocr INFO: name : SimpleDataSet
[2024/05/11 09:03:45] ppocr INFO: transforms :
[2024/05/11 09:03:45] ppocr INFO: DecodeImage :
[2024/05/11 09:03:45] ppocr INFO: channel_first : False
[2024/05/11 09:03:45] ppocr INFO: img_mode : BGR
[2024/05/11 09:03:45] ppocr INFO: RecConAug :
[2024/05/11 09:03:45] ppocr INFO: ext_data_num : 2
[2024/05/11 09:03:45] ppocr INFO: image_shape : [48, 320, 3]
[2024/05/11 09:03:45] ppocr INFO: max_text_length : 25
[2024/05/11 09:03:45] ppocr INFO: prob : 0.5
[2024/05/11 09:03:45] ppocr INFO: RecAug : None
[2024/05/11 09:03:45] ppocr INFO: MultiLabelEncode : None
[2024/05/11 09:03:45] ppocr INFO: RecResizeImg :
[2024/05/11 09:03:45] ppocr INFO: image_shape : [3, 48, 320]
[2024/05/11 09:03:45] ppocr INFO: KeepKeys :
[2024/05/11 09:03:45] ppocr INFO: keep_keys : ['image', 'label_ctc', 'label_sar', 'length', 'valid_ratio']
[2024/05/11 09:03:45] ppocr INFO: loader :
[2024/05/11 09:03:45] ppocr INFO: batch_size_per_card : 128
[2024/05/11 09:03:45] ppocr INFO: drop_last : True
[2024/05/11 09:03:45] ppocr INFO: num_workers : 4
[2024/05/11 09:03:45] ppocr INFO: shuffle : True
[2024/05/11 09:03:45] ppocr INFO: profiler_options : None
[2024/05/11 09:03:45] ppocr INFO: train with paddle 2.6.1 and device Place(cpu)
[2024/05/11 09:03:45] ppocr INFO: Initialize indexs of datasets:['./train_data/rec/label.txt']
list index out of range
[2024/05/11 09:03:45] ppocr INFO: Initialize indexs of datasets:['./train_data/rec/label.txt']
[2024/05/11 09:03:47] ppocr INFO: train dataloader has 782 iters
[2024/05/11 09:03:47] ppocr INFO: valid dataloader has 783 iters
[2024/05/11 09:03:47] ppocr INFO: load pretrain successful from ./pretrain_models/ch_PP-OCRv3_rec_train/best_accuracy
[2024/05/11 09:03:47] ppocr INFO: During the training process, after the 0th iteration, an evaluation is run every 2000 iterations
The text was updated successfully, but these errors were encountered: