-
Notifications
You must be signed in to change notification settings - Fork 8k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
DocTr++论文复现 #11475
DocTr++论文复现 #11475
Conversation
Thanks for your contribution! |
chenjiajun05 seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
非常感谢您的贡献~ 请提交训练参数和inference模型方便我们进行验证。 另外辛苦将代码融合进PaddleOCR框架,可以参考:
https://github.com/PaddlePaddle/PaddleOCR/blob/release/2.7/applications/%E9%AB%98%E7%B2%BE%E5%BA%A6%E4%B8%AD%E6%96%87%E8%AF%86%E5%88%AB%E6%A8%A1%E5%9E%8B.md
image_path = os.path.join(self.root, "img", image_name + ".png") | ||
image = cv2.imread(image_path) | ||
|
||
# if image is None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
删除多余代码
echo " # done" | ||
} | ||
|
||
doc3d_download "http://vision.cs.stonybrook.edu/~sagnik/doc3d/img_1.zip" "$outputPath/" "img_1.zip" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
建议写一个循环,把文件名放在一个list中
applications/Doctr++文档矫正/train.sh
Outdated
export FLAGS_logtostderr=0 | ||
export CUDA_VISIBLE_DEVICES=4 | ||
|
||
python train.py --data-root /ssd1/chenjiajun05/chenjiajun05/doc3d \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不要包含个人目录,建议删除sh脚本,将启动训练说明写在文档中
./train.sh | ||
``` | ||
每个époch后,会进行验证集评估,保存best_model以及last_model。 | ||
## 7. 模型评估 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
请给出评估精度指标
chmod +x train.sh | ||
./train.sh | ||
``` | ||
每个époch后,会进行验证集评估,保存best_model以及last_model。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
epoch
准备工作完成后,即可开始进行模型训练。本项目提供训练脚本train.sh。其中需要自行修改数据集路径--data-root | ||
```python | ||
# 模型训练 | ||
chmod +x train.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
将脚本替换为完整启动命令,参考:
python3 tools/train.py -c configs/rec/PP-OCRv3/en_PP-OCRv3_rec.yml -o Global.checkpoints=./your/trained/model
python eval_DocUNet.py --i ./crop/ --m pretrained_model --o output_val --g ./scan/ | ||
``` | ||
效果如下: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
请增加推理部署相关说明:包括单图推理脚本,inference模型导出命令,以及基于inference模型预测脚本。参考:
https://github.com/PaddlePaddle/PaddleOCR/blob/release/2.7/doc/doc_ch/algorithm_rec_nrtr.md#4-%E6%8E%A8%E7%90%86%E9%83%A8%E7%BD%B2
这个有训练好的模型吗?怎么使用? |
DocTr++论文复现