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.23k stars 7.82k forks source link

Docker cpu训练DB被kill #10006

Closed jiangnan-meng closed 1 year ago

jiangnan-meng commented 1 year ago

请提供下述完整信息以便快速定位问题/Please provide the following information to quickly locate the problem

grep: warning: GREP_OPTIONS is deprecated; please use an alias or script /usr/local/python3.7.0/lib/python3.7/site-packages/paddle/fluid/framework.py:301: UserWarning: You are using GPU version Paddle, but your CUDA device is not set properly. CPU device will be used by default. "You are using GPU version Paddle, but your CUDA device is not set properly. CPU device will be used by default." [2023/05/22 16:19:03] ppocr INFO: Architecture : [2023/05/22 16:19:03] ppocr INFO: Backbone : [2023/05/22 16:19:03] ppocr INFO: model_name : large [2023/05/22 16:19:03] ppocr INFO: name : MobileNetV3 [2023/05/22 16:19:03] ppocr INFO: scale : 0.5 [2023/05/22 16:19:03] ppocr INFO: Head : [2023/05/22 16:19:03] ppocr INFO: k : 50 [2023/05/22 16:19:03] ppocr INFO: name : DBHead [2023/05/22 16:19:03] ppocr INFO: Neck : [2023/05/22 16:19:03] ppocr INFO: name : DBFPN [2023/05/22 16:19:03] ppocr INFO: out_channels : 256 [2023/05/22 16:19:03] ppocr INFO: Transform : None [2023/05/22 16:19:03] ppocr INFO: algorithm : DB [2023/05/22 16:19:03] ppocr INFO: model_type : det [2023/05/22 16:19:03] ppocr INFO: Eval : [2023/05/22 16:19:03] ppocr INFO: dataset : [2023/05/22 16:19:03] ppocr INFO: data_dir : ./train_data/icdar2015/text_localization/ [2023/05/22 16:19:03] ppocr INFO: label_file_list : ['./train_data/icdar2015/text_localization/test_icdar2015_label.txt'] [2023/05/22 16:19:03] ppocr INFO: name : SimpleDataSet [2023/05/22 16:19:03] ppocr INFO: transforms : [2023/05/22 16:19:03] ppocr INFO: DecodeImage : [2023/05/22 16:19:03] ppocr INFO: channel_first : False [2023/05/22 16:19:03] ppocr INFO: img_mode : BGR [2023/05/22 16:19:03] ppocr INFO: DetLabelEncode : None [2023/05/22 16:19:03] ppocr INFO: DetResizeForTest : [2023/05/22 16:19:03] ppocr INFO: image_shape : [736, 1280] [2023/05/22 16:19:03] ppocr INFO: NormalizeImage : [2023/05/22 16:19:03] ppocr INFO: mean : [0.485, 0.456, 0.406] [2023/05/22 16:19:03] ppocr INFO: order : hwc [2023/05/22 16:19:03] ppocr INFO: scale : 1./255. [2023/05/22 16:19:03] ppocr INFO: std : [0.229, 0.224, 0.225] [2023/05/22 16:19:03] ppocr INFO: ToCHWImage : None [2023/05/22 16:19:03] ppocr INFO: KeepKeys : [2023/05/22 16:19:03] ppocr INFO: keep_keys : ['image', 'shape', 'polys', 'ignore_tags'] [2023/05/22 16:19:03] ppocr INFO: loader : [2023/05/22 16:19:03] ppocr INFO: batch_size_per_card : 1 [2023/05/22 16:19:03] ppocr INFO: drop_last : False [2023/05/22 16:19:03] ppocr INFO: num_workers : 0 [2023/05/22 16:19:03] ppocr INFO: shuffle : False [2023/05/22 16:19:03] ppocr INFO: use_shared_memory : True [2023/05/22 16:19:03] ppocr INFO: Global : [2023/05/22 16:19:03] ppocr INFO: cal_metric_during_train : False [2023/05/22 16:19:03] ppocr INFO: checkpoints : None [2023/05/22 16:19:03] ppocr INFO: distributed : False [2023/05/22 16:19:03] ppocr INFO: epoch_num : 1200 [2023/05/22 16:19:03] ppocr INFO: eval_batch_step : [0, 2000] [2023/05/22 16:19:03] ppocr INFO: infer_img : doc/imgs_en/img_10.jpg [2023/05/22 16:19:03] ppocr INFO: log_smooth_window : 20 [2023/05/22 16:19:03] ppocr INFO: pretrained_model : ./pretrain_models/MobileNetV3_large_x0_5_pretrained [2023/05/22 16:19:03] ppocr INFO: print_batch_step : 10 [2023/05/22 16:19:03] ppocr INFO: save_epoch_step : 1200 [2023/05/22 16:19:03] ppocr INFO: save_inference_dir : None [2023/05/22 16:19:03] ppocr INFO: save_model_dir : ./output/db_mv3/ [2023/05/22 16:19:03] ppocr INFO: save_res_path : ./output/det_db/predicts_db.txt [2023/05/22 16:19:03] ppocr INFO: use_gpu : False [2023/05/22 16:19:03] ppocr INFO: use_mlu : False [2023/05/22 16:19:03] ppocr INFO: use_visualdl : False [2023/05/22 16:19:03] ppocr INFO: use_xpu : False [2023/05/22 16:19:03] ppocr INFO: Loss : [2023/05/22 16:19:03] ppocr INFO: alpha : 5 [2023/05/22 16:19:03] ppocr INFO: balance_loss : True [2023/05/22 16:19:03] ppocr INFO: beta : 10 [2023/05/22 16:19:03] ppocr INFO: main_loss_type : DiceLoss [2023/05/22 16:19:03] ppocr INFO: name : DBLoss [2023/05/22 16:19:03] ppocr INFO: ohem_ratio : 3 [2023/05/22 16:19:03] ppocr INFO: Metric : [2023/05/22 16:19:03] ppocr INFO: main_indicator : hmean [2023/05/22 16:19:03] ppocr INFO: name : DetMetric [2023/05/22 16:19:03] ppocr INFO: Optimizer : [2023/05/22 16:19:03] ppocr INFO: beta1 : 0.9 [2023/05/22 16:19:03] ppocr INFO: beta2 : 0.999 [2023/05/22 16:19:03] ppocr INFO: lr : [2023/05/22 16:19:03] ppocr INFO: learning_rate : 0.001 [2023/05/22 16:19:03] ppocr INFO: name : Adam [2023/05/22 16:19:03] ppocr INFO: regularizer : [2023/05/22 16:19:03] ppocr INFO: factor : 0 [2023/05/22 16:19:03] ppocr INFO: name : L2 [2023/05/22 16:19:03] ppocr INFO: PostProcess : [2023/05/22 16:19:03] ppocr INFO: box_thresh : 0.6 [2023/05/22 16:19:03] ppocr INFO: max_candidates : 1000 [2023/05/22 16:19:03] ppocr INFO: name : DBPostProcess [2023/05/22 16:19:03] ppocr INFO: thresh : 0.3 [2023/05/22 16:19:03] ppocr INFO: unclip_ratio : 1.5 [2023/05/22 16:19:03] ppocr INFO: Train : [2023/05/22 16:19:03] ppocr INFO: dataset : [2023/05/22 16:19:03] ppocr INFO: data_dir : ./train_data/icdar2015/text_localization/ [2023/05/22 16:19:03] ppocr INFO: label_file_list : ['./train_data/icdar2015/text_localization/train_icdar2015_label.txt'] [2023/05/22 16:19:03] ppocr INFO: name : SimpleDataSet [2023/05/22 16:19:03] ppocr INFO: ratio_list : [1.0] [2023/05/22 16:19:03] ppocr INFO: transforms : [2023/05/22 16:19:03] ppocr INFO: DecodeImage : [2023/05/22 16:19:03] ppocr INFO: channel_first : False [2023/05/22 16:19:03] ppocr INFO: img_mode : BGR [2023/05/22 16:19:03] ppocr INFO: DetLabelEncode : None [2023/05/22 16:19:03] ppocr INFO: IaaAugment : [2023/05/22 16:19:03] ppocr INFO: augmenter_args : [2023/05/22 16:19:03] ppocr INFO: args : [2023/05/22 16:19:03] ppocr INFO: p : 0.5 [2023/05/22 16:19:03] ppocr INFO: type : Fliplr [2023/05/22 16:19:03] ppocr INFO: args : [2023/05/22 16:19:03] ppocr INFO: rotate : [-10, 10] [2023/05/22 16:19:03] ppocr INFO: type : Affine [2023/05/22 16:19:03] ppocr INFO: args : [2023/05/22 16:19:03] ppocr INFO: size : [0.5, 3] [2023/05/22 16:19:03] ppocr INFO: type : Resize [2023/05/22 16:19:03] ppocr INFO: EastRandomCropData : [2023/05/22 16:19:03] ppocr INFO: keep_ratio : True [2023/05/22 16:19:03] ppocr INFO: max_tries : 50 [2023/05/22 16:19:03] ppocr INFO: size : [640, 640] [2023/05/22 16:19:03] ppocr INFO: MakeBorderMap : [2023/05/22 16:19:03] ppocr INFO: shrink_ratio : 0.4 [2023/05/22 16:19:03] ppocr INFO: thresh_max : 0.7 [2023/05/22 16:19:03] ppocr INFO: thresh_min : 0.3 [2023/05/22 16:19:03] ppocr INFO: MakeShrinkMap : [2023/05/22 16:19:03] ppocr INFO: min_text_size : 8 [2023/05/22 16:19:03] ppocr INFO: shrink_ratio : 0.4 [2023/05/22 16:19:03] ppocr INFO: NormalizeImage : [2023/05/22 16:19:03] ppocr INFO: mean : [0.485, 0.456, 0.406] [2023/05/22 16:19:03] ppocr INFO: order : hwc [2023/05/22 16:19:03] ppocr INFO: scale : 1./255. [2023/05/22 16:19:03] ppocr INFO: std : [0.229, 0.224, 0.225] [2023/05/22 16:19:03] ppocr INFO: ToCHWImage : None [2023/05/22 16:19:03] ppocr INFO: KeepKeys : [2023/05/22 16:19:03] ppocr INFO: keep_keys : ['image', 'threshold_map', 'threshold_mask', 'shrink_map', 'shrink_mask'] [2023/05/22 16:19:03] ppocr INFO: loader : [2023/05/22 16:19:03] ppocr INFO: batch_size_per_card : 16 [2023/05/22 16:19:03] ppocr INFO: drop_last : False [2023/05/22 16:19:03] ppocr INFO: num_workers : 0 [2023/05/22 16:19:03] ppocr INFO: shuffle : True [2023/05/22 16:19:03] ppocr INFO: use_shared_memory : True [2023/05/22 16:19:03] ppocr INFO: profiler_options : None [2023/05/22 16:19:03] ppocr INFO: train with paddle 2.1.3 and device CPUPlace [2023/05/22 16:19:03] ppocr INFO: Initialize indexs of datasets:['./train_data/icdar2015/text_localization/train_icdar2015_label.txt'] [2023/05/22 16:19:03] ppocr INFO: Initialize indexs of datasets:['./train_data/icdar2015/text_localization/test_icdar2015_label.txt'] [2023/05/22 16:19:04] ppocr INFO: train dataloader has 63 iters [2023/05/22 16:19:04] ppocr INFO: valid dataloader has 500 iters [2023/05/22 16:19:04] ppocr INFO: load pretrain successful from ./pretrain_models/MobileNetV3_large_x0_5_pretrained [2023/05/22 16:19:04] ppocr INFO: During the training process, after the 0th iteration, an evaluation is run every 2000 iterations Killed

andyjiang1116 commented 1 year ago

训练要用gpu训练,推理的时候可以用cpu

jiangnan-meng commented 1 year ago

那怎么看一下DB的预测结果呢

andyjiang1116 commented 1 year ago

参考文档 https://github.com/PaddlePaddle/PaddleOCR/blob/release/2.6/doc/doc_ch/algorithm_det_db.md#41-python%E6%8E%A8%E7%90%86

github-actions[bot] commented 1 year ago

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.