-
Notifications
You must be signed in to change notification settings - Fork 968
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
base: develop
Are you sure you want to change the base?
Conversation
Thanks for your contribution! |
@@ -0,0 +1,61 @@ | |||
# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve. |
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.
需要移到common里面
@@ -0,0 +1,19 @@ | |||
# copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve. |
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.
列出所有组件列表
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.
实现构建组件的初始化函数
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) |
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.
去掉self
|
||
from pathlib import Path | ||
from typing import Any, Dict, Optional | ||
from .base import BasePipeline |
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.
移下位置
use_doc_unwarping: True | ||
|
||
SubModules: | ||
DocOrientationClassify: |
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.
名称改为和官方一致
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.
需要添加模型名称和模块的匹配校验
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.") |
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.
应该打log,不应该服务退出
add the new architecture of pipelines