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

add the new architecture of pipelines #2569

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

dyning
Copy link
Collaborator

@dyning dyning commented Nov 28, 2024

add the new architecture of pipelines

Copy link

paddle-bot bot commented Nov 28, 2024

Thanks for your contribution!

@@ -0,0 +1,61 @@
# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

需要移到common里面

@@ -0,0 +1,19 @@
# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

列出所有组件列表

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

实现构建组件的初始化函数

self.text_det_model = self.create_model(text_det_model_config)

text_rec_model_config = config["SubModules"]["TextRecognition"]
self.text_rec_model = self.create_model(text_rec_model_config)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

去掉self


from pathlib import Path
from typing import Any, Dict, Optional
from .base import BasePipeline
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

移下位置

use_doc_unwarping: True

SubModules:
DocOrientationClassify:
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

名称改为和官方一致

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

需要添加模型名称和模块的匹配校验

def check_input_params(self, input_params):

if input_params["use_doc_preprocessor"] and not self.use_doc_preprocessor:
raise ValueError("The models for doc preprocessor are not initialized.")
Copy link
Collaborator Author

@dyning dyning Nov 29, 2024

Choose a reason for hiding this comment

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

应该打log,不应该服务退出

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant