Giter Club home page Giter Club logo

Comments (5)

xadupre avatar xadupre commented on June 26, 2024

I tried to replicate your issue but it works for me with onnxruntime from main branch. I following the tutorial here to get the model you are using: https://github.com/ultralytics/yolov5?tab=readme-ov-file.

from onnxruntime.

shimaamorsy avatar shimaamorsy commented on June 26, 2024

Could you recall the precise steps you took to quantize the YOLO library , Plz !

from onnxruntime.

xadupre avatar xadupre commented on June 26, 2024

I use the command python export.py --weights yolov5s.pt --include torchscript onnx from the repo I linked above then I applied the same command line you used. I did it with the current development version of onnxruntime.

from onnxruntime.

shimaamorsy avatar shimaamorsy commented on June 26, 2024

Initially, I appreciate your response. However, when I tried to use yolov5-seg.onnx, I encountered an error.

After exporting yolov5n-seg.pt to the ONNX format :

!python export.py --weights yolov5n-seg.pt --include torchscript onnx

I attempted to preprocess it for static quantization.
Unfortunately, I encountered an error during this process.
Traceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in _run_code File "G:\anaconda3\Lib\site-packages\onnxruntime\quantization\preprocess.py", line 127, in <module> quant_pre_process( File "G:\anaconda3\Lib\site-packages\onnxruntime\quantization\shape_inference.py", line 71, in quant_pre_process model = SymbolicShapeInference.infer_shapes( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "G:\anaconda3\Lib\site-packages\onnxruntime\tools\symbolic_shape_infer.py", line 2855, in infer_shapes all_shapes_inferred = symbolic_shape_inference._infer_impl() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "G:\anaconda3\Lib\site-packages\onnxruntime\tools\symbolic_shape_infer.py", line 2644, in _infer_impl out_rank = len(get_shape_from_type_proto(vi.type)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "G:\anaconda3\Lib\site-packages\onnxruntime\tools\symbolic_shape_infer.py", line 37, in get_shape_from_type_proto assert not is_sequence(type_proto) ^^^^^^^^^^^^^^^^^^^^^^^ File "G:\anaconda3\Lib\site-packages\onnxruntime\tools\symbolic_shape_infer.py", line 32, in is_sequence assert cls_type in ["tensor_type", "sequence_type"] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AssertionError

As I have limited experience with ONNX and quantization, and I'm still in the early stages of learning, I lack the expertise to resolve these errors. Your help would be greatly appreciated.

from onnxruntime.

github-actions avatar github-actions commented on June 26, 2024

This issue has been automatically marked as stale due to inactivity and will be closed in 30 days if no further activity occurs. If further support is needed, please provide an update and/or more details.

from onnxruntime.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.