MobilePose icon indicating copy to clipboard operation
MobilePose copied to clipboard

Converting model to CoreML

Open MetaDev opened this issue 5 years ago • 5 comments

I would like to convert the model to CoreML to use it on the iPhone. But the DSNTNN layer is not supported because of its flip and linspace pytroch operands. Would it be possible to implement those operands in a different way, as such that it does convert? I am also looking to implement a similar layer to do coordinate and heatmap based regression, as in https://github.com/JimmySuen/integral-human-pose. These models are compatible with CoreML.

MetaDev avatar Feb 17 '19 09:02 MetaDev

Hey, I am trying to convert it to coreml as well, any progress on your end?

Russzheng avatar Mar 05 '19 22:03 Russzheng

I do not have a lot of time working on this... Please send a pull request if you convert it to CoreML successfully. Many Thanks

YuliangXiu avatar Mar 10 '19 17:03 YuliangXiu

Hey, I am trying to convert it to coreml as well, any progress on your end?

I went to the DSNTNN repo. There was suggested I can convert the model without the final DSNTNN layer, as this layer basically doesn't have any weights. You would have to implement that layer in objective c or swift though. I will let you know once I have something running, should be doable.

MetaDev avatar Mar 10 '19 19:03 MetaDev

wait for your good news! @MetaDev

YuliangXiu avatar Mar 11 '19 01:03 YuliangXiu

Hey, I am trying to convert it to coreml as well, any progress on your end?

I went to the DSNTNN repo. There was suggested I can convert the model without the final DSNTNN layer, as this layer basically doesn't have any weights. You would have to implement that layer in objective c or swift though. I will let you once I have something running, should be doable.

Sounds great, our team don't wanna write custom layers, we are training from scratch now. Basically swapping OpenPose's VGG blocks with Shufflenet-like blocks.

Russzheng avatar Mar 12 '19 05:03 Russzheng