Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

albumentations TimeoutError: The read operation timed out #13577

Closed
GreatV opened this issue Aug 2, 2024 Discussed in #13576 · 0 comments · Fixed by #13583
Closed

albumentations TimeoutError: The read operation timed out #13577

GreatV opened this issue Aug 2, 2024 Discussed in #13576 · 0 comments · Fixed by #13583
Labels
bug Something isn't working

Comments

@GreatV
Copy link
Collaborator

GreatV commented Aug 2, 2024

Discussed in #13576

Originally posted by IceHowe August 2, 2024
请问这种情况是怎么回事?如何解决?

第一次训练报错,并停在最后一行

aistudio@jupyter-981592-8198827:~/work/PaddleOCR$ python tools/train.py -c configs/det/ch_PP-OCRv4/ch_PP-OCRv4_det_student.yml
[2024-08-02 16:32:56,533] [   ERROR] check_version.py:39 - Error fetching version info
Traceback (most recent call last):
  File "/home/aistudio/external-libraries/albumentations/check_version.py", line 32, in fetch_version_info
    data = response.read()
  File "/opt/conda/envs/python35-paddle120-env/lib/python3.10/http/client.py", line 481, in read
    s = self._safe_read(self.length)
  File "/opt/conda/envs/python35-paddle120-env/lib/python3.10/http/client.py", line 630, in _safe_read
    data = self.fp.read(amt)
  File "/opt/conda/envs/python35-paddle120-env/lib/python3.10/socket.py", line 705, in readinto
    return self._sock.recv_into(b)
  File "/opt/conda/envs/python35-paddle120-env/lib/python3.10/ssl.py", line 1274, in recv_into
    return self.read(nbytes, buffer)
  File "/opt/conda/envs/python35-paddle120-env/lib/python3.10/ssl.py", line 1130, in read
    return self._sslobj.read(len, buffer)
TimeoutError: The read operation timed out
[2024/08/02 16:32:56] ppocr INFO: Architecture : 
[2024/08/02 16:32:56] ppocr INFO:     Backbone : 
[2024/08/02 16:32:56] ppocr INFO:         det : True
[2024/08/02 16:32:56] ppocr INFO:         name : PPLCNetV3
[2024/08/02 16:32:56] ppocr INFO:         scale : 0.75
[2024/08/02 16:32:56] ppocr INFO:     Head : 
[2024/08/02 16:32:56] ppocr INFO:         k : 50
[2024/08/02 16:32:56] ppocr INFO:         name : DBHead
[2024/08/02 16:32:56] ppocr INFO:     Neck : 
[2024/08/02 16:32:56] ppocr INFO:         name : RSEFPN
[2024/08/02 16:32:56] ppocr INFO:         out_channels : 96
[2024/08/02 16:32:56] ppocr INFO:         shortcut : True
[2024/08/02 16:32:56] ppocr INFO:     Transform : None
[2024/08/02 16:32:56] ppocr INFO:     algorithm : DB
[2024/08/02 16:32:56] ppocr INFO:     model_type : det
[2024/08/02 16:32:56] ppocr INFO: Eval : 
[2024/08/02 16:32:56] ppocr INFO:     dataset : 
[2024/08/02 16:32:56] ppocr INFO:         data_dir : ./OCRdata/test/rgb
[2024/08/02 16:32:56] ppocr INFO:         label_file_list : ['./OCRdata/test/test.txt']
[2024/08/02 16:32:56] ppocr INFO:         name : SimpleDataSet
[2024/08/02 16:32:56] ppocr INFO:         transforms : 
[2024/08/02 16:32:56] ppocr INFO:             DecodeImage : 
[2024/08/02 16:32:56] ppocr INFO:                 channel_first : False
[2024/08/02 16:32:56] ppocr INFO:                 img_mode : BGR
[2024/08/02 16:32:56] ppocr INFO:             DetLabelEncode : None
[2024/08/02 16:32:56] ppocr INFO:             DetResizeForTest : None
[2024/08/02 16:32:56] ppocr INFO:             NormalizeImage : 
[2024/08/02 16:32:56] ppocr INFO:                 mean : [0.485, 0.456, 0.406]
[2024/08/02 16:32:56] ppocr INFO:                 order : hwc
[2024/08/02 16:32:56] ppocr INFO:                 scale : 1./255.
[2024/08/02 16:32:56] ppocr INFO:                 std : [0.229, 0.224, 0.225]
[2024/08/02 16:32:56] ppocr INFO:             ToCHWImage : None
[2024/08/02 16:32:56] ppocr INFO:             KeepKeys : 
[2024/08/02 16:32:56] ppocr INFO:                 keep_keys : ['image', 'shape', 'polys', 'ignore_tags']
[2024/08/02 16:32:56] ppocr INFO:     loader : 
[2024/08/02 16:32:56] ppocr INFO:         batch_size_per_card : 1
[2024/08/02 16:32:56] ppocr INFO:         drop_last : False
[2024/08/02 16:32:56] ppocr INFO:         num_workers : 2
[2024/08/02 16:32:56] ppocr INFO:         shuffle : False
[2024/08/02 16:32:56] ppocr INFO: Global : 
[2024/08/02 16:32:56] ppocr INFO:     cal_metric_during_train : False
[2024/08/02 16:32:56] ppocr INFO:     checkpoints : None
[2024/08/02 16:32:56] ppocr INFO:     debug : False
[2024/08/02 16:32:56] ppocr INFO:     distributed : False
[2024/08/02 16:32:56] ppocr INFO:     epoch_num : 4
[2024/08/02 16:32:56] ppocr INFO:     eval_batch_step : [0, 500]
[2024/08/02 16:32:56] ppocr INFO:     infer_img : doc/imgs_en/img_10.jpg
[2024/08/02 16:32:56] ppocr INFO:     log_smooth_window : 20
[2024/08/02 16:32:56] ppocr INFO:     pretrained_model : ./pretrained/ch_PP-OCRv4_det_train/best_accuracy.pdparams
[2024/08/02 16:32:56] ppocr INFO:     print_batch_step : 100
[2024/08/02 16:32:56] ppocr INFO:     save_epoch_step : 2
[2024/08/02 16:32:56] ppocr INFO:     save_inference_dir : None
[2024/08/02 16:32:56] ppocr INFO:     save_model_dir : ./output/ch_PP-OCRv4
[2024/08/02 16:32:56] ppocr INFO:     save_res_path : ./checkpoints/det_db/predicts_db.txt
[2024/08/02 16:32:56] ppocr INFO:     use_gpu : True
[2024/08/02 16:32:56] ppocr INFO:     use_visualdl : False
[2024/08/02 16:32:56] ppocr INFO: Loss : 
[2024/08/02 16:32:56] ppocr INFO:     alpha : 5
[2024/08/02 16:32:56] ppocr INFO:     balance_loss : True
[2024/08/02 16:32:56] ppocr INFO:     beta : 10
[2024/08/02 16:32:56] ppocr INFO:     main_loss_type : DiceLoss
[2024/08/02 16:32:56] ppocr INFO:     name : DBLoss
[2024/08/02 16:32:56] ppocr INFO:     ohem_ratio : 3
[2024/08/02 16:32:56] ppocr INFO: Metric : 
[2024/08/02 16:32:56] ppocr INFO:     main_indicator : hmean
[2024/08/02 16:32:56] ppocr INFO:     name : DetMetric
[2024/08/02 16:32:56] ppocr INFO: Optimizer : 
[2024/08/02 16:32:56] ppocr INFO:     beta1 : 0.9
[2024/08/02 16:32:56] ppocr INFO:     beta2 : 0.999
[2024/08/02 16:32:56] ppocr INFO:     lr : 
[2024/08/02 16:32:56] ppocr INFO:         learning_rate : 0.001
[2024/08/02 16:32:56] ppocr INFO:         name : Cosine
[2024/08/02 16:32:56] ppocr INFO:         warmup_epoch : 2
[2024/08/02 16:32:56] ppocr INFO:     name : Adam
[2024/08/02 16:32:56] ppocr INFO:     regularizer : 
[2024/08/02 16:32:56] ppocr INFO:         factor : 5e-05
[2024/08/02 16:32:56] ppocr INFO:         name : L2
[2024/08/02 16:32:56] ppocr INFO: PostProcess : 
[2024/08/02 16:32:56] ppocr INFO:     box_thresh : 0.6
[2024/08/02 16:32:56] ppocr INFO:     max_candidates : 1000
[2024/08/02 16:32:56] ppocr INFO:     name : DBPostProcess
[2024/08/02 16:32:56] ppocr INFO:     thresh : 0.3
[2024/08/02 16:32:56] ppocr INFO:     unclip_ratio : 1.5
[2024/08/02 16:32:56] ppocr INFO: Train : 
[2024/08/02 16:32:56] ppocr INFO:     dataset : 
[2024/08/02 16:32:56] ppocr INFO:         data_dir : ./OCRdata/train/rgb
[2024/08/02 16:32:56] ppocr INFO:         label_file_list : ['./OCRdata/train/train.txt']
[2024/08/02 16:32:56] ppocr INFO:         name : SimpleDataSet
[2024/08/02 16:32:56] ppocr INFO:         ratio_list : [1.0]
[2024/08/02 16:32:56] ppocr INFO:         transforms : 
[2024/08/02 16:32:56] ppocr INFO:             DecodeImage : 
[2024/08/02 16:32:56] ppocr INFO:                 channel_first : False
[2024/08/02 16:32:56] ppocr INFO:                 img_mode : BGR
[2024/08/02 16:32:56] ppocr INFO:             DetLabelEncode : None
[2024/08/02 16:32:56] ppocr INFO:             CopyPaste : None
[2024/08/02 16:32:56] ppocr INFO:             IaaAugment : 
[2024/08/02 16:32:56] ppocr INFO:                 augmenter_args : 
[2024/08/02 16:32:56] ppocr INFO:                     args : 
[2024/08/02 16:32:56] ppocr INFO:                         p : 0.5
[2024/08/02 16:32:56] ppocr INFO:                     type : Fliplr
[2024/08/02 16:32:56] ppocr INFO:                     args : 
[2024/08/02 16:32:56] ppocr INFO:                         rotate : [-10, 10]
[2024/08/02 16:32:56] ppocr INFO:                     type : Affine
[2024/08/02 16:32:56] ppocr INFO:                     args : 
[2024/08/02 16:32:56] ppocr INFO:                         size : [0.5, 3]
[2024/08/02 16:32:56] ppocr INFO:                     type : Resize
[2024/08/02 16:32:56] ppocr INFO:             EastRandomCropData : 
[2024/08/02 16:32:56] ppocr INFO:                 keep_ratio : True
[2024/08/02 16:32:56] ppocr INFO:                 max_tries : 50
[2024/08/02 16:32:56] ppocr INFO:                 size : [640, 640]
[2024/08/02 16:32:56] ppocr INFO:             MakeBorderMap : 
[2024/08/02 16:32:56] ppocr INFO:                 shrink_ratio : 0.4
[2024/08/02 16:32:56] ppocr INFO:                 thresh_max : 0.7
[2024/08/02 16:32:56] ppocr INFO:                 thresh_min : 0.3
[2024/08/02 16:32:56] ppocr INFO:                 total_epoch : 4
[2024/08/02 16:32:56] ppocr INFO:             MakeShrinkMap : 
[2024/08/02 16:32:56] ppocr INFO:                 min_text_size : 8
[2024/08/02 16:32:56] ppocr INFO:                 shrink_ratio : 0.4
[2024/08/02 16:32:56] ppocr INFO:                 total_epoch : 4
[2024/08/02 16:32:56] ppocr INFO:             NormalizeImage : 
[2024/08/02 16:32:56] ppocr INFO:                 mean : [0.485, 0.456, 0.406]
[2024/08/02 16:32:56] ppocr INFO:                 order : hwc
[2024/08/02 16:32:56] ppocr INFO:                 scale : 1./255.
[2024/08/02 16:32:56] ppocr INFO:                 std : [0.229, 0.224, 0.225]
[2024/08/02 16:32:56] ppocr INFO:             ToCHWImage : None
[2024/08/02 16:32:56] ppocr INFO:             KeepKeys : 
[2024/08/02 16:32:56] ppocr INFO:                 keep_keys : ['image', 'threshold_map', 'threshold_mask', 'shrink_map', 'shrink_mask']
[2024/08/02 16:32:56] ppocr INFO:     loader : 
[2024/08/02 16:32:56] ppocr INFO:         batch_size_per_card : 8
[2024/08/02 16:32:56] ppocr INFO:         drop_last : False
[2024/08/02 16:32:56] ppocr INFO:         num_workers : 8
[2024/08/02 16:32:56] ppocr INFO:         shuffle : True
[2024/08/02 16:32:56] ppocr INFO: profiler_options : None
[2024/08/02 16:32:56] ppocr INFO: train with paddle 2.6.1 and device Place(gpu:0)
[2024/08/02 16:32:56] ppocr INFO: Initialize indexs of datasets:['./OCRdata/train/train.txt']
[2024/08/02 16:32:56] ppocr INFO: Initialize indexs of datasets:['./OCRdata/test/test.txt']
W0802 16:32:56.712930  2834 gpu_resources.cc:119] Please NOTE: device: 0, GPU Compute Capability: 7.0, Driver API Version: 12.0, Runtime API Version: 11.8
W0802 16:32:56.714316  2834 gpu_resources.cc:164] device: 0, cuDNN Version: 8.9.
[2024/08/02 16:33:01] ppocr INFO: train dataloader has 1000 iters
[2024/08/02 16:33:01] ppocr INFO: valid dataloader has 2000 iters
[2024/08/02 16:33:01] ppocr WARNING: The pretrained params backbone.conv1.hardswish.scale not in model
[2024/08/02 16:33:01] ppocr WARNING: The pretrained params backbone.conv1.hardswish.bias not in model
[2024/08/02 16:33:02] ppocr INFO: load pretrain successful from ./pretrained/ch_PP-OCRv4_det_train/best_accuracy
[2024/08/02 16:33:02] ppocr INFO: During the training process, after the 0th iteration, an evaluation is run every 500 iterations

终止后重新运行,报错,并也停在最后一行

aistudio@jupyter-981592-8198827:~/work/PaddleOCR$ python tools/train.py -c configs/det/ch_PP-OCRv4/ch_PP-OCRv4_det_student.yml
[2024-08-02 16:32:56,533] [   ERROR] check_version.py:39 - Error fetching version info
Traceback (most recent call last):
  File "/home/aistudio/external-libraries/albumentations/check_version.py", line 32, in fetch_version_info
    data = response.read()
  File "/opt/conda/envs/python35-paddle120-env/lib/python3.10/http/client.py", line 481, in read
    s = self._safe_read(self.length)
  File "/opt/conda/envs/python35-paddle120-env/lib/python3.10/http/client.py", line 630, in _safe_read
    data = self.fp.read(amt)
  File "/opt/conda/envs/python35-paddle120-env/lib/python3.10/socket.py", line 705, in readinto
    return self._sock.recv_into(b)
  File "/opt/conda/envs/python35-paddle120-env/lib/python3.10/ssl.py", line 1274, in recv_into
    return self.read(nbytes, buffer)
  File "/opt/conda/envs/python35-paddle120-env/lib/python3.10/ssl.py", line 1130, in read
    return self._sslobj.read(len, buffer)
TimeoutError: The read operation timed out
[2024/08/02 16:32:56] ppocr INFO: Architecture : 
[2024/08/02 16:32:56] ppocr INFO:     Backbone : 
[2024/08/02 16:32:56] ppocr INFO:         det : True
[2024/08/02 16:32:56] ppocr INFO:         name : PPLCNetV3
[2024/08/02 16:32:56] ppocr INFO:         scale : 0.75
[2024/08/02 16:32:56] ppocr INFO:     Head : 
[2024/08/02 16:32:56] ppocr INFO:         k : 50
[2024/08/02 16:32:56] ppocr INFO:         name : DBHead
[2024/08/02 16:32:56] ppocr INFO:     Neck : 
[2024/08/02 16:32:56] ppocr INFO:         name : RSEFPN
[2024/08/02 16:32:56] ppocr INFO:         out_channels : 96
[2024/08/02 16:32:56] ppocr INFO:         shortcut : True
[2024/08/02 16:32:56] ppocr INFO:     Transform : None
[2024/08/02 16:32:56] ppocr INFO:     algorithm : DB
[2024/08/02 16:32:56] ppocr INFO:     model_type : det
[2024/08/02 16:32:56] ppocr INFO: Eval : 
[2024/08/02 16:32:56] ppocr INFO:     dataset : 
[2024/08/02 16:32:56] ppocr INFO:         data_dir : ./OCRdata/test/rgb
[2024/08/02 16:32:56] ppocr INFO:         label_file_list : ['./OCRdata/test/test.txt']
[2024/08/02 16:32:56] ppocr INFO:         name : SimpleDataSet
[2024/08/02 16:32:56] ppocr INFO:         transforms : 
[2024/08/02 16:32:56] ppocr INFO:             DecodeImage : 
[2024/08/02 16:32:56] ppocr INFO:                 channel_first : False
[2024/08/02 16:32:56] ppocr INFO:                 img_mode : BGR
[2024/08/02 16:32:56] ppocr INFO:             DetLabelEncode : None
[2024/08/02 16:32:56] ppocr INFO:             DetResizeForTest : None
[2024/08/02 16:32:56] ppocr INFO:             NormalizeImage : 
[2024/08/02 16:32:56] ppocr INFO:                 mean : [0.485, 0.456, 0.406]
[2024/08/02 16:32:56] ppocr INFO:                 order : hwc
[2024/08/02 16:32:56] ppocr INFO:                 scale : 1./255.
[2024/08/02 16:32:56] ppocr INFO:                 std : [0.229, 0.224, 0.225]
[2024/08/02 16:32:56] ppocr INFO:             ToCHWImage : None
[2024/08/02 16:32:56] ppocr INFO:             KeepKeys : 
[2024/08/02 16:32:56] ppocr INFO:                 keep_keys : ['image', 'shape', 'polys', 'ignore_tags']
[2024/08/02 16:32:56] ppocr INFO:     loader : 
[2024/08/02 16:32:56] ppocr INFO:         batch_size_per_card : 1
[2024/08/02 16:32:56] ppocr INFO:         drop_last : False
[2024/08/02 16:32:56] ppocr INFO:         num_workers : 2
[2024/08/02 16:32:56] ppocr INFO:         shuffle : False
[2024/08/02 16:32:56] ppocr INFO: Global : 
[2024/08/02 16:32:56] ppocr INFO:     cal_metric_during_train : False
[2024/08/02 16:32:56] ppocr INFO:     checkpoints : None
[2024/08/02 16:32:56] ppocr INFO:     debug : False
[2024/08/02 16:32:56] ppocr INFO:     distributed : False
[2024/08/02 16:32:56] ppocr INFO:     epoch_num : 4
[2024/08/02 16:32:56] ppocr INFO:     eval_batch_step : [0, 500]
[2024/08/02 16:32:56] ppocr INFO:     infer_img : doc/imgs_en/img_10.jpg
[2024/08/02 16:32:56] ppocr INFO:     log_smooth_window : 20
[2024/08/02 16:32:56] ppocr INFO:     pretrained_model : ./pretrained/ch_PP-OCRv4_det_train/best_accuracy.pdparams
[2024/08/02 16:32:56] ppocr INFO:     print_batch_step : 100
[2024/08/02 16:32:56] ppocr INFO:     save_epoch_step : 2
[2024/08/02 16:32:56] ppocr INFO:     save_inference_dir : None
[2024/08/02 16:32:56] ppocr INFO:     save_model_dir : ./output/ch_PP-OCRv4
[2024/08/02 16:32:56] ppocr INFO:     save_res_path : ./checkpoints/det_db/predicts_db.txt
[2024/08/02 16:32:56] ppocr INFO:     use_gpu : True
[2024/08/02 16:32:56] ppocr INFO:     use_visualdl : False
[2024/08/02 16:32:56] ppocr INFO: Loss : 
[2024/08/02 16:32:56] ppocr INFO:     alpha : 5
[2024/08/02 16:32:56] ppocr INFO:     balance_loss : True
[2024/08/02 16:32:56] ppocr INFO:     beta : 10
[2024/08/02 16:32:56] ppocr INFO:     main_loss_type : DiceLoss
[2024/08/02 16:32:56] ppocr INFO:     name : DBLoss
[2024/08/02 16:32:56] ppocr INFO:     ohem_ratio : 3
[2024/08/02 16:32:56] ppocr INFO: Metric : 
[2024/08/02 16:32:56] ppocr INFO:     main_indicator : hmean
[2024/08/02 16:32:56] ppocr INFO:     name : DetMetric
[2024/08/02 16:32:56] ppocr INFO: Optimizer : 
[2024/08/02 16:32:56] ppocr INFO:     beta1 : 0.9
[2024/08/02 16:32:56] ppocr INFO:     beta2 : 0.999
[2024/08/02 16:32:56] ppocr INFO:     lr : 
[2024/08/02 16:32:56] ppocr INFO:         learning_rate : 0.001
[2024/08/02 16:32:56] ppocr INFO:         name : Cosine
[2024/08/02 16:32:56] ppocr INFO:         warmup_epoch : 2
[2024/08/02 16:32:56] ppocr INFO:     name : Adam
[2024/08/02 16:32:56] ppocr INFO:     regularizer : 
[2024/08/02 16:32:56] ppocr INFO:         factor : 5e-05
[2024/08/02 16:32:56] ppocr INFO:         name : L2
[2024/08/02 16:32:56] ppocr INFO: PostProcess : 
[2024/08/02 16:32:56] ppocr INFO:     box_thresh : 0.6
[2024/08/02 16:32:56] ppocr INFO:     max_candidates : 1000
[2024/08/02 16:32:56] ppocr INFO:     name : DBPostProcess
[2024/08/02 16:32:56] ppocr INFO:     thresh : 0.3
[2024/08/02 16:32:56] ppocr INFO:     unclip_ratio : 1.5
[2024/08/02 16:32:56] ppocr INFO: Train : 
[2024/08/02 16:32:56] ppocr INFO:     dataset : 
[2024/08/02 16:32:56] ppocr INFO:         data_dir : ./OCRdata/train/rgb
[2024/08/02 16:32:56] ppocr INFO:         label_file_list : ['./OCRdata/train/train.txt']
[2024/08/02 16:32:56] ppocr INFO:         name : SimpleDataSet
[2024/08/02 16:32:56] ppocr INFO:         ratio_list : [1.0]
[2024/08/02 16:32:56] ppocr INFO:         transforms : 
[2024/08/02 16:32:56] ppocr INFO:             DecodeImage : 
[2024/08/02 16:32:56] ppocr INFO:                 channel_first : False
[2024/08/02 16:32:56] ppocr INFO:                 img_mode : BGR
[2024/08/02 16:32:56] ppocr INFO:             DetLabelEncode : None
[2024/08/02 16:32:56] ppocr INFO:             CopyPaste : None
[2024/08/02 16:32:56] ppocr INFO:             IaaAugment : 
[2024/08/02 16:32:56] ppocr INFO:                 augmenter_args : 
[2024/08/02 16:32:56] ppocr INFO:                     args : 
[2024/08/02 16:32:56] ppocr INFO:                         p : 0.5
[2024/08/02 16:32:56] ppocr INFO:                     type : Fliplr
[2024/08/02 16:32:56] ppocr INFO:                     args : 
[2024/08/02 16:32:56] ppocr INFO:                         rotate : [-10, 10]
[2024/08/02 16:32:56] ppocr INFO:                     type : Affine
[2024/08/02 16:32:56] ppocr INFO:                     args : 
[2024/08/02 16:32:56] ppocr INFO:                         size : [0.5, 3]
[2024/08/02 16:32:56] ppocr INFO:                     type : Resize
[2024/08/02 16:32:56] ppocr INFO:             EastRandomCropData : 
[2024/08/02 16:32:56] ppocr INFO:                 keep_ratio : True
[2024/08/02 16:32:56] ppocr INFO:                 max_tries : 50
[2024/08/02 16:32:56] ppocr INFO:                 size : [640, 640]
[2024/08/02 16:32:56] ppocr INFO:             MakeBorderMap : 
[2024/08/02 16:32:56] ppocr INFO:                 shrink_ratio : 0.4
[2024/08/02 16:32:56] ppocr INFO:                 thresh_max : 0.7
[2024/08/02 16:32:56] ppocr INFO:                 thresh_min : 0.3
[2024/08/02 16:32:56] ppocr INFO:                 total_epoch : 4
[2024/08/02 16:32:56] ppocr INFO:             MakeShrinkMap : 
[2024/08/02 16:32:56] ppocr INFO:                 min_text_size : 8
[2024/08/02 16:32:56] ppocr INFO:                 shrink_ratio : 0.4
[2024/08/02 16:32:56] ppocr INFO:                 total_epoch : 4
[2024/08/02 16:32:56] ppocr INFO:             NormalizeImage : 
[2024/08/02 16:32:56] ppocr INFO:                 mean : [0.485, 0.456, 0.406]
[2024/08/02 16:32:56] ppocr INFO:                 order : hwc
[2024/08/02 16:32:56] ppocr INFO:                 scale : 1./255.
[2024/08/02 16:32:56] ppocr INFO:                 std : [0.229, 0.224, 0.225]
[2024/08/02 16:32:56] ppocr INFO:             ToCHWImage : None
[2024/08/02 16:32:56] ppocr INFO:             KeepKeys : 
[2024/08/02 16:32:56] ppocr INFO:                 keep_keys : ['image', 'threshold_map', 'threshold_mask', 'shrink_map', 'shrink_mask']
[2024/08/02 16:32:56] ppocr INFO:     loader : 
[2024/08/02 16:32:56] ppocr INFO:         batch_size_per_card : 8
[2024/08/02 16:32:56] ppocr INFO:         drop_last : False
[2024/08/02 16:32:56] ppocr INFO:         num_workers : 8
[2024/08/02 16:32:56] ppocr INFO:         shuffle : True
[2024/08/02 16:32:56] ppocr INFO: profiler_options : None
[2024/08/02 16:32:56] ppocr INFO: train with paddle 2.6.1 and device Place(gpu:0)
[2024/08/02 16:32:56] ppocr INFO: Initialize indexs of datasets:['./OCRdata/train/train.txt']
[2024/08/02 16:32:56] ppocr INFO: Initialize indexs of datasets:['./OCRdata/test/test.txt']
W0802 16:32:56.712930  2834 gpu_resources.cc:119] Please NOTE: device: 0, GPU Compute Capability: 7.0, Driver API Version: 12.0, Runtime API Version: 11.8
W0802 16:32:56.714316  2834 gpu_resources.cc:164] device: 0, cuDNN Version: 8.9.
[2024/08/02 16:33:01] ppocr INFO: train dataloader has 1000 iters
[2024/08/02 16:33:01] ppocr INFO: valid dataloader has 2000 iters
[2024/08/02 16:33:01] ppocr WARNING: The pretrained params backbone.conv1.hardswish.scale not in model
[2024/08/02 16:33:01] ppocr WARNING: The pretrained params backbone.conv1.hardswish.bias not in model
[2024/08/02 16:33:02] ppocr INFO: load pretrain successful from ./pretrained/ch_PP-OCRv4_det_train/best_accuracy
[2024/08/02 16:33:02] ppocr INFO: During the training process, after the 0th iteration, an evaluation is run every 500 iterations

配置文件ch_PP-OCRv4_det_student.yml

Global:
  debug: false
  use_gpu: true
  epoch_num: &epoch_num 4
  log_smooth_window: 20
  print_batch_step: 100
  save_model_dir: ./output/ch_PP-OCRv4
  save_epoch_step: 2
  eval_batch_step:
  - 0
  - 500
  cal_metric_during_train: false
  checkpoints:
  pretrained_model: ./pretrained/ch_PP-OCRv4_det_train/best_accuracy.pdparams
  save_inference_dir: null
  use_visualdl: false
  infer_img: doc/imgs_en/img_10.jpg
  save_res_path: ./checkpoints/det_db/predicts_db.txt
  distributed: true

Architecture:
  model_type: det
  algorithm: DB
  Transform: null
  Backbone:
    name: PPLCNetV3
    scale: 0.75
    det: True
  Neck:
    name: RSEFPN
    out_channels: 96
    shortcut: True
  Head:
    name: DBHead
    k: 50

Loss:
  name: DBLoss
  balance_loss: true
  main_loss_type: DiceLoss
  alpha: 5
  beta: 10
  ohem_ratio: 3

Optimizer:
  name: Adam
  beta1: 0.9
  beta2: 0.999
  lr:
    name: Cosine
    learning_rate: 0.001 #(8*8c)
    warmup_epoch: 2
  regularizer:
    name: L2
    factor: 5.0e-05

PostProcess:
  name: DBPostProcess
  thresh: 0.3
  box_thresh: 0.6
  max_candidates: 1000
  unclip_ratio: 1.5

Metric:
  name: DetMetric
  main_indicator: hmean

Train:
  dataset:
    name: SimpleDataSet
    data_dir: ./OCRdata/train/rgb
    label_file_list:
      - ./OCRdata/train/train.txt
    ratio_list: [1.0]
    transforms:
    - DecodeImage:
        img_mode: BGR
        channel_first: false
    - DetLabelEncode: null
    - CopyPaste: null
    - 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
    - MakeBorderMap:
        shrink_ratio: 0.4
        thresh_min: 0.3
        thresh_max: 0.7
        total_epoch: *epoch_num
    - MakeShrinkMap:
        shrink_ratio: 0.4
        min_text_size: 8
        total_epoch: *epoch_num
    - NormalizeImage:
        scale: 1./255.
        mean:
        - 0.485
        - 0.456
        - 0.406
        std:
        - 0.229
        - 0.224
        - 0.225
        order: hwc
    - ToCHWImage: null
    - KeepKeys:
        keep_keys:
        - image
        - threshold_map
        - threshold_mask
        - shrink_map
        - shrink_mask
  loader:
    shuffle: true
    drop_last: false
    batch_size_per_card: 8
    num_workers: 8

Eval:
  dataset:
    name: SimpleDataSet
    data_dir: ./OCRdata/test/rgb
    label_file_list:
      - ./OCRdata/test/test.txt
    transforms:
    - DecodeImage:
        img_mode: BGR
        channel_first: false
    - DetLabelEncode: null
    - DetResizeForTest:
    - NormalizeImage:
        scale: 1./255.
        mean:
        - 0.485
        - 0.456
        - 0.406
        std:
        - 0.229
        - 0.224
        - 0.225
        order: hwc
    - ToCHWImage: null
    - KeepKeys:
        keep_keys:
        - image
        - shape
        - polys
        - ignore_tags
  loader:
    shuffle: false
    drop_last: false
    batch_size_per_card: 1
    num_workers: 2
profiler_options: null
@GreatV GreatV added the bug Something isn't working label Aug 2, 2024
@GreatV GreatV changed the title 训练PP-OCRv4的检测模型出现TimeoutError: The read operation timed out albumentations TimeoutError: The read operation timed out Aug 2, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant