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

The onnx input shape is fixed regardless of scales like mxnet? #12

Open
nguyentrongnhat4869 opened this issue Apr 22, 2021 · 2 comments

Comments

@nguyentrongnhat4869
Copy link

当使用onnx进行推断时,固定输入模型为(1、3、640、640),但是当使用mxnet进行推断时,输入是任意的,但不是固定的。 我想问的是,在使用onnx模型时,每个输入的大小应调整为(640,640)结果是否与mxnet不同,因为mxnet的输入形状取决于scale参数并且输入形状发生变化每个不同尺寸的输入图像?
感谢您的分享,太好了!

@zheshipinyinMc
Copy link
Owner

实际上官方代码中mxnet的推理限制了输入上下限,就是scale值。当scale值为[640,640]时,也就固定了mxnet的输入尺寸。这里我只比较了同样输入的前提下,mxnet的模型和onnx模型的输出一致,以此来验证模型转换的正确性,并未验证onnx模型的检测效果。如果要实现onnx检测人脸,加上mxnet中的retinaface的后处理就可以。

@mohamadHN93
Copy link

In fact, the reasoning of mxnet in the official code limits the upper and lower limits of the input, which is the scale value. When the scale value is [640,640], the input size of mxnet is fixed. Here I only compared the output of the mxnet model and the onnx model under the premise of the same input to verify the correctness of the model conversion, but did not verify the detection effect of the onnx model. If you want to implement onnx to detect faces, you can add the post-processing of retinaface in mxnet.

Hi Thanks for sharing such a brilliant job on converting since I have problem in conversion, but if I wanna use your model to detect faces, I would be grateful If you help me to utilize the converted version to detect faces or convert it to other formats like Tensorflow, ...

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