models icon indicating copy to clipboard operation
models copied to clipboard

Error using ONNX Model zoo pb tests files

Open IzanCatalan opened this issue 1 year ago • 3 comments

Bug Report

Which model does this pertain to?

Any Onnx Model Zoo model inside classification/vision path

Describe the bug

I'm trying to use test data files with protobuf TensorProtos, according with Model Zoo Readme (https://github.com/onnx/models#usage-). Has anyone use them with onnx runtime? I got an error related with the output/input size.

Reproduction instructions

System Information

  • OS Platform and Distribution: Ubuntu 20.04.4 LTS
  • ONNX Runtime installed from pip: 1.9.0
  • Python version: 3.8.10
  • Visual Studio version (if applicable): 1.69.0
  • GCC/Compiler version (if compiling from source): 9.4.0
  • CUDA/cuDNN version: NO NEED, CPU use only, Python and Jupyter notebooks
  • GPU model and memory: NONE
  • gluoncv version: 0.10.5
  • matplotlib version: 3.4.3
  • numpy version: 1.23.0
  • mxnet version: 1.9.0.
  • onnx version: 1.12.0
  • protobuf version: 3.16.0 outputfail test

IzanCatalan avatar Jul 21 '22 15:07 IzanCatalan

Hi @IzanCatalan, The error is thrown by onnx-tensorflow. I don't know much about it so I would suggest you raise this issue in their repo to get better help from the onnx-tf experts.

Regarding onnxruntime, ONNX Model Zoo will check whether uploading ONNX model and test data set are runnable by onnxruntime by CI. Thus resent50-v1-12-int8.onnx should be runnable by onnxruntime. Please let me know if you see any error while running onnxruntime with it.

jcwchen avatar Jul 26 '22 17:07 jcwchen

imagen

Hi @jcwchen I solved the problem getting the input and output names and using them on "model.run" That way, I can get the outpus which ara in [1,1000] shape. Those outputs are equal to reference outputs, so I can say that the inference is correct.

However, those reference outputs, from which dataset are calculated? Are they from a Imagenet dataset, from one particular image?

IzanCatalan avatar Jul 27 '22 11:07 IzanCatalan

Good to know you have figured out the solution.

However, those reference outputs, from which dataset are calculated? Are they from a Imagenet dataset, from one particular image?

If you are talking about existing test_data_set_0 in ONNX Model Zoo, I believe many of them are randomly generated by onnxruntime's tool so they are not real-world images.

jcwchen avatar Jul 27 '22 16:07 jcwchen