Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature]Complete the ppocrv4_act #11345

Merged
merged 14 commits into from
Jan 19, 2024
Merged

Conversation

ranchongzhi
Copy link
Contributor

PR 类型 PR types

New features

PR 变化内容类型 PR changes

Others

描述 Description

Complete the act based on [Feature]Add ppocrv4_act

Copy link

paddle-bot bot commented Dec 5, 2023

Thanks for your contribution!

Copy link
Collaborator

@shiyutang shiyutang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

有一些初步的评论,后续将基于test.sh进行测试,因此需要给出处理后数据用于测试。

@@ -0,0 +1,147 @@
Global:
model_type: det
model_dir: ch_PP-OCRv3_det_infer
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OCRV3的文件都可以删除

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

model_filename: inference.pdmodel
params_filename: inference.pdiparams
model_type: rec
algorithm: SVTR
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

同上

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

name: SimpleDataSet
data_dir: /data/ailab/2022/rcz/paddles/PaddleOCR/datasets/chinese
label_file_list:
- /data/ailab/2022/rcz/paddles/PaddleOCR/datasets/chinese/zhongce_training_fix_1.6k.txt
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR中的绝对路径都需要修改,同时在代码中读取配置文件后,如果路径不对,提示修改这个文件中的目录。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

image_path = os.path.join(dataset_path, image_name)

# 加载图像并获取其尺寸
# print(i, image_path)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

注释可以去掉

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

global all_config, global_config
all_config = load_slim_config(args.config_path)

assert "Global" in all_config, f"Key 'Global' not found in config file. \n{all_config}"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不使用assert,使用raise Error

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@shiyutang
Copy link
Collaborator

测试通过+文件上传后可合入。

Copy link
Collaborator

@shiyutang shiyutang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@shiyutang shiyutang merged commit 448ee6b into PaddlePaddle:dygraph Jan 19, 2024
2 checks passed
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants