mmpose icon indicating copy to clipboard operation
mmpose copied to clipboard

How to export the model to torchscript?

Open simba0703 opened this issue 4 years ago • 10 comments
trafficstars

How to export the model to torchscript?

simba0703 avatar Apr 15 '21 08:04 simba0703

Hi we haven't provide tools yet. Please request the feature here https://github.com/open-mmlab/mmpose/issues/9 to help us prioritize.

innerlee avatar Apr 15 '21 09:04 innerlee

Can the network export the onnx including decode ? like HeatmapParser function

alicera avatar May 12 '21 08:05 alicera

requesting module to the ~~DJ~~ programming team as well, keep up the good work guys you rock

greg-is-kub avatar Sep 13 '21 08:09 greg-is-kub

any update on this?

chophilip21 avatar Feb 03 '22 19:02 chophilip21

onnx conversion works, but torchscript conversion fails due to custom sub-class of pytorch

den-run-ai avatar Apr 24 '22 14:04 den-run-ai

I know im a little late on this thread but i was having a similar issue to @alicera for exporting a module using onnx. The model only returns the heat map and not the decoded keypoints. Is this still an issue? If not, can someone point me to an onnx example?

rtaylo45 avatar Jun 20 '22 20:06 rtaylo45

I also want to know, how to convert mmpose models to onnx. Does anyone have an example code?

Monalsingh avatar Jun 28 '22 11:06 Monalsingh

@Monalsingh @rtaylo45 Now we have MMDeploy to support model export and deployment for MMPose. An example is provided in MMDeploy documents.

ly015 avatar Jun 28 '22 12:06 ly015

Would like to have Tracing support for mmPose models. I have been able to successfully use 'torch2torchscript' under mmdeploy.apis to trace mmSegmentation Models. However, using the same on mmPose (tried configs under dekr and associative+embedding) with the following mmdeploy config: '\mmdeploy\configs\mmpose\pose-detection_torchscript.py' would throw the following error:

File "mmdetection\mmpose\mmpose\datasets\pipelines\shared_transform.py", line 176, in call meta[key_tgt] = results[key_src]

KeyError: 'flip_index'

Added this to the feature request page. Posting here to see if there are any possible workarounds.

AshvantSelvam avatar Nov 04 '22 16:11 AshvantSelvam

Now,Can export the model to torchscript?

rookiez7 avatar May 18 '23 10:05 rookiez7