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

[WIP] upgrade model inference #2456

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

TingquanGao
Copy link
Collaborator

@TingquanGao TingquanGao commented Nov 11, 2024

TODO:

  1. 设计dependency类;
  2. CVResult中去掉img_reader,改为从readimg.img获取;
  3. readimg不再保存临时文件;
  4. 支持Benchmark;

Copy link

paddle-bot bot commented Nov 11, 2024

Thanks for your contribution!

from ..utils.color_map import get_colormap, font_colormap


def create_font(txt, sz, font_path):
Copy link
Collaborator

Choose a reason for hiding this comment

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

return font


def draw_box_txt_fine(img_size, box, txt, font_path):
Copy link
Collaborator

Choose a reason for hiding this comment

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

考虑到未来有更多的common funcs,看看是不是一类操作放到一个文件里面?

raise NotImplementedError

@abstractmethod
def set_predictor(self):
Copy link
Collaborator

Choose a reason for hiding this comment

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

之前讨论不支持设置吧?

@TingquanGao TingquanGao force-pushed the refactor branch 2 times, most recently from 1c7b4db to fb8c28c Compare November 28, 2024 12:32
def _build_batch_sampler(self):
return ImageBatchSampler()

def _get_result_class(self):
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

放到transformers下面定义

# def add(self, )


class BaseComponent(ABC):
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

base component和pipeline中的component是否可复用?

def _get_result_class(self):
return TopkResult

def _build_transformers(self):
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

transformer中有predictor不合理,trans 需要换个名称,

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

processors
operators

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

cmpt -> component

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.

2 participants