Comments (13)
“adaptive_avg_pool2d” not support in onnx
how to convert to onnx?
same problem cause by pool ops,
some solution:pytorch/pytorch#34743 (comment)
but we cant convert adaptive_avg_pool2d to avg_pool.
we can change https://github.com/HRNet/Lite-HRNet/blob/hrnet/models/backbones/litehrnet.py#L29 and https://github.com/HRNet/Lite-HRNet/blob/hrnet/models/backbones/litehrnet.py#L86
to static kernel size avg_pool,maybe need retrain this modeli just have transformed onnx model, but not check,u can download from here
which code change have you made?
the core thought is change adaptive_avg_pool2d to avg_pool,adjust inputsize and outputsize,here link may help
from lite-hrnet.
i have upload lite_hrnet.py, it can get onnx model but with some warnings ,maybe not influence final result ,link
from lite-hrnet.
RuntimeError: Failed to export an ONNX attribute 'onnx::Gather', since it's not constant, please try to make things (e.g., kernel size) static if possible
from lite-hrnet.
“adaptive_avg_pool2d” not support in onnx
how to convert to onnx?
same problem cause by pool ops,
some solution:pytorch/pytorch#34743 (comment)
but we cant convert adaptive_avg_pool2d to avg_pool.
we can change https://github.com/HRNet/Lite-HRNet/blob/hrnet/models/backbones/litehrnet.py#L29 and https://github.com/HRNet/Lite-HRNet/blob/hrnet/models/backbones/litehrnet.py#L86
to static kernel size avg_pool,maybe need retrain this model
from lite-hrnet.
Awesome lightweight networks!!
Could you provide ONNX format exporting code?
Thanks~
from lite-hrnet.
“adaptive_avg_pool2d” not support in onnx
from lite-hrnet.
“adaptive_avg_pool2d” not support in onnx
how to convert to onnx?
from lite-hrnet.
“adaptive_avg_pool2d” not support in onnx
You can directly replace the "adaptive_avg_pool2d" with the normal average pooling with a definite pooling size.
Then, it can be converted to onnx format.
from lite-hrnet.
“adaptive_avg_pool2d” not support in onnx
how to convert to onnx?
same problem cause by pool ops,
some solution:pytorch/pytorch#34743 (comment)
but we cant convert adaptive_avg_pool2d to avg_pool.we can change https://github.com/HRNet/Lite-HRNet/blob/hrnet/models/backbones/litehrnet.py#L29 and https://github.com/HRNet/Lite-HRNet/blob/hrnet/models/backbones/litehrnet.py#L86
to static kernel size avg_pool,maybe need retrain this model
i just have transformed onnx model, but not check,u can download from here
from lite-hrnet.
“adaptive_avg_pool2d” not support in onnx
how to convert to onnx?
same problem cause by pool ops,
some solution:pytorch/pytorch#34743 (comment)
but we cant convert adaptive_avg_pool2d to avg_pool.
we can change https://github.com/HRNet/Lite-HRNet/blob/hrnet/models/backbones/litehrnet.py#L29 and https://github.com/HRNet/Lite-HRNet/blob/hrnet/models/backbones/litehrnet.py#L86
to static kernel size avg_pool,maybe need retrain this modeli just have transformed onnx model, but not check,u can download from here
which code change have you made?
from lite-hrnet.
@codylcs Thanks a lot for the scripts.
So the onnx model is returning heatmaps of the shape [1, 17, 96, 72]
Can you please help me getting the model predicted keypoints using the onnx model ?
from lite-hrnet.
hi,@codylcs
Do we need retraining the model like litehrnet etc after changing the code as what you did?
I have changed the code of litehrnet.py ,yet still the same error? what was wrong ?
what should I do after change the code as you said above? It did not work at all!
Maybe I should build it or any other operation to make the change effective?
BR
from lite-hrnet.
this is my another implementation of Lite Hrnet and I have a script to convert model to onnx. See my repo: https://github.com/viet-hoang-99/Lite_HRnet_vh
from lite-hrnet.
Related Issues (20)
- KeyError: "TopDown: 'TopDownSimpleHead is not in the models registry'" HOT 1
- HRNet or LiteHRNet? HOT 4
- Inference speed (frames per second) on Raspberry Pi?
- train mpii failed,MMDistributedDataParallel object has no attribute _sync_params
- ImportError: cannot import name 'build_posenet' from 'models' (unknown location) HOT 2
- Our new study on lightweight high resolution networks: Dite-HRNet HOT 1
- I got an issue about KeyError 'center',there is no keyword 'center' in result HOT 1
- Not able to download the test jsons?
- pretrained model problem
- lower mAP HOT 1
- Training custom model HOT 1
- Welcome update to OpenMMLab 2.0
- Why i got lower mIoU than HRNet-W16?
- cannot import name 'Config' from 'mmcv' HOT 3
- What is the model structure of small HRNet?
- ModuleNotFoundError: No module named 'mmcv.transforms' HOT 3
- ImportError: cannot import name 'BACKBONES' from 'mmdet.models'
- question about Figure 3 in the paper
- LiteHRNet的实时性为什么比MobileNetV3-Large差很多啊?
- ModuleNotFoundError: No module named 'mmcv'
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 lite-hrnet.