首页
开源
资讯
活动
开源许可证
软件工程云服务
软件代码质量检测云服务
持续集成与部署云服务
社区个性化内容推荐服务
贡献审阅人推荐服务
群体化学习服务
重睛鸟代码扫描工具
登录
注册
代码拉取完成,页面将自动刷新
Watch
476
Star
3.8K
Fork
956
PaddlePaddle
/
PaddleOCR
Fork 仓库
加载中
取消
确认
代码
Issues
219
Pull Requests
6
Wiki
0
统计
更新失败,请稍后重试!
Issues
/
详情
移除标识
内容风险标识
本任务被
标识为内容中包含有代码安全 Bug 、隐私泄露等敏感信息,仓库外成员不可访问
文本检测 检测模型转成推理模型后识别结果不准确,求大神指教
待办的
#IA9ES3
仲明月
创建于
2024-07-01 09:20
使用命令: 训练:tools/train.py -c ./configs/det/ch_PP-OCRv3/ch_PP-OCRv3_det_student.yml 评估:tools/eval.py -c ./configs/det/ch_PP-OCRv3/ch_PP-OCRv3_det_student.yml -o Global.checkpoints=./output/1-fapiao_putong_ch_PP-OCR_V3_det/best_accuracy.pdparams 预测:tools/infer_det.py -c configs/det/ch_PP-OCRv3/ch_PP-OCRv3_det_student.yml -o Global.infer_img=./train_data/wenbenjiance_test Global.checkpoints=./output/1-fapiao_putong_ch_PP-OCR_V3_det/best_accuracy.pdparams 预测结果正常: ![输入图片说明](https://foruda.gitee.com/images/1719796677228976631/dbfbeea7_13255200.png "屏幕截图") 转推理模型:tools/export_model.py -c configs/det/ch_PP-OCRv3/ch_PP-OCRv3_det_student.yml -o Global.checkpoints=./output/1-fapiao_putong_ch_PP-OCR_V3_det/best_accuracy Global.save_inference_dir=./output/fapiao_putong_ch_PP-OCR_v3_det_inferer 推理模型预测:tools/infer/predict_det.py --image_dir=./train_data/wenbenjiance_test --det_model_dir=./output/fapiao_putong_ch_PP-OCR_v3_det_inferer ![输入图片说明](https://foruda.gitee.com/images/1719796787269654903/24dfbd13_13255200.png "屏幕截图") 配置文件ch_PP-OCRv3_det_student.yml Global: debug: false use_gpu: true epoch_num: 500 log_smooth_window: 20 print_batch_step: 10 save_model_dir: ./output/fapiao_putong_ch_PP-OCR_V3_det/ save_epoch_step: 100 eval_batch_step: - 0 - 500 cal_metric_during_train: false pretrained_model: ./pretrained_model/ch_PP-OCRv3_det_distill_train/student.pdparams checkpoints: null save_inference_dir: null use_visualdl: false infer_img: doc/imgs_en/img_10.jpg save_res_path: ./output/fapiao_putong_checkpoints/det_db/predicts_db.txt distributed: true Architecture: model_type: det algorithm: DB Transform: Backbone: name: MobileNetV3 scale: 0.5 model_name: large disable_se: 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.00005 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: ./train_data/wenbenjiance/imgs label_file_list: - ./train_data/wenbenjiance/train.txt ratio_list: [1.0] transforms: - DecodeImage: img_mode: BGR channel_first: false - DetLabelEncode: 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: - 960 - 960 max_tries: 50 keep_ratio: true - MakeBorderMap: shrink_ratio: 0.4 thresh_min: 0.3 thresh_max: 0.7 - MakeShrinkMap: shrink_ratio: 0.4 min_text_size: 8 - 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: 4 num_workers: 0 Eval: dataset: name: SimpleDataSet data_dir: ./train_data/wenbenjiance/imgs label_file_list: - ./train_data/wenbenjiance/val.txt transforms: - DecodeImage: img_mode: BGR channel_first: false - DetLabelEncode: null - DetResizeForTest: null - 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: 0
使用命令: 训练:tools/train.py -c ./configs/det/ch_PP-OCRv3/ch_PP-OCRv3_det_student.yml 评估:tools/eval.py -c ./configs/det/ch_PP-OCRv3/ch_PP-OCRv3_det_student.yml -o Global.checkpoints=./output/1-fapiao_putong_ch_PP-OCR_V3_det/best_accuracy.pdparams 预测:tools/infer_det.py -c configs/det/ch_PP-OCRv3/ch_PP-OCRv3_det_student.yml -o Global.infer_img=./train_data/wenbenjiance_test Global.checkpoints=./output/1-fapiao_putong_ch_PP-OCR_V3_det/best_accuracy.pdparams 预测结果正常: ![输入图片说明](https://foruda.gitee.com/images/1719796677228976631/dbfbeea7_13255200.png "屏幕截图") 转推理模型:tools/export_model.py -c configs/det/ch_PP-OCRv3/ch_PP-OCRv3_det_student.yml -o Global.checkpoints=./output/1-fapiao_putong_ch_PP-OCR_V3_det/best_accuracy Global.save_inference_dir=./output/fapiao_putong_ch_PP-OCR_v3_det_inferer 推理模型预测:tools/infer/predict_det.py --image_dir=./train_data/wenbenjiance_test --det_model_dir=./output/fapiao_putong_ch_PP-OCR_v3_det_inferer ![输入图片说明](https://foruda.gitee.com/images/1719796787269654903/24dfbd13_13255200.png "屏幕截图") 配置文件ch_PP-OCRv3_det_student.yml Global: debug: false use_gpu: true epoch_num: 500 log_smooth_window: 20 print_batch_step: 10 save_model_dir: ./output/fapiao_putong_ch_PP-OCR_V3_det/ save_epoch_step: 100 eval_batch_step: - 0 - 500 cal_metric_during_train: false pretrained_model: ./pretrained_model/ch_PP-OCRv3_det_distill_train/student.pdparams checkpoints: null save_inference_dir: null use_visualdl: false infer_img: doc/imgs_en/img_10.jpg save_res_path: ./output/fapiao_putong_checkpoints/det_db/predicts_db.txt distributed: true Architecture: model_type: det algorithm: DB Transform: Backbone: name: MobileNetV3 scale: 0.5 model_name: large disable_se: 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.00005 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: ./train_data/wenbenjiance/imgs label_file_list: - ./train_data/wenbenjiance/train.txt ratio_list: [1.0] transforms: - DecodeImage: img_mode: BGR channel_first: false - DetLabelEncode: 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: - 960 - 960 max_tries: 50 keep_ratio: true - MakeBorderMap: shrink_ratio: 0.4 thresh_min: 0.3 thresh_max: 0.7 - MakeShrinkMap: shrink_ratio: 0.4 min_text_size: 8 - 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: 4 num_workers: 0 Eval: dataset: name: SimpleDataSet data_dir: ./train_data/wenbenjiance/imgs label_file_list: - ./train_data/wenbenjiance/val.txt transforms: - DecodeImage: img_mode: BGR channel_first: false - DetLabelEncode: null - DetResizeForTest: null - 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: 0
评论 (
0
)
仲明月
创建了
任务
登录
后才可以发表评论
状态
待办的
待办的
进行中
已完成
已关闭
负责人
未设置
标签
未设置
标签管理
里程碑
未关联里程碑
未关联里程碑
Pull Requests
未关联
未关联
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
未关联
分支 (27)
标签 (16)
main
gh-pages
release/2.9
GreatV-patch-2
GreatV-patch-1
release/2.6.1
dyning-patch-1
release/2.8
release/2.7
dygraph
release/2.6
release/2.7.1
shiyutang-patch-1
docs_update
release/2.5
revert-7381-dygraph
revert-8552-dygraph
release/2.6rc
release/2.0-rc1-0
release/1.1
release/2.0
release/2.1
release/2.2
release/2.3
release/2.4
static
revert-7437-dygraph
v2.9.1
v2.9.0
v2.8.1
v2.8.0
v2.7.5
v2.7.4
v2.7.3
v2.7.2
v2.7.1
v2.7.0
v2.6.0
v2.5.0
v2.1.1
v2.1.0
v2.0.0
v1.1.0
开始日期   -   截止日期
-
置顶选项
不置顶
置顶等级:高
置顶等级:中
置顶等级:低
优先级
不指定
严重
主要
次要
不重要
参与者(1)