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

请问我在做文本检测训练时precision和recall为0, 做文本识别训练时acc为0,是为什么?求解答!! #10945

Closed SlothShulan closed 5 months ago

SlothShulan commented 1 year ago

(mypaddle) D:\C#\PaddleGUI\PaddleGUI\bin\x64\Debug\PaddleOCR-release-2.7>python tools/train.py -c configs/det/ch_PP-OCRv3/ch_PP-OCRv3_det_cml.yml [2023/09/20 11:11:32] ppocr INFO: Architecture : [2023/09/20 11:11:32] ppocr INFO: Models : [2023/09/20 11:11:32] ppocr INFO: Student : [2023/09/20 11:11:32] ppocr INFO: Backbone : [2023/09/20 11:11:32] ppocr INFO: disable_se : True [2023/09/20 11:11:32] ppocr INFO: model_name : large [2023/09/20 11:11:32] ppocr INFO: name : MobileNetV3 [2023/09/20 11:11:32] ppocr INFO: scale : 0.5 [2023/09/20 11:11:32] ppocr INFO: Head : [2023/09/20 11:11:32] ppocr INFO: k : 50 [2023/09/20 11:11:32] ppocr INFO: name : DBHead [2023/09/20 11:11:32] ppocr INFO: Neck : [2023/09/20 11:11:32] ppocr INFO: name : RSEFPN [2023/09/20 11:11:32] ppocr INFO: out_channels : 96 [2023/09/20 11:11:32] ppocr INFO: shortcut : True [2023/09/20 11:11:32] ppocr INFO: Transform : None [2023/09/20 11:11:32] ppocr INFO: algorithm : DB [2023/09/20 11:11:32] ppocr INFO: model_type : det [2023/09/20 11:11:32] ppocr INFO: pretrained : None [2023/09/20 11:11:32] ppocr INFO: Student2 : [2023/09/20 11:11:32] ppocr INFO: Backbone : [2023/09/20 11:11:32] ppocr INFO: disable_se : True [2023/09/20 11:11:32] ppocr INFO: model_name : large [2023/09/20 11:11:32] ppocr INFO: name : MobileNetV3 [2023/09/20 11:11:32] ppocr INFO: scale : 0.5 [2023/09/20 11:11:32] ppocr INFO: Head : [2023/09/20 11:11:32] ppocr INFO: k : 50 [2023/09/20 11:11:32] ppocr INFO: name : DBHead [2023/09/20 11:11:32] ppocr INFO: Neck : [2023/09/20 11:11:32] ppocr INFO: name : RSEFPN [2023/09/20 11:11:32] ppocr INFO: out_channels : 96 [2023/09/20 11:11:32] ppocr INFO: shortcut : True [2023/09/20 11:11:32] ppocr INFO: Transform : None [2023/09/20 11:11:32] ppocr INFO: algorithm : DB [2023/09/20 11:11:32] ppocr INFO: model_type : det [2023/09/20 11:11:32] ppocr INFO: pretrained : None [2023/09/20 11:11:32] ppocr INFO: Teacher : [2023/09/20 11:11:32] ppocr INFO: Backbone : [2023/09/20 11:11:32] ppocr INFO: in_channels : 3 [2023/09/20 11:11:32] ppocr INFO: layers : 50 [2023/09/20 11:11:32] ppocr INFO: name : ResNet_vd [2023/09/20 11:11:32] ppocr INFO: Head : [2023/09/20 11:11:32] ppocr INFO: k : 50 [2023/09/20 11:11:32] ppocr INFO: kernel_list : [7, 2, 2] [2023/09/20 11:11:32] ppocr INFO: name : DBHead [2023/09/20 11:11:32] ppocr INFO: Neck : [2023/09/20 11:11:32] ppocr INFO: name : LKPAN [2023/09/20 11:11:32] ppocr INFO: out_channels : 256 [2023/09/20 11:11:32] ppocr INFO: algorithm : DB [2023/09/20 11:11:32] ppocr INFO: freeze_params : True [2023/09/20 11:11:32] ppocr INFO: model_type : det [2023/09/20 11:11:32] ppocr INFO: return_all_feats : False [2023/09/20 11:11:32] ppocr INFO: algorithm : Distillation [2023/09/20 11:11:32] ppocr INFO: model_type : det [2023/09/20 11:11:32] ppocr INFO: name : DistillationModel [2023/09/20 11:11:32] ppocr INFO: Eval : [2023/09/20 11:11:32] ppocr INFO: dataset : [2023/09/20 11:11:32] ppocr INFO: data_dir : ./train_data/det/ [2023/09/20 11:11:32] ppocr INFO: label_file_list : ['./train_data/det/val.txt'] [2023/09/20 11:11:32] ppocr INFO: name : SimpleDataSet [2023/09/20 11:11:32] ppocr INFO: transforms : [2023/09/20 11:11:32] ppocr INFO: DecodeImage : [2023/09/20 11:11:32] ppocr INFO: channel_first : False [2023/09/20 11:11:32] ppocr INFO: img_mode : BGR [2023/09/20 11:11:32] ppocr INFO: DetLabelEncode : None [2023/09/20 11:11:32] ppocr INFO: DetResizeForTest : None [2023/09/20 11:11:32] ppocr INFO: NormalizeImage : [2023/09/20 11:11:32] ppocr INFO: mean : [0.485, 0.456, 0.406] [2023/09/20 11:11:32] ppocr INFO: order : hwc [2023/09/20 11:11:32] ppocr INFO: scale : 1./255. [2023/09/20 11:11:32] ppocr INFO: std : [0.229, 0.224, 0.225] [2023/09/20 11:11:32] ppocr INFO: ToCHWImage : None [2023/09/20 11:11:32] ppocr INFO: KeepKeys : [2023/09/20 11:11:32] ppocr INFO: keep_keys : ['image', 'shape', 'polys', 'ignore_tags'] [2023/09/20 11:11:32] ppocr INFO: loader : [2023/09/20 11:11:32] ppocr INFO: batch_size_per_card : 1 [2023/09/20 11:11:32] ppocr INFO: drop_last : False [2023/09/20 11:11:32] ppocr INFO: num_workers : 1 [2023/09/20 11:11:32] ppocr INFO: shuffle : False [2023/09/20 11:11:32] ppocr INFO: Global : [2023/09/20 11:11:32] ppocr INFO: amp_dtype : bfloat16 [2023/09/20 11:11:32] ppocr INFO: d2s_train_image_shape : [3, -1, -1] [2023/09/20 11:11:32] ppocr INFO: debug : False [2023/09/20 11:11:32] ppocr INFO: distributed : False [2023/09/20 11:11:32] ppocr INFO: epoch_num : 1 [2023/09/20 11:11:32] ppocr INFO: eval_batch_step : [0, 5] [2023/09/20 11:11:32] ppocr INFO: log_smooth_window : 20 [2023/09/20 11:11:32] ppocr INFO: print_batch_step : 10 [2023/09/20 11:11:32] ppocr INFO: save_epoch_step : 1 [2023/09/20 11:11:32] ppocr INFO: save_model_dir : ./output/ch_PP-OCRv3_det_distill_train [2023/09/20 11:11:32] ppocr INFO: use_gpu : True [2023/09/20 11:11:32] ppocr INFO: Loss : [2023/09/20 11:11:32] ppocr INFO: loss_config_list : [2023/09/20 11:11:32] ppocr INFO: DistillationDilaDBLoss : [2023/09/20 11:11:32] ppocr INFO: alpha : 5 [2023/09/20 11:11:32] ppocr INFO: balance_loss : True [2023/09/20 11:11:32] ppocr INFO: beta : 10 [2023/09/20 11:11:32] ppocr INFO: key : maps [2023/09/20 11:11:32] ppocr INFO: main_loss_type : DiceLoss [2023/09/20 11:11:32] ppocr INFO: model_name_pairs : [['Student', 'Teacher'], ['Student2', 'Teacher']] [2023/09/20 11:11:32] ppocr INFO: ohem_ratio : 3 [2023/09/20 11:11:32] ppocr INFO: weight : 1.0 [2023/09/20 11:11:32] ppocr INFO: DistillationDMLLoss : [2023/09/20 11:11:32] ppocr INFO: key : maps [2023/09/20 11:11:32] ppocr INFO: maps_name : thrink_maps [2023/09/20 11:11:32] ppocr INFO: model_name_pairs : ['Student', 'Student2'] [2023/09/20 11:11:32] ppocr INFO: weight : 1.0 [2023/09/20 11:11:32] ppocr INFO: DistillationDBLoss : [2023/09/20 11:11:32] ppocr INFO: alpha : 5 [2023/09/20 11:11:32] ppocr INFO: balance_loss : True [2023/09/20 11:11:32] ppocr INFO: beta : 10 [2023/09/20 11:11:32] ppocr INFO: main_loss_type : DiceLoss [2023/09/20 11:11:32] ppocr INFO: model_name_list : ['Student', 'Student2'] [2023/09/20 11:11:32] ppocr INFO: ohem_ratio : 3 [2023/09/20 11:11:32] ppocr INFO: weight : 1.0 [2023/09/20 11:11:32] ppocr INFO: name : CombinedLoss [2023/09/20 11:11:32] ppocr INFO: Metric : [2023/09/20 11:11:32] ppocr INFO: base_metric_name : DetMetric [2023/09/20 11:11:32] ppocr INFO: key : Student [2023/09/20 11:11:32] ppocr INFO: main_indicator : hmean [2023/09/20 11:11:32] ppocr INFO: name : DistillationMetric [2023/09/20 11:11:32] ppocr INFO: Optimizer : [2023/09/20 11:11:32] ppocr INFO: beta1 : 0.9 [2023/09/20 11:11:32] ppocr INFO: beta2 : 0.999 [2023/09/20 11:11:32] ppocr INFO: lr : [2023/09/20 11:11:32] ppocr INFO: learning_rate : 0.001 [2023/09/20 11:11:32] ppocr INFO: name : Cosine [2023/09/20 11:11:32] ppocr INFO: warmup_epoch : 2 [2023/09/20 11:11:32] ppocr INFO: name : Adam [2023/09/20 11:11:32] ppocr INFO: regularizer : [2023/09/20 11:11:32] ppocr INFO: factor : 5e-05 [2023/09/20 11:11:32] ppocr INFO: name : L2 [2023/09/20 11:11:32] ppocr INFO: PostProcess : [2023/09/20 11:11:32] ppocr INFO: box_thresh : 0.6 [2023/09/20 11:11:32] ppocr INFO: key : head_out [2023/09/20 11:11:32] ppocr INFO: max_candidates : 1000 [2023/09/20 11:11:32] ppocr INFO: model_name : ['Student'] [2023/09/20 11:11:32] ppocr INFO: name : DistillationDBPostProcess [2023/09/20 11:11:32] ppocr INFO: thresh : 0.3 [2023/09/20 11:11:32] ppocr INFO: unclip_ratio : 1.5 [2023/09/20 11:11:32] ppocr INFO: Train : [2023/09/20 11:11:32] ppocr INFO: dataset : [2023/09/20 11:11:32] ppocr INFO: data_dir : ./train_data/det/ [2023/09/20 11:11:32] ppocr INFO: label_file_list : ['./train_data/det/train.txt'] [2023/09/20 11:11:32] ppocr INFO: name : SimpleDataSet [2023/09/20 11:11:32] ppocr INFO: ratio_list : [1.0] [2023/09/20 11:11:32] ppocr INFO: transforms : [2023/09/20 11:11:32] ppocr INFO: DecodeImage : [2023/09/20 11:11:32] ppocr INFO: channel_first : False [2023/09/20 11:11:32] ppocr INFO: img_mode : BGR [2023/09/20 11:11:32] ppocr INFO: DetLabelEncode : None [2023/09/20 11:11:32] ppocr INFO: CopyPaste : None [2023/09/20 11:11:32] ppocr INFO: IaaAugment : [2023/09/20 11:11:32] ppocr INFO: augmenter_args : [2023/09/20 11:11:32] ppocr INFO: args : [2023/09/20 11:11:32] ppocr INFO: p : 0.5 [2023/09/20 11:11:32] ppocr INFO: type : Fliplr [2023/09/20 11:11:32] ppocr INFO: args : [2023/09/20 11:11:32] ppocr INFO: rotate : [-10, 10] [2023/09/20 11:11:32] ppocr INFO: type : Affine [2023/09/20 11:11:32] ppocr INFO: args : [2023/09/20 11:11:32] ppocr INFO: size : [0.5, 3] [2023/09/20 11:11:32] ppocr INFO: type : Resize [2023/09/20 11:11:32] ppocr INFO: EastRandomCropData : [2023/09/20 11:11:32] ppocr INFO: keep_ratio : True [2023/09/20 11:11:32] ppocr INFO: max_tries : 50 [2023/09/20 11:11:32] ppocr INFO: size : [960, 960] [2023/09/20 11:11:32] ppocr INFO: MakeBorderMap : [2023/09/20 11:11:32] ppocr INFO: shrink_ratio : 0.4 [2023/09/20 11:11:32] ppocr INFO: thresh_max : 0.7 [2023/09/20 11:11:32] ppocr INFO: thresh_min : 0.3 [2023/09/20 11:11:32] ppocr INFO: MakeShrinkMap : [2023/09/20 11:11:32] ppocr INFO: min_text_size : 8 [2023/09/20 11:11:32] ppocr INFO: shrink_ratio : 0.4 [2023/09/20 11:11:32] ppocr INFO: NormalizeImage : [2023/09/20 11:11:32] ppocr INFO: mean : [0.485, 0.456, 0.406] [2023/09/20 11:11:32] ppocr INFO: order : hwc [2023/09/20 11:11:32] ppocr INFO: scale : 1./255. [2023/09/20 11:11:32] ppocr INFO: std : [0.229, 0.224, 0.225] [2023/09/20 11:11:32] ppocr INFO: ToCHWImage : None [2023/09/20 11:11:32] ppocr INFO: KeepKeys : [2023/09/20 11:11:32] ppocr INFO: keep_keys : ['image', 'threshold_map', 'threshold_mask', 'shrink_map', 'shrink_mask'] [2023/09/20 11:11:32] ppocr INFO: loader : [2023/09/20 11:11:32] ppocr INFO: batch_size_per_card : 1 [2023/09/20 11:11:32] ppocr INFO: drop_last : False [2023/09/20 11:11:32] ppocr INFO: num_workers : 1 [2023/09/20 11:11:32] ppocr INFO: shuffle : True [2023/09/20 11:11:32] ppocr INFO: profiler_options : None [2023/09/20 11:11:32] ppocr INFO: train with paddle 2.5.1 and device Place(gpu:0) [2023/09/20 11:11:32] ppocr INFO: Initialize indexs of datasets:['./train_data/det/train.txt'] [2023/09/20 11:11:32] ppocr INFO: Initialize indexs of datasets:['./train_data/det/val.txt'] W0920 11:11:32.329237 16752 gpu_resources.cc:119] Please NOTE: device: 0, GPU Compute Capability: 7.5, Driver API Version: 11.2, Runtime API Version: 11.2 W0920 11:11:32.352176 16752 gpu_resources.cc:149] device: 0, cuDNN Version: 8.2. [2023/09/20 11:11:34] ppocr INFO: train dataloader has 60 iters [2023/09/20 11:11:34] ppocr INFO: valid dataloader has 20 iters [2023/09/20 11:11:34] ppocr INFO: train from scratch [2023/09/20 11:11:34] ppocr INFO: During the training process, after the 0th iteration, an evaluation is run every 5 iterations

eval model:: 0%| | 0/20 [00:00<?, ?it/s] eval model:: 5%|▌ | 1/20 [00:00<00:15, 1.22it/s] eval model:: 10%|█ | 2/20 [00:01<00:12, 1.41it/s] eval model:: 15%|█▌ | 3/20 [00:02<00:11, 1.49it/s] eval model:: 20%|██ | 4/20 [00:02<00:10, 1.53it/s] eval model:: 25%|██▌ | 5/20 [00:03<00:09, 1.55it/s] eval model:: 30%|███ | 6/20 [00:03<00:09, 1.56it/s] eval model:: 35%|███▌ | 7/20 [00:04<00:08, 1.57it/s] eval model:: 40%|████ | 8/20 [00:05<00:07, 1.56it/s] eval model:: 45%|████▌ | 9/20 [00:05<00:07, 1.56it/s] eval model:: 50%|█████ | 10/20 [00:06<00:06, 1.55it/s] eval model:: 55%|█████▌ | 11/20 [00:07<00:05, 1.55it/s] eval model:: 60%|██████ | 12/20 [00:07<00:05, 1.55it/s] eval model:: 65%|██████▌ | 13/20 [00:08<00:04, 1.55it/s] eval model:: 70%|███████ | 14/20 [00:09<00:03, 1.55it/s] eval model:: 75%|███████▌ | 15/20 [00:09<00:03, 1.56it/s] eval model:: 80%|████████ | 16/20 [00:10<00:02, 1.57it/s] eval model:: 85%|████████▌ | 17/20 [00:11<00:01, 1.57it/s] eval model:: 90%|█████████ | 18/20 [00:11<00:01, 1.58it/s] eval model:: 95%|█████████▌| 19/20 [00:12<00:00, 1.58it/s] eval model:: 95%|█████████▌| 19/20 [00:12<00:00, 1.55it/s] [2023/09/20 11:11:51] ppocr INFO: cur metric, precision: 0, recall: 0.0, hmean: 0, fps: 1.5915822533406554 [2023/09/20 11:11:52] ppocr INFO: save best model is to ./output/ch_PP-OCRv3_det_distill_train\best_accuracy [2023/09/20 11:11:52] ppocr INFO: best metric, hmean: 0, is_float16: False, precision: 0, recall: 0.0, fps: 1.5915822533406554, best_epoch: 1 [2023/09/20 11:11:55] ppocr INFO: epoch: [1/1], global_step: 10, lr: 0.000038, dila_dbloss_Student_Teacher: 1.801171, dila_dbloss_Student2_Teacher: 2.079129, loss: 22.610353, dml_thrink_maps_0: 0.290000, db_Student_loss_shrink_maps: 4.810000, db_Student_loss_threshold_maps: 3.202735, db_Student_loss_binary_maps: 0.966238, db_Student_loss_cbn: 0.000000, db_Student2_loss_shrink_maps: 4.831625, db_Student2_loss_threshold_maps: 3.701253, db_Student2_loss_binary_maps: 0.967867, db_Student2_loss_cbn: 0.000000, avg_reader_cost: 0.04141 s, avg_batch_cost: 0.77852 s, avg_samples: 1.0, ips: 1.28449 samples/s, eta: 0:00:38

eval model:: 0%| | 0/20 [00:00<?, ?it/s] eval model:: 5%|▌ | 1/20 [00:00<00:13, 1.36it/s] eval model:: 10%|█ | 2/20 [00:01<00:12, 1.47it/s] eval model:: 15%|█▌ | 3/20 [00:02<00:11, 1.51it/s] eval model:: 20%|██ | 4/20 [00:02<00:10, 1.53it/s] eval model:: 25%|██▌ | 5/20 [00:03<00:09, 1.54it/s] eval model:: 30%|███ | 6/20 [00:03<00:09, 1.54it/s] eval model:: 35%|███▌ | 7/20 [00:04<00:08, 1.55it/s] eval model:: 40%|████ | 8/20 [00:05<00:07, 1.54it/s] eval model:: 45%|████▌ | 9/20 [00:05<00:07, 1.55it/s] eval model:: 50%|█████ | 10/20 [00:06<00:06, 1.55it/s] eval model:: 55%|█████▌ | 11/20 [00:07<00:05, 1.55it/s] eval model:: 60%|██████ | 12/20 [00:07<00:05, 1.56it/s] eval model:: 65%|██████▌ | 13/20 [00:08<00:04, 1.56it/s] eval model:: 70%|███████ | 14/20 [00:09<00:03, 1.56it/s] eval model:: 75%|███████▌ | 15/20 [00:09<00:03, 1.56it/s] eval model:: 80%|████████ | 16/20 [00:10<00:02, 1.56it/s] eval model:: 85%|████████▌ | 17/20 [00:11<00:01, 1.56it/s] eval model:: 90%|█████████ | 18/20 [00:11<00:01, 1.56it/s] eval model:: 95%|█████████▌| 19/20 [00:12<00:00, 1.56it/s] eval model:: 95%|█████████▌| 19/20 [00:12<00:00, 1.54it/s] [2023/09/20 11:12:07] ppocr INFO: cur metric, precision: 0, recall: 0.0, hmean: 0, fps: 1.599740096707343 [2023/09/20 11:12:07] ppocr INFO: save best model is to ./output/ch_PP-OCRv3_det_distill_train\best_accuracy [2023/09/20 11:12:07] ppocr INFO: best metric, hmean: 0, is_float16: False, precision: 0, recall: 0.0, fps: 1.599740096707343, best_epoch: 1

eval model:: 0%| | 0/20 [00:00<?, ?it/s] eval model:: 5%|▌ | 1/20 [00:00<00:17, 1.09it/s] eval model:: 10%|█ | 2/20 [00:01<00:15, 1.16it/s] eval model:: 15%|█▌ | 3/20 [00:02<00:14, 1.18it/s] eval model:: 20%|██ | 4/20 [00:03<00:13, 1.20it/s] eval model:: 25%|██▌ | 5/20 [00:04<00:12, 1.19it/s] eval model:: 30%|███ | 6/20 [00:05<00:11, 1.18it/s] eval model:: 35%|███▌ | 7/20 [00:05<00:10, 1.19it/s] eval model:: 40%|████ | 8/20 [00:06<00:10, 1.19it/s] eval model:: 45%|████▌ | 9/20 [00:07<00:09, 1.17it/s] eval model:: 50%|█████ | 10/20 [00:08<00:08, 1.17it/s] eval model:: 55%|█████▌ | 11/20 [00:09<00:07, 1.17it/s] eval model:: 60%|██████ | 12/20 [00:10<00:06, 1.18it/s] eval model:: 65%|██████▌ | 13/20 [00:10<00:05, 1.20it/s] eval model:: 70%|███████ | 14/20 [00:11<00:04, 1.21it/s] eval model:: 75%|███████▌ | 15/20 [00:12<00:04, 1.21it/s] eval model:: 80%|████████ | 16/20 [00:13<00:03, 1.19it/s] eval model:: 85%|████████▌ | 17/20 [00:14<00:02, 1.17it/s] eval model:: 90%|█████████ | 18/20 [00:15<00:01, 1.18it/s] eval model:: 95%|█████████▌| 19/20 [00:16<00:00, 1.19it/s] eval model:: 95%|█████████▌| 19/20 [00:16<00:00, 1.18it/s] [2023/09/20 11:12:26] ppocr INFO: cur metric, precision: 0, recall: 0.0, hmean: 0, fps: 1.5538101778011353 [2023/09/20 11:12:27] ppocr INFO: save best model is to ./output/ch_PP-OCRv3_det_distill_train\best_accuracy [2023/09/20 11:12:27] ppocr INFO: best metric, hmean: 0, is_float16: False, precision: 0, recall: 0.0, fps: 1.5538101778011353, best_epoch: 1 [2023/09/20 11:12:30] ppocr INFO: epoch: [1/1], global_step: 20, lr: 0.000079, dila_dbloss_Student_Teacher: 1.781815, dila_dbloss_Student2_Teacher: 1.992540, loss: 22.246658, dml_thrink_maps_0: 0.282399, db_Student_loss_shrink_maps: 4.741665, db_Student_loss_threshold_maps: 3.088036, db_Student_loss_binary_maps: 0.955647, db_Student_loss_cbn: 0.000000, db_Student2_loss_shrink_maps: 4.774456, db_Student2_loss_threshold_maps: 3.676026, db_Student2_loss_binary_maps: 0.955659, db_Student2_loss_cbn: 0.000000, avg_reader_cost: 0.00000 s, avg_batch_cost: 0.56341 s, avg_samples: 1.0, ips: 1.77491 samples/s, eta: 0:00:26

eval model:: 0%| | 0/20 [00:00<?, ?it/s] eval model:: 5%|▌ | 1/20 [00:01<00:19, 1.00s/it] eval model:: 10%|█ | 2/20 [00:01<00:16, 1.06it/s] eval model:: 15%|█▌ | 3/20 [00:02<00:15, 1.11it/s] eval model:: 20%|██ | 4/20 [00:03<00:14, 1.10it/s] eval model:: 25%|██▌ | 5/20 [00:04<00:13, 1.12it/s] eval model:: 30%|███ | 6/20 [00:05<00:12, 1.14it/s] eval model:: 35%|███▌ | 7/20 [00:06<00:11, 1.13it/s] eval model:: 40%|████ | 8/20 [00:07<00:10, 1.15it/s] eval model:: 45%|████▌ | 9/20 [00:07<00:09, 1.16it/s] eval model:: 50%|█████ | 10/20 [00:08<00:08, 1.16it/s] eval model:: 55%|█████▌ | 11/20 [00:09<00:07, 1.16it/s] eval model:: 60%|██████ | 12/20 [00:10<00:07, 1.11it/s] eval model:: 65%|██████▌ | 13/20 [00:11<00:06, 1.13it/s] eval model:: 70%|███████ | 14/20 [00:12<00:05, 1.14it/s] eval model:: 75%|███████▌ | 15/20 [00:13<00:04, 1.15it/s] eval model:: 80%|████████ | 16/20 [00:14<00:03, 1.16it/s] eval model:: 85%|████████▌ | 17/20 [00:14<00:02, 1.17it/s] eval model:: 90%|█████████ | 18/20 [00:15<00:01, 1.17it/s] eval model:: 95%|█████████▌| 19/20 [00:16<00:00, 1.18it/s] eval model:: 95%|█████████▌| 19/20 [00:16<00:00, 1.14it/s] [2023/09/20 11:12:47] ppocr INFO: cur metric, precision: 0, recall: 0.0, hmean: 0, fps: 1.5554830933159363 [2023/09/20 11:12:47] ppocr INFO: save best model is to ./output/ch_PP-OCRv3_det_distill_train\best_accuracy [2023/09/20 11:12:47] ppocr INFO: best metric, hmean: 0, is_float16: False, precision: 0, recall: 0.0, fps: 1.5554830933159363, best_epoch: 1

eval model:: 0%| | 0/20 [00:00<?, ?it/s] eval model:: 5%|▌ | 1/20 [00:01<00:19, 1.01s/it] eval model:: 10%|█ | 2/20 [00:01<00:17, 1.02it/s] eval model:: 15%|█▌ | 3/20 [00:02<00:16, 1.03it/s] eval model:: 20%|██ | 4/20 [00:03<00:15, 1.04it/s] eval model:: 25%|██▌ | 5/20 [00:04<00:14, 1.05it/s] eval model:: 30%|███ | 6/20 [00:05<00:13, 1.07it/s] eval model:: 35%|███▌ | 7/20 [00:06<00:12, 1.06it/s] eval model:: 40%|████ | 8/20 [00:07<00:11, 1.05it/s] eval model:: 45%|████▌ | 9/20 [00:08<00:10, 1.07it/s] eval model:: 50%|█████ | 10/20 [00:09<00:09, 1.08it/s] eval model:: 55%|█████▌ | 11/20 [00:10<00:08, 1.08it/s] eval model:: 60%|██████ | 12/20 [00:11<00:07, 1.05it/s] eval model:: 65%|██████▌ | 13/20 [00:12<00:06, 1.06it/s] eval model:: 70%|███████ | 14/20 [00:13<00:05, 1.06it/s] eval model:: 75%|███████▌ | 15/20 [00:14<00:04, 1.08it/s] eval model:: 80%|████████ | 16/20 [00:15<00:03, 1.10it/s] eval model:: 85%|████████▌ | 17/20 [00:15<00:02, 1.09it/s] eval model:: 90%|█████████ | 18/20 [00:16<00:01, 1.10it/s] eval model:: 95%|█████████▌| 19/20 [00:17<00:00, 1.12it/s] eval model:: 95%|█████████▌| 19/20 [00:17<00:00, 1.07it/s] [2023/09/20 11:13:08] ppocr INFO: cur metric, precision: 0, recall: 0.0, hmean: 0, fps: 1.5308892427949483 [2023/09/20 11:13:08] ppocr INFO: save best model is to ./output/ch_PP-OCRv3_det_distill_train\best_accuracy [2023/09/20 11:13:08] ppocr INFO: best metric, hmean: 0, is_float16: False, precision: 0, recall: 0.0, fps: 1.5308892427949483, best_epoch: 1 [2023/09/20 11:13:11] ppocr INFO: epoch: [1/1], global_step: 30, lr: 0.000162, dila_dbloss_Student_Teacher: 1.712602, dila_dbloss_Student2_Teacher: 1.923282, loss: 21.407768, dml_thrink_maps_0: 0.267427, db_Student_loss_shrink_maps: 4.659834, db_Student_loss_threshold_maps: 2.912708, db_Student_loss_binary_maps: 0.935599, db_Student_loss_cbn: 0.000000, db_Student2_loss_shrink_maps: 4.692864, db_Student2_loss_threshold_maps: 3.473302, db_Student2_loss_binary_maps: 0.939106, db_Student2_loss_cbn: 0.000000, avg_reader_cost: 0.00010 s, avg_batch_cost: 0.56857 s, avg_samples: 1.0, ips: 1.75879 samples/s, eta: 0:00:19

eval model:: 0%| | 0/20 [00:00<?, ?it/s] eval model:: 5%|▌ | 1/20 [00:00<00:18, 1.05it/s] eval model:: 10%|█ | 2/20 [00:01<00:16, 1.10it/s] eval model:: 15%|█▌ | 3/20 [00:02<00:15, 1.13it/s] eval model:: 20%|██ | 4/20 [00:03<00:13, 1.15it/s] eval model:: 25%|██▌ | 5/20 [00:04<00:13, 1.15it/s] eval model:: 30%|███ | 6/20 [00:05<00:12, 1.16it/s] eval model:: 35%|███▌ | 7/20 [00:06<00:11, 1.17it/s] eval model:: 40%|████ | 8/20 [00:06<00:10, 1.16it/s] eval model:: 45%|████▌ | 9/20 [00:07<00:09, 1.16it/s] eval model:: 50%|█████ | 10/20 [00:08<00:08, 1.16it/s] eval model:: 55%|█████▌ | 11/20 [00:09<00:07, 1.15it/s] eval model:: 60%|██████ | 12/20 [00:10<00:06, 1.15it/s] eval model:: 65%|██████▌ | 13/20 [00:11<00:06, 1.15it/s] eval model:: 70%|███████ | 14/20 [00:12<00:05, 1.16it/s] eval model:: 75%|███████▌ | 15/20 [00:13<00:04, 1.16it/s] eval model:: 80%|████████ | 16/20 [00:13<00:03, 1.16it/s] eval model:: 85%|████████▌ | 17/20 [00:14<00:02, 1.17it/s] eval model:: 90%|█████████ | 18/20 [00:15<00:01, 1.18it/s] eval model:: 95%|█████████▌| 19/20 [00:16<00:00, 1.18it/s] eval model:: 95%|█████████▌| 19/20 [00:16<00:00, 1.16it/s] [2023/09/20 11:13:28] ppocr INFO: cur metric, precision: 0, recall: 0.0, hmean: 0, fps: 1.5422349003444107 [2023/09/20 11:13:28] ppocr INFO: save best model is to ./output/ch_PP-OCRv3_det_distill_train\best_accuracy [2023/09/20 11:13:28] ppocr INFO: best metric, hmean: 0, is_float16: False, precision: 0, recall: 0.0, fps: 1.5422349003444107, best_epoch: 1

eval model:: 0%| | 0/20 [00:00<?, ?it/s] eval model:: 5%|▌ | 1/20 [00:01<00:21, 1.12s/it] eval model:: 10%|█ | 2/20 [00:02<00:18, 1.05s/it] eval model:: 15%|█▌ | 3/20 [00:03<00:17, 1.04s/it] eval model:: 20%|██ | 4/20 [00:04<00:16, 1.02s/it] eval model:: 25%|██▌ | 5/20 [00:05<00:15, 1.02s/it] eval model:: 30%|███ | 6/20 [00:06<00:14, 1.02s/it] eval model:: 35%|███▌ | 7/20 [00:07<00:13, 1.03s/it] eval model:: 40%|████ | 8/20 [00:08<00:12, 1.04s/it] eval model:: 45%|████▌ | 9/20 [00:09<00:11, 1.04s/it] eval model:: 50%|█████ | 10/20 [00:10<00:10, 1.03s/it] eval model:: 55%|█████▌ | 11/20 [00:11<00:09, 1.03s/it] eval model:: 60%|██████ | 12/20 [00:12<00:08, 1.02s/it] eval model:: 65%|██████▌ | 13/20 [00:13<00:07, 1.02s/it] eval model:: 70%|███████ | 14/20 [00:14<00:06, 1.02s/it] eval model:: 75%|███████▌ | 15/20 [00:15<00:05, 1.03s/it] eval model:: 80%|████████ | 16/20 [00:16<00:04, 1.03s/it] eval model:: 85%|████████▌ | 17/20 [00:17<00:03, 1.03s/it] eval model:: 90%|█████████ | 18/20 [00:18<00:02, 1.03s/it] eval model:: 95%|█████████▌| 19/20 [00:19<00:01, 1.03s/it] eval model:: 95%|█████████▌| 19/20 [00:19<00:01, 1.03s/it] [2023/09/20 11:13:51] ppocr INFO: cur metric, precision: 0, recall: 0.0, hmean: 0, fps: 1.5445703669469695 [2023/09/20 11:13:51] ppocr INFO: save best model is to ./output/ch_PP-OCRv3_det_distill_train\best_accuracy [2023/09/20 11:13:51] ppocr INFO: best metric, hmean: 0, is_float16: False, precision: 0, recall: 0.0, fps: 1.5445703669469695, best_epoch: 1 [2023/09/20 11:13:54] ppocr INFO: epoch: [1/1], global_step: 40, lr: 0.000246, dila_dbloss_Student_Teacher: 1.604828, dila_dbloss_Student2_Teacher: 1.724254, loss: 20.241255, dml_thrink_maps_0: 0.245426, db_Student_loss_shrink_maps: 4.632267, db_Student_loss_threshold_maps: 2.478175, db_Student_loss_binary_maps: 0.928686, db_Student_loss_cbn: 0.000000, db_Student2_loss_shrink_maps: 4.679897, db_Student2_loss_threshold_maps: 3.103682, db_Student2_loss_binary_maps: 0.936732, db_Student2_loss_cbn: 0.000000, avg_reader_cost: 0.00000 s, avg_batch_cost: 0.56674 s, avg_samples: 1.0, ips: 1.76448 samples/s, eta: 0:00:12

eval model:: 0%| | 0/20 [00:00<?, ?it/s] eval model:: 5%|▌ | 1/20 [00:01<00:21, 1.15s/it] eval model:: 10%|█ | 2/20 [00:02<00:19, 1.06s/it] eval model:: 15%|█▌ | 3/20 [00:03<00:17, 1.04s/it] eval model:: 20%|██ | 4/20 [00:04<00:16, 1.03s/it] eval model:: 25%|██▌ | 5/20 [00:05<00:15, 1.03s/it] eval model:: 30%|███ | 6/20 [00:06<00:14, 1.03s/it] eval model:: 35%|███▌ | 7/20 [00:07<00:13, 1.03s/it] eval model:: 40%|████ | 8/20 [00:08<00:12, 1.03s/it] eval model:: 45%|████▌ | 9/20 [00:09<00:11, 1.03s/it] eval model:: 50%|█████ | 10/20 [00:10<00:10, 1.04s/it] eval model:: 55%|█████▌ | 11/20 [00:11<00:09, 1.03s/it] eval model:: 60%|██████ | 12/20 [00:12<00:08, 1.03s/it] eval model:: 65%|██████▌ | 13/20 [00:13<00:07, 1.04s/it] eval model:: 70%|███████ | 14/20 [00:14<00:06, 1.03s/it] eval model:: 75%|███████▌ | 15/20 [00:15<00:05, 1.04s/it] eval model:: 80%|████████ | 16/20 [00:16<00:04, 1.04s/it] eval model:: 85%|████████▌ | 17/20 [00:17<00:03, 1.05s/it] eval model:: 90%|█████████ | 18/20 [00:18<00:02, 1.06s/it] eval model:: 95%|█████████▌| 19/20 [00:19<00:01, 1.05s/it] eval model:: 95%|█████████▌| 19/20 [00:19<00:01, 1.04s/it] [2023/09/20 11:14:14] ppocr INFO: cur metric, precision: 0, recall: 0.0, hmean: 0, fps: 1.5389659661466704 [2023/09/20 11:14:15] ppocr INFO: save best model is to ./output/ch_PP-OCRv3_det_distill_train\best_accuracy [2023/09/20 11:14:15] ppocr INFO: best metric, hmean: 0, is_float16: False, precision: 0, recall: 0.0, fps: 1.5389659661466704, best_epoch: 1

eval model:: 0%| | 0/20 [00:00<?, ?it/s] eval model:: 5%|▌ | 1/20 [00:01<00:21, 1.14s/it] eval model:: 10%|█ | 2/20 [00:02<00:18, 1.05s/it] eval model:: 15%|█▌ | 3/20 [00:03<00:17, 1.01s/it] eval model:: 20%|██ | 4/20 [00:04<00:16, 1.02s/it] eval model:: 25%|██▌ | 5/20 [00:05<00:15, 1.02s/it] eval model:: 30%|███ | 6/20 [00:06<00:14, 1.02s/it] eval model:: 35%|███▌ | 7/20 [00:07<00:13, 1.01s/it] eval model:: 40%|████ | 8/20 [00:08<00:12, 1.02s/it] eval model:: 45%|████▌ | 9/20 [00:09<00:11, 1.02s/it] eval model:: 50%|█████ | 10/20 [00:10<00:10, 1.01s/it] eval model:: 55%|█████▌ | 11/20 [00:11<00:09, 1.00s/it] eval model:: 60%|██████ | 12/20 [00:12<00:08, 1.01s/it] eval model:: 65%|██████▌ | 13/20 [00:13<00:06, 1.00it/s] eval model:: 70%|███████ | 14/20 [00:14<00:05, 1.00it/s] eval model:: 75%|███████▌ | 15/20 [00:15<00:05, 1.00s/it] eval model:: 80%|████████ | 16/20 [00:16<00:04, 1.01s/it] eval model:: 85%|████████▌ | 17/20 [00:17<00:03, 1.00s/it] eval model:: 90%|█████████ | 18/20 [00:18<00:02, 1.01s/it] eval model:: 95%|█████████▌| 19/20 [00:19<00:01, 1.01s/it] eval model:: 95%|█████████▌| 19/20 [00:19<00:01, 1.01s/it] [2023/09/20 11:14:37] ppocr INFO: cur metric, precision: 0, recall: 0.0, hmean: 0, fps: 1.5431416203168105 [2023/09/20 11:14:37] ppocr INFO: save best model is to ./output/ch_PP-OCRv3_det_distill_train\best_accuracy [2023/09/20 11:14:37] ppocr INFO: best metric, hmean: 0, is_float16: False, precision: 0, recall: 0.0, fps: 1.5431416203168105, best_epoch: 1 [2023/09/20 11:14:40] ppocr INFO: epoch: [1/1], global_step: 50, lr: 0.000329, dila_dbloss_Student_Teacher: 1.510066, dila_dbloss_Student2_Teacher: 1.527786, loss: 19.049004, dml_thrink_maps_0: 0.219194, db_Student_loss_shrink_maps: 4.684754, db_Student_loss_threshold_maps: 2.201367, db_Student_loss_binary_maps: 0.938357, db_Student_loss_cbn: 0.000000, db_Student2_loss_shrink_maps: 4.757962, db_Student2_loss_threshold_maps: 2.551945, db_Student2_loss_binary_maps: 0.953674, db_Student2_loss_cbn: 0.000000, avg_reader_cost: 0.00021 s, avg_batch_cost: 0.57453 s, avg_samples: 1.0, ips: 1.74054 samples/s, eta: 0:00:06

eval model:: 0%| | 0/20 [00:00<?, ?it/s] eval model:: 5%|▌ | 1/20 [00:01<00:22, 1.20s/it] eval model:: 10%|█ | 2/20 [00:02<00:19, 1.06s/it] eval model:: 15%|█▌ | 3/20 [00:03<00:17, 1.02s/it] eval model:: 20%|██ | 4/20 [00:04<00:16, 1.04s/it] eval model:: 25%|██▌ | 5/20 [00:05<00:15, 1.03s/it] eval model:: 30%|███ | 6/20 [00:06<00:14, 1.02s/it] eval model:: 35%|███▌ | 7/20 [00:07<00:13, 1.01s/it] eval model:: 40%|████ | 8/20 [00:08<00:12, 1.01s/it] eval model:: 45%|████▌ | 9/20 [00:09<00:11, 1.01s/it] eval model:: 50%|█████ | 10/20 [00:10<00:10, 1.01s/it] eval model:: 55%|█████▌ | 11/20 [00:11<00:08, 1.00it/s] eval model:: 60%|██████ | 12/20 [00:12<00:07, 1.00it/s] eval model:: 65%|██████▌ | 13/20 [00:13<00:06, 1.02it/s] eval model:: 70%|███████ | 14/20 [00:14<00:05, 1.02it/s] eval model:: 75%|███████▌ | 15/20 [00:15<00:04, 1.02it/s] eval model:: 80%|████████ | 16/20 [00:16<00:03, 1.00it/s] eval model:: 85%|████████▌ | 17/20 [00:17<00:02, 1.00it/s] eval model:: 90%|█████████ | 18/20 [00:18<00:02, 1.00s/it] eval model:: 95%|█████████▌| 19/20 [00:19<00:01, 1.01s/it] eval model:: 95%|█████████▌| 19/20 [00:19<00:01, 1.01s/it] [2023/09/20 11:15:00] ppocr INFO: cur metric, precision: 0, recall: 0.0, hmean: 0, fps: 1.5415460915878105 [2023/09/20 11:15:00] ppocr INFO: save best model is to ./output/ch_PP-OCRv3_det_distill_train\best_accuracy [2023/09/20 11:15:00] ppocr INFO: best metric, hmean: 0, is_float16: False, precision: 0, recall: 0.0, fps: 1.5415460915878105, best_epoch: 1

eval model:: 0%| | 0/20 [00:00<?, ?it/s] eval model:: 5%|▌ | 1/20 [00:01<00:22, 1.16s/it] eval model:: 10%|█ | 2/20 [00:02<00:19, 1.07s/it] eval model:: 15%|█▌ | 3/20 [00:03<00:17, 1.04s/it] eval model:: 20%|██ | 4/20 [00:04<00:16, 1.04s/it] eval model:: 25%|██▌ | 5/20 [00:05<00:15, 1.05s/it] eval model:: 30%|███ | 6/20 [00:06<00:14, 1.05s/it] eval model:: 35%|███▌ | 7/20 [00:07<00:13, 1.05s/it] eval model:: 40%|████ | 8/20 [00:08<00:12, 1.04s/it] eval model:: 45%|████▌ | 9/20 [00:09<00:11, 1.04s/it] eval model:: 50%|█████ | 10/20 [00:10<00:10, 1.03s/it] eval model:: 55%|█████▌ | 11/20 [00:11<00:09, 1.03s/it] eval model:: 60%|██████ | 12/20 [00:12<00:08, 1.03s/it] eval model:: 65%|██████▌ | 13/20 [00:13<00:07, 1.02s/it] eval model:: 70%|███████ | 14/20 [00:14<00:06, 1.02s/it] eval model:: 75%|███████▌ | 15/20 [00:15<00:05, 1.03s/it] eval model:: 80%|████████ | 16/20 [00:16<00:04, 1.02s/it] eval model:: 85%|████████▌ | 17/20 [00:17<00:03, 1.03s/it] eval model:: 90%|█████████ | 18/20 [00:18<00:02, 1.04s/it] eval model:: 95%|█████████▌| 19/20 [00:19<00:01, 1.05s/it] eval model:: 95%|█████████▌| 19/20 [00:19<00:01, 1.04s/it] [2023/09/20 11:15:23] ppocr INFO: cur metric, precision: 0, recall: 0.0, hmean: 0, fps: 1.5362855563671314 [2023/09/20 11:15:24] ppocr INFO: save best model is to ./output/ch_PP-OCRv3_det_distill_train\best_accuracy [2023/09/20 11:15:24] ppocr INFO: best metric, hmean: 0, is_float16: False, precision: 0, recall: 0.0, fps: 1.5362855563671314, best_epoch: 1 [2023/09/20 11:15:26] ppocr INFO: save model in ./output/ch_PP-OCRv3_det_distill_train\latest [2023/09/20 11:15:27] ppocr INFO: save model in ./output/ch_PP-OCRv3_det_distill_train\iter_epoch_1 [2023/09/20 11:15:27] ppocr INFO: best metric, hmean: 0, is_float16: False, precision: 0, recall: 0.0, fps: 1.5362855563671314, best_epoch: 1

jingmingtao commented 1 year ago

我也遇到了,没有定位到,使用了预训练模型,精度0.004

jingmingtao commented 1 year ago

并且db_Student2_loss_cbn为0

jingmingtao commented 1 year ago

你的训练图片怎么个长宽比,我的150x450,并且两个行汉字,框70左右每行,这样的数据,就不行,当我括外廓数据将它变大后,就可以。太怪了。

jingmingtao commented 1 year ago

但是再训练完几个epoch又这样了

jingmingtao commented 1 year ago

我猜测就是数据,paddleocr有些情况支持,或者参数配置不支持,尽力了,还有大佬吗,指导下

jingmingtao commented 1 year ago

我采用官方数据,相同配置就可以,但是我尝试修改了好多地方,困扰多天,无法解决,你有什么进展吗,可以交流下

Sundragon1993 commented 10 months ago

@jingmingtao Hi, have you found the solution?