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

yoloe的nms修改为MatrixNMS,训练时候正常,但是导出模型时候报错,请教一下怎么处理 #9218

Open
1 task done
yywangfei opened this issue Nov 15, 2024 · 0 comments
Assignees

Comments

@yywangfei
Copy link

问题确认 Search before asking

  • 我已经搜索过问题,但是没有找到解答。I have searched the question and found no related answer.

请提出你的问题 Please ask your question

config文件修改为:
image
ba报错如下:
TypeError: In transformed code:

File "/data/wangfei/PaddleX/paddlex/repo_manager/repos/PaddleDetection/ppdet/modeling/architectures/meta_arch.py", line 59, in forward
    if self.training:
File "/data/wangfei/PaddleX/paddlex/repo_manager/repos/PaddleDetection/ppdet/modeling/architectures/meta_arch.py", line 69, in forward
    for inp in inputs_list:
File "/data/wangfei/PaddleX/paddlex/repo_manager/repos/PaddleDetection/ppdet/modeling/architectures/meta_arch.py", line 76, in forward
    outs.append(self.get_pred())
File "/data/wangfei/PaddleX/paddlex/repo_manager/repos/PaddleDetection/ppdet/modeling/architectures/yolo.py", line 150, in get_pred
    return self._forward()
File "/data/wangfei/PaddleX/paddlex/repo_manager/repos/PaddleDetection/ppdet/modeling/architectures/yolo.py", line 92, in _forward
    if self.training:
File "/data/wangfei/PaddleX/paddlex/repo_manager/repos/PaddleDetection/ppdet/modeling/architectures/yolo.py", line 103, in _forward
    if self.for_mot:
File "/data/wangfei/PaddleX/paddlex/repo_manager/repos/PaddleDetection/ppdet/modeling/architectures/yolo.py", line 115, in _forward
    if self.return_idx:
File "/data/wangfei/PaddleX/paddlex/repo_manager/repos/PaddleDetection/ppdet/modeling/architectures/yolo.py", line 119, in _forward
    elif self.post_process is not None:
File "/data/wangfei/PaddleX/paddlex/repo_manager/repos/PaddleDetection/ppdet/modeling/architectures/yolo.py", line 126, in _forward
    bbox, bbox_num, nms_keep_idx = self.yolo_head.post_process(
File "/data/wangfei/PaddleX/paddlex/repo_manager/repos/PaddleDetection/ppdet/modeling/heads/ppyoloe_head.py", line 531, in post_process
    if self.exclude_post_process:
File "/data/wangfei/PaddleX/paddlex/repo_manager/repos/PaddleDetection/ppdet/modeling/heads/ppyoloe_head.py", line 542, in post_process
    if self.exclude_nms:
File "/data/wangfei/PaddleX/paddlex/repo_manager/repos/PaddleDetection/ppdet/modeling/heads/ppyoloe_head.py", line 546, in post_process
    bbox_pred, bbox_num, nms_keep_idx = self.nms(pred_bboxes,
File "/data/wangfei/PaddleX/paddlex/repo_manager/repos/PaddleDetection/ppdet/modeling/layers.py", line 605, in __call__
    def __call__(self, bbox, score, *args):
        return ops.matrix_nms(
        ~~~~~~~~~~~~~~~~~~~~~~ <--- HERE
            bboxes=bbox,
            scores=score,

File "/data/wangfei/PaddleX/paddlex/repo_manager/repos/PaddleDetection/ppdet/modeling/ops.py", line 714, in matrix_nms
    helper.append_op(
File "/usr/local/lib/python3.10/dist-packages/paddle/base/layer_helper.py", line 57, in append_op
    return self.main_program.current_block().append_op(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/paddle/base/framework.py", line 4702, in append_op
    op = Operator(
File "/usr/local/lib/python3.10/dist-packages/paddle/base/framework.py", line 3326, in __init__
    raise TypeError(

TypeError: The type of '%BBoxes' in operator matrix_nms should be one of [str, bytes, Variable]. but received : Value(define_op_name=pd_op.divide, index=0, dtype=builtin.tensor<-1x8400x4xf32>, stop_gradient=False)
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

No branches or pull requests

3 participants