检测训练
py tools/train.py -c configs/det/det_mv3_db.yml 2>&1
生成部署模型
py tools/export_model.py -c configs/det/det_mv3_db.yml -o Global.checkpoints="./output/db_mv3_db/best_accuracy" Global.save_inference_dir="./output/db_mv3_db/export_model"
py tools/export_model.py -c configs/det/det_mv3_db.yml -o Global.checkpoints="./output/db_mv3_db/best_accuracy" Global.save_inference_dir=./output/db_mv3_db_infer/
评估模型
py tools/eval.py -c configs/det/det_mv3_db.yml -o Global.checkpoints="./output/db_mv3_db/best_accuracy" PostProcess.box_thresh=0.6 PostProcess.unclip_ratio=1.5
测试检测
py tools/infer_det.py -c configs/det/det_mv3_db.yml -o Global.infer_img="./doc/imgs/yibiao/" Global.checkpoints="./output/db_mv3_db/best_accuracy"
识别训练
py tools/train.py -c configs/rec/rec_mv3_none_bilstm_ctc2.yml
评估
py -m paddle.distributed.launch --gpus '0' tools/eval.py -c configs/rec/rec_mv3_none_bilstm_ctc2.yml -o Global.checkpoints="./output/rec2/mv3_none_bilstm_ctc/best_accuracy"
生成部署文件
py tools/export_model.py -c configs/rec/rec_mv3_none_bilstm_ctc2.yml -o Global.checkpoints="./output/rec2/mv3_none_bilstm_ctc/best_accuracy" Global.save_inference_dir="./output/rec2/mv3_none_bilstm_ctc/export_model"
测试
py tools/infer_rec.py -c configs/rec/rec_mv3_none_bilstm_ctc2.yml -o Global.checkpoints="./output/rec2/mv3_none_bilstm_ctc/best_accuracy" Global.load_static_weights=false Global.infer_img="./doc/imgs/yibiao/n001_crop_0.jpg"
py tools/infer_rec.py -c configs/rec/rec_mv3_none_bilstm_ctc2.yml -o Global.checkpoints="./output/rec2/mv3_none_bilstm_ctc/best_accuracy" Global.load_static_weights=false Global.infer_img="./doc/imgs/yibiao/rec/"
py tools/infer/predict_rec.py --image_dir="./doc/imgs/yibiao/rec/" --rec_model_dir="./output/rec2/mv3_none_bilstm_ctc/export_model/" --rec_char_dict_path="./ppocr/utils/ppocr_keys_v1.txt"
py tools/infer/predict_system.py --image_dir="./doc/imgs/yibiao2/n015.jpg" --det_model_dir="./output/db_mv3_db/export_model/" --rec_model_dir="./output/rec2/mv3_none_bilstm_ctc/export_model/" --cls_model_dir="./inference/ch_ppocr_mobile_v2.0_cls_infer/" --use_angle_cls=True --use_space_char=True
paddleOCR检测训练和识别训练代码
最新推荐文章于 2024-06-02 01:13:17 发布