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

使用固定的downsample模型跑的时候,人物上蒙上一层绿点是什么情况? #16

Open
cvDFT opened this issue Feb 10, 2022 · 3 comments

Comments

@cvDFT
Copy link

cvDFT commented Feb 10, 2022

image
是我的推理代码有问题吗?

@DefTruth
Copy link
Owner

你的rxi没有根据最新帧推理的结果更新啊,每次都是随机的值,而且一开始不应该是随机初始化,而是初始化为0. 可以参考我写的一个动态onnx推理的python版本,在我fork的分支里的inference_onnx.py:

以及我在RVM里的PR:

@DefTruth
Copy link
Owner

补充一下,你这里的数据预处理需要和RVM的源码一致。它的预处理是:

transform = transforms.Compose([
            transforms.Resize(input_resize[::-1]),
            transforms.ToTensor()
        ])

transforms.ToTensor()里面做了归一化,x=x/255.

@DefTruth
Copy link
Owner

鉴于问这个问题的人比较多,我写了一份详细的知乎教程,请参考:

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

2 participants