文字检测 模块跟着git文档走 训练、评估、测试检测效果 报同样的错
Created by: PeterGss
文档地址:https://github.com/PaddlePaddle/PaddleOCR/blob/develop/doc/detection.md 命令:python3 tools/train.py -c configs/det/det_mv3_db.yml grep: warning: GREP_OPTIONS is deprecated; please use an alias or script 2020-06-08 08:48:50,868-INFO: {'Global': {'algorithm': 'DB', 'use_gpu': False, 'epoch_num': 1200, 'log_smooth_window': 20, 'print_batch_step': 2, 'save_model_dir': './output/det_db/', 'save_epoch_step': 200, 'eval_batch_step': 5000, 'train_batch_size_per_card': 16, 'test_batch_size_per_card': 16, 'image_shape': [3, 640, 640], 'reader_yml': './configs/det/det_db_icdar15_reader.yml', 'pretrain_weights': './pretrain_models/MobileNetV3_large_x0_5_pretrained/', 'checkpoints': None, 'save_res_path': './output/det_db/predicts_db.txt', 'save_inference_dir': None}, 'Architecture': {'function': 'ppocr.modeling.architectures.det_model,DetModel'}, 'Backbone': {'function': 'ppocr.modeling.backbones.det_mobilenet_v3,MobileNetV3', 'scale': 0.5, 'model_name': 'large'}, 'Head': {'function': 'ppocr.modeling.heads.det_db_head,DBHead', 'model_name': 'large', 'k': 50, 'inner_channels': 96, 'out_channels': 2}, 'Loss': {'function': 'ppocr.modeling.losses.det_db_loss,DBLoss', 'balance_loss': True, 'main_loss_type': 'DiceLoss', 'alpha': 5, 'beta': 10, 'ohem_ratio': 3}, 'Optimizer': {'function': 'ppocr.optimizer,AdamDecay', 'base_lr': 0.001, 'beta1': 0.9, 'beta2': 0.999}, 'PostProcess': {'function': 'ppocr.postprocess.db_postprocess,DBPostProcess', 'thresh': 0.3, 'box_thresh': 0.7, 'max_candidates': 1000, 'unclip_ratio': 2.0}, 'TrainReader': {'reader_function': 'ppocr.data.det.dataset_traversal,TrainReader', 'process_function': 'ppocr.data.det.db_process,DBProcessTrain', 'num_workers': 8, 'img_set_dir': './train_data/icdar2015/text_localization/', 'label_file_path': './train_data/icdar2015/text_localization/train_icdar2015_label.txt'}, 'EvalReader': {'reader_function': 'ppocr.data.det.dataset_traversal,EvalTestReader', 'process_function': 'ppocr.data.det.db_process,DBProcessTest', 'img_set_dir': './train_data/icdar2015/text_localization/', 'label_file_path': './train_data/icdar2015/text_localization/test_icdar2015_label.txt', 'test_image_shape': [736, 1280]}, 'TestReader': {'reader_function': 'ppocr.data.det.dataset_traversal,EvalTestReader', 'process_function': 'ppocr.data.det.db_process,DBProcessTest', 'infer_img': None, 'img_set_dir': './train_data/icdar2015/text_localization/', 'label_file_path': './train_data/icdar2015/text_localization/test_icdar2015_label.txt', 'test_image_shape': [736, 1280], 'do_eval': True}} 3 640 640 Traceback (most recent call last): File "tools/train.py", line 112, in main() File "tools/train.py", line 66, in main config, train_program, startup_program, mode='train') File "/PaddleOCR/tools/program.py", line 169, in build dataloader, outputs = model(mode=mode) File "/PaddleOCR/ppocr/modeling/architectures/det_model.py", line 113, in call predicts = self.head(conv_feas, mode) File "/PaddleOCR/ppocr/modeling/heads/det_db_head.py", line 197, in call shrink_maps = self.binarize(fuse) File "/PaddleOCR/ppocr/modeling/heads/det_db_head.py", line 57, in binarize bias_attr=self._get_bias_attr(0.0004, conv_bn1.shape[1], "conv2"), File "/PaddleOCR/ppocr/modeling/heads/det_db_head.py", line 120, in _get_bias_attr name=name + "_b_attr") TypeError: init() got an unexpected keyword argument 'gradient_clip'
可能是因为我使用paddle1.8版本的问题?等兼容后我再试一下