Skip to content

替换ReID模块 #9332

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

Open
1 task
LiuYuan84 opened this issue Mar 21, 2025 · 3 comments
Open
1 task

替换ReID模块 #9332

LiuYuan84 opened this issue Mar 21, 2025 · 3 comments
Assignees

Comments

@LiuYuan84
Copy link

LiuYuan84 commented Mar 21, 2025

问题确认 Search before asking

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

请提出你的问题 Please ask your question

您好 我想用VerReID替换掉现有的ReID模块 除了替换模型和路径之外还需要做什么改动吗? 比如输出路径这种 期待您的回复!!

@zhangyubo0722
Copy link
Collaborator

对于模型结构是有变动吗

@LiuYuan84
Copy link
Author

不好意思我不太懂这个模型结构是啥意思😢 但是我今天尝试格式转换(onnx -> paddle)的时候总是不成功
C:\Users\AGRSAdmin.conda\envs\ppd\lib\site-packages\paddle\nn\layer\layers.py:2084: UserWarning: Skip loading for embedding0.weight. embedding0.weight receives a shape [5, 2, 768], but the expected shape is [5, 2].
warnings.warn(f"Skip loading for {key}. " + str(err))
C:\Users\AGRSAdmin.conda\envs\ppd\lib\site-packages\paddle\jit\dy2static\program_translator.py:712: UserWarning: full_graph=False don't support input_spec arguments. It will not produce any effect.
You can set full_graph=True, then you can assign input spec.

warnings.warn(
In transformed code:

File "E:\Yuan\project\PaddleDetection\output_inference/VersReID\x2paddle_code.py", line 439, in forward
    x2paddle_191 = paddle.concat(x=[x2paddle_190, x2paddle_175], axis=1)
    x2paddle_192 = paddle.add(x=x2paddle_191, y=x2paddle_base_pos_embed)
    x2paddle_198 = paddle.concat(x=[x2paddle_192, x2paddle_197], axis=1)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <--- HERE
    x2paddle_209 = self.x2paddle_209(x2paddle_198)
    x2paddle_210 = paddle.shape(input=x2paddle_209)

File "C:\Users\AGRSAdmin\.conda\envs\ppd\lib\site-packages\paddle\tensor\manipulation.py", line 1332, in concat
    helper.append_op(
File "C:\Users\AGRSAdmin\.conda\envs\ppd\lib\site-packages\paddle\base\layer_helper.py", line 44, in append_op
    return self.main_program.current_block().append_op(*args, **kwargs)
File "C:\Users\AGRSAdmin\.conda\envs\ppd\lib\site-packages\paddle\base\framework.py", line 4467, in append_op
    op = Operator(
File "C:\Users\AGRSAdmin\.conda\envs\ppd\lib\site-packages\paddle\base\framework.py", line 3214, in __init__
    self.desc.infer_shape(self.block.desc)

ValueError: (InvalidArgument) The 2-th dimension of input[0] and input[1] is expected to be equal.But received input[0]'s shape = [-1, 193, 768], input[1]'s shape = [1, 1, 2].

[Hint: Expected inputs_dims[0][j] == inputs_dims[i][j], but received inputs_dims[0][j]:768 != inputs_dims[i][j]:2.] (at ..\paddle/phi/kernels/funcs/concat_funcs.h:83)
[operator < concat > error]

@zhangyubo0722
Copy link
Collaborator

转换的命令是什么呢

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