Closed jinxiqinghuan closed 1 year ago
网络好像不会根据该参数更新,max_text_length
和image_shape
这两个参数好像是被写死是,尝试去修改了,报错位置的代码,可以跑起来,但是不知道改的对不对。还是说,这两个参数是固定的,不能被修改呢?谢谢各位大佬
网络好像不会根据该参数更新,
max_text_length
和image_shape
这两个参数好像是被写死是,尝试去修改了,报错位置的代码,可以跑起来,但是不知道改的对不对。还是说,这两个参数是固定的,不能被修改呢?谢谢各位大佬
请问你的问题解决没有?可否借鉴一下?
参考 #8549
明白了,感谢大佬!
明白了,感谢大佬!
不客气
明白了,感谢大佬!
hello sir. did your problem solved? i have faced the same error as you faced. i have a dataset with 32*128 images.
明白了,感谢大佬!
hello sir. did your problem solved? i have faced the same error as you faced. i have a dataset with 32*128 images.
Use dygraph branch!
明白了,感谢大佬!
hello sir. did your problem solved? i have faced the same error as you faced. i have a dataset with 32*128 images.
Use dygraph branch!
hello sir,
i have tried to get the ABInet recognition working for Farsi language. however, the error that i'm getting is as below. can you please help me to solve the issue. your help and time is much appreciated.
[2023/09/27 17:30:29] ppocr INFO: Architecture :
[2023/09/27 17:30:29] ppocr INFO: Backbone :
[2023/09/27 17:30:29] ppocr INFO: name : ResNet45
[2023/09/27 17:30:29] ppocr INFO: Head :
[2023/09/27 17:30:29] ppocr INFO: iter_size : 3
[2023/09/27 17:30:29] ppocr INFO: max_length : 25
[2023/09/27 17:30:29] ppocr INFO: name : ABINetHead
[2023/09/27 17:30:29] ppocr INFO: use_lang : True
[2023/09/27 17:30:29] ppocr INFO: Transform : None
[2023/09/27 17:30:29] ppocr INFO: algorithm : ABINet
[2023/09/27 17:30:29] ppocr INFO: in_channels : 3
[2023/09/27 17:30:29] ppocr INFO: model_type : rec
[2023/09/27 17:30:29] ppocr INFO: Eval :
[2023/09/27 17:30:29] ppocr INFO: dataset :
[2023/09/27 17:30:29] ppocr INFO: data_dir : /media/admin-pc-nezamabadi/Students/Dataset-IDPL-PFOD2-merge- with DR/resized/val
[2023/09/27 17:30:29] ppocr INFO: label_file_list : ['/media/admin-pc-nezamabadi/Students/Dataset-IDPL-PFOD2-merge- with DR/val.txt']
[2023/09/27 17:30:29] ppocr INFO: name : SimpleDataSet
[2023/09/27 17:30:29] ppocr INFO: transforms :
[2023/09/27 17:30:29] ppocr INFO: DecodeImage :
[2023/09/27 17:30:29] ppocr INFO: channel_first : False
[2023/09/27 17:30:29] ppocr INFO: img_mode : BGR
[2023/09/27 17:30:29] ppocr INFO: MultiLabelEncode : None
[2023/09/27 17:30:29] ppocr INFO: RecResizeImg :
[2023/09/27 17:30:29] ppocr INFO: image_shape : [3, 32, 128]
[2023/09/27 17:30:29] ppocr INFO: KeepKeys :
[2023/09/27 17:30:29] ppocr INFO: keep_keys : ['image', 'label_ctc', 'label_sar', 'length', 'valid_ratio']
[2023/09/27 17:30:29] ppocr INFO: loader :
[2023/09/27 17:30:29] ppocr INFO: batch_size_per_card : 64
[2023/09/27 17:30:29] ppocr INFO: drop_last : False
[2023/09/27 17:30:29] ppocr INFO: num_workers : 24
[2023/09/27 17:30:29] ppocr INFO: shuffle : False
[2023/09/27 17:30:29] ppocr INFO: Global :
[2023/09/27 17:30:29] ppocr INFO: cal_metric_during_train : True
[2023/09/27 17:30:29] ppocr INFO: character_dict_path : /media/admin-pc-nezamabadi/Students/Dataset-IDPL-PFOD2-merge- with DR/char.txt
[2023/09/27 17:30:29] ppocr INFO: character_type : fa
[2023/09/27 17:30:29] ppocr INFO: checkpoints : None
[2023/09/27 17:30:29] ppocr INFO: distributed : False
[2023/09/27 17:30:29] ppocr INFO: epoch_num : 1500
[2023/09/27 17:30:29] ppocr INFO: eval_batch_step : [0, 2000]
[2023/09/27 17:30:29] ppocr INFO: infer_img : None
[2023/09/27 17:30:29] ppocr INFO: infer_mode : False
[2023/09/27 17:30:29] ppocr INFO: log_smooth_window : 20
[2023/09/27 17:30:29] ppocr INFO: max_text_length : 25
[2023/09/27 17:30:29] ppocr INFO: pretrained_model : /home/admin-pc-nezamabadi/paddelpaddle-env/output-IDPL2-ABInet-06/best_accuracy
[2023/09/27 17:30:29] ppocr INFO: print_batch_step : 10
[2023/09/27 17:30:29] ppocr INFO: save_epoch_step : 100
[2023/09/27 17:30:29] ppocr INFO: save_inference_dir : None
[2023/09/27 17:30:29] ppocr INFO: save_model_dir : /home/admin-pc-nezamabadi/paddelpaddle-env/output-IDPL2-ABInet-06/
[2023/09/27 17:30:29] ppocr INFO: save_res_path : /home/admin-pc-nezamabadi/paddelpaddle-env/output-IDPL2-ABInet-06/rec/predicts_abinet.txt
[2023/09/27 17:30:29] ppocr INFO: use_gpu : True
[2023/09/27 17:30:29] ppocr INFO: use_space_char : True
[2023/09/27 17:30:29] ppocr INFO: use_visualdl : False
[2023/09/27 17:30:29] ppocr INFO: Loss :
[2023/09/27 17:30:29] ppocr INFO: name : CELoss
[2023/09/27 17:30:29] ppocr INFO: Metric :
[2023/09/27 17:30:29] ppocr INFO: main_indicator : acc
[2023/09/27 17:30:29] ppocr INFO: name : RecMetric
[2023/09/27 17:30:29] ppocr INFO: Optimizer :
[2023/09/27 17:30:29] ppocr INFO: beta1 : 0.9
[2023/09/27 17:30:29] ppocr INFO: beta2 : 0.99
[2023/09/27 17:30:29] ppocr INFO: clip_norm : 20.0
[2023/09/27 17:30:29] ppocr INFO: lr :
[2023/09/27 17:30:29] ppocr INFO: decay_epochs : [6]
[2023/09/27 17:30:29] ppocr INFO: name : Piecewise
[2023/09/27 17:30:29] ppocr INFO: values : [0.0001, 1e-05]
[2023/09/27 17:30:29] ppocr INFO: name : Adam
[2023/09/27 17:30:29] ppocr INFO: regularizer :
[2023/09/27 17:30:29] ppocr INFO: factor : 0.0
[2023/09/27 17:30:29] ppocr INFO: name : L2
[2023/09/27 17:30:29] ppocr INFO: PostProcess :
[2023/09/27 17:30:29] ppocr INFO: name : ABINetLabelDecode
[2023/09/27 17:30:29] ppocr INFO: Train :
[2023/09/27 17:30:29] ppocr INFO: dataset :
[2023/09/27 17:30:29] ppocr INFO: data_dir : /media/admin-pc-nezamabadi/Students/Dataset-IDPL-PFOD2-merge- with DR/resized/train
[2023/09/27 17:30:29] ppocr INFO: ext_op_transform_idx : 1
[2023/09/27 17:30:29] ppocr INFO: label_file_list : ['/media/admin-pc-nezamabadi/Students/Dataset-IDPL-PFOD2-merge- with DR/train.txt']
[2023/09/27 17:30:29] ppocr INFO: name : SimpleDataSet
[2023/09/27 17:30:29] ppocr INFO: transforms :
[2023/09/27 17:30:29] ppocr INFO: DecodeImage :
[2023/09/27 17:30:29] ppocr INFO: channel_first : False
[2023/09/27 17:30:29] ppocr INFO: img_mode : BGR
[2023/09/27 17:30:29] ppocr INFO: RecConAug :
[2023/09/27 17:30:29] ppocr INFO: ext_data_num : 2
[2023/09/27 17:30:29] ppocr INFO: image_shape : [32, 128, 3]
[2023/09/27 17:30:29] ppocr INFO: prob : 0.5
[2023/09/27 17:30:29] ppocr INFO: RecAug : None
[2023/09/27 17:30:29] ppocr INFO: MultiLabelEncode : None
[2023/09/27 17:30:29] ppocr INFO: RecResizeImg :
[2023/09/27 17:30:29] ppocr INFO: image_shape : [3, 32, 128]
[2023/09/27 17:30:29] ppocr INFO: KeepKeys :
[2023/09/27 17:30:29] ppocr INFO: keep_keys : ['image', 'label_ctc', 'label_sar', 'length', 'valid_ratio']
[2023/09/27 17:30:29] ppocr INFO: loader :
[2023/09/27 17:30:29] ppocr INFO: batch_size_per_card : 64
[2023/09/27 17:30:29] ppocr INFO: drop_last : True
[2023/09/27 17:30:29] ppocr INFO: num_workers : 48
[2023/09/27 17:30:29] ppocr INFO: shuffle : True
[2023/09/27 17:30:29] ppocr INFO: profiler_options : None
[2023/09/27 17:30:29] ppocr INFO: train with paddle 2.4.2 and device Place(gpu:0)
[2023/09/27 17:30:29] ppocr INFO: Initialize indexs of datasets:['/media/admin-pc-nezamabadi/Students/Dataset-IDPL-PFOD2-merge- with DR/train.txt']
[2023/09/27 17:30:30] ppocr INFO: Initialize indexs of datasets:['/media/admin-pc-nezamabadi/Students/Dataset-IDPL-PFOD2-merge- with DR/val.txt']
W0927 17:30:30.723640 5592 gpu_resources.cc:61] Please NOTE: device: 0, GPU Compute Capability: 8.6, Driver API Version: 11.7, Runtime API Version: 11.7
W0927 17:30:30.739579 5592 gpu_resources.cc:91] device: 0, cuDNN Version: 8.6.
[2023/09/27 17:30:32] ppocr INFO: train dataloader has 20291 iters
[2023/09/27 17:30:32] ppocr INFO: valid dataloader has 5060 iters
[2023/09/27 17:30:32] ppocr WARNING: The shape of model params head.cls.weight [512, 157] not matched with loaded params head.cls.weight [512, 37] !
[2023/09/27 17:30:32] ppocr WARNING: The shape of model params head.cls.bias [157] not matched with loaded params head.cls.bias [37] !
[2023/09/27 17:30:32] ppocr WARNING: The shape of model params head.language.proj.weight [157, 512] not matched with loaded params head.language.proj.weight [37, 512] !
[2023/09/27 17:30:32] ppocr WARNING: The shape of model params head.language.cls.weight [512, 157] not matched with loaded params head.language.cls.weight [512, 37] !
[2023/09/27 17:30:32] ppocr WARNING: The shape of model params head.language.cls.bias [157] not matched with loaded params head.language.cls.bias [37] !
[2023/09/27 17:30:32] ppocr WARNING: The shape of model params head.cls_align.weight [512, 157] not matched with loaded params head.cls_align.weight [512, 37] !
[2023/09/27 17:30:32] ppocr WARNING: The shape of model params head.cls_align.bias [157] not matched with loaded params head.cls_align.bias [37] !
[2023/09/27 17:30:32] ppocr INFO: load pretrain successful from /home/admin-pc-nezamabadi/paddelpaddle-env/output-IDPL2-ABInet-06/best_accuracy
[2023/09/27 17:30:32] ppocr INFO: During the training process, after the 0th iteration, an evaluation is run every 2000 iterations
Traceback (most recent call last):
File "/home/admin-pc-nezamabadi/paddelpaddle-env/PaddleOCR/tools/train.py", line 208, in
@yong-asial @andyjpaddle @jinxiqinghuan hello, i get the above error while trying to train the ''ABInet '' recognition model. have you guys any solution to solve this issue? thanks in advance.
兄弟你好,请问你的ABInet训练成功了吗,能否加个联系方式交流一下呢
兄弟你好,请问你的ABInet训练成功了吗,能否加个联系方式交流一下呢
hello my dear friend.
yes i have trained the ABInet model on my own dataset.
feel free to contact me via the following email: a.afkari74@gmail.com
兄弟你好,请问你的ABInet训练成功了吗,能否加个联系方式交流一下呢
hello my dear friend.
yes i have trained the ABInet model on my own dataset.
feel free to contact me via the following email: a.afkari74@gmail.com
Thank you《 my dear friend, I have trained the ABInet model so far, thank you for your help, if I have any other questions in the future, I will contact you through your email
兄弟你好,请问你的ABInet训练成功了吗,能否加个联系方式交流一下呢
hello my dear friend. yes i have trained the ABInet model on my own dataset. feel free to contact me via the following email: a.afkari74@gmail.com
Thank you《 my dear friend, I have trained the ABInet model so far, thank you for your help, if I have any other questions in the future, I will contact you through your email
sure, happy to help :).
我想要识别的文本比较长,所以想尝试将max_text_length设置为一个更大的数,但是改变该值后(默认为25,修改成50后),训练报错:
图片大小默认的也不符合要求,修改后(默认为[3, 32, 128]修改为[3, 32, 512])也会报错: