Comments (5)
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.
Could you recall the precise steps you took to quantize the YOLO library , Plz !
from onnxruntime.
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.
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.
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)
- User-provided session logging function is not used for every log HOT 6
- NOT_IMPLEMENTED : Could not find an implementation for ReduceProd(18) node with name 'p2o.ReduceProd.0'
- [Performance] Quadratic behaviour in list operations with SequenceInsert in onnx HOT 1
- [Build] [CANN] Failed to build CANN provider with training and Python bindings HOT 1
- ONNX Runtime doesn't support the graph optimization of vision-encoder-decoder yet HOT 1
- cannot resolve operator 'HardSwish' with opsets: ai.onnx v9 [Web] HOT 1
- cuda's FusedConv is not support Sigmod
- [Mobile] Subgraphs duplicate initializers in RAM during execution HOT 1
- [Web] The YOLOv8 segmentation model with batching option is not runing on the GPU ? HOT 2
- [Performance] Regression observed when using CUDA execution provider HOT 15
- Onnxruntime-directml 1.18.0 broken multithreading inference session HOT 3
- [Build] 0.18.0 release breaks Hummingbird build pipeline HOT 5
- Windows ARM64 & X64 CLIP Image Encoder different results HOT 2
- .. HOT 1
- [Feature Request] Get device ids via get_available_device_ids()
- [Training] IR version incompatibility in artifact generation for on-device training HOT 4
- npm install provides error on onnxruntime: 404 URL not found. HOT 2
- [Build] GCC Linker can't find re2 HOT 3
- [Web] `executionProviders` chain for `webnn` fallback does not work on init error HOT 28
- pip install failure for onnxruntime-gpu==1.9.0 HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from onnxruntime.